2

I've forked an Android library and merge some changes that I need https://github.com/ceessay/kdgaugeView

In order to use the library in my Android project I've tried publishing it on Jitpack.

The problem is after pushing changes on Github, the builds on Jitpack seem to pass but there's this message

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.5.1/userguide/command_line_interface.html#sec:command_line_warnings

BUILD SUCCESSFUL in 543ms
4 actionable tasks: 1 executed, 3 up-to-date
Build tool exit code: 0
Looking for artifacts...
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8 -Dhttps.protocols=TLSv1.2
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8 -Dhttps.protocols=TLSv1.2
Looking for pom.xml in build directory and ~/.m2
2020-07-13T12:27:13.425592193Z
Exit code: 0
ERROR: No build artifacts found

full log here: https://jitpack.io/com/github/ceessay/kdgaugeView/1.0.5/build.log

Adding the library in my project also failes with the following message:

Could not find com.github.ceessay:kdgaugeView:1.0.4.

I've followed the guidelines on Jitpack documentation, Upgraded gradle on the library but i wont work.

I am new to publishing libraries for Android so I might be missing something. Any clue of what that is ?

ceessay
  • 322
  • 5
  • 16

2 Answers2

1

You can use the maven-publish gradle plugin. The documentation for maven-publish is https://developer.android.com/studio/build/maven-publish-plugin.

I'm sure it's also possible to use com.github.dcendents.android-maven which is already in that project, but it isn't as obvious to me.

You can also check out the excellent plugin https://vanniktech.github.io/gradle-maven-publish-plugin/.

Sean
  • 2,632
  • 2
  • 27
  • 35
0

Spent half a day fighting the same problem. I forgot to define publication for my artifact in build.gradle.kts:

publishing {
  publications {
    create<MavenPublication>("maven") {
      groupId = "com.github.username"
      artifactId = "library-name"
      version = "1.0.0"

      from(components["kotlin"])
    }
  }
}

Hope, this helps.

trashkalmar
  • 883
  • 5
  • 11