Jitpack library successfully uploaded but cannot access any method within implementation

28 views Asked by At

I have uploaded my library to jitpack, here is the link

https://jitpack.io/com/github/gastsail/hzone/0.9/hzone-0.9.pom

thing is that when I try to import it in any project like

dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        google()
        mavenCentral()
        maven {
            url = uri("https://jitpack.io")
        }
    }
}

and

implementation("com.github.gastsail:hzone:0.9")

My main lib method is not even found, I wonder what is happening here, I have uploaded like 16 versions with a lot of different configurations, all of them successfully pass as the build but when importing it seems like I cannot access the method.

The HZone() method inside the lib is not internal or private, it should be visible

enter image description here

I cannot even find it inside the external Libraries

enter image description here

But somehow it successfully pulled the library

enter image description here

Repo link: https://github.com/gastsail/hzone/tree/0.9

Jitpack: https://jitpack.io/#gastsail/hzone

1

There are 1 answers

0
Gastón Saillén On

The solution was to add the followin to the publications code

afterEvaluate {
    publishing {
        publications {
            create<MavenPublication>("release") {
                from(components["release"])
                groupId = "com.github.gastsail"
                artifactId = "hzone"
                version = "0.9-alpha17"
            }
            repositories {
                mavenLocal()
            }
        }
    }
}

I was missing from(components["release"])