3

I'm trying to compile my library, using jitpack, but i consistenly get the 'failed to resolve: $library-dependency' When i build my app. The gradle files are configured properly, so i checked out the jitpack logs for my build, and it's giving me the fatal error 'task install is ambiguous'. I'll include a copy of my build scripts, and the jitpack log.

Build Script (project)

 allprojects {
     repositories {
         google()
         jcenter()
         maven { url 'https://jitpack.io' }
     }
 }

Build Script (app module)

dependencies {

     //...

     //latest BonitaToolbox commit on master
    implementation 'com.github.whompum:bonitatoolbox:master-SNAPSHOT'
 }

Link to jitpack build logs

https://jitpack.io/com/github/whompum/bonitatoolbox/master/build.log

I even ran the test repo jitpack offers, but with the same output. Could this be an issue with AS, or with my libraries build files? I'm not sure but would appreciate any help you guys can offer. I'll of course include any more information on this issue.

Here's a link to a github issue i've submited: https://github.com/jitpack/jitpack.io/issues/2096

whompum
  • 69
  • 2
  • 12

1 Answers1

5

From: https://jitpack.io/docs/ANDROID/#gradle

Gradle

To enable building on JitPack you need to add the android-maven plugin.

If using Gradle 4.1 or later:

1) In your root build.gradle:

buildscript { 
  dependencies {
    classpath 'com.github.dcendents:android-maven-gradle-plugin:2.0' // Add this line

2) In your library/build.gradle add:

 apply plugin: 'com.github.dcendents.android-maven'  

 group='com.github.YourUsername'

3) Create a GitHub release or add a git tag.

Abdul Rahman A Samad
  • 1,062
  • 1
  • 15
  • 21
  • None of the above is necessary to use a jitpack library, but still i've tried it with no avail. I think i'm just going to import the library into my main app and move on haha – whompum Dec 13 '17 at 05:22
  • what's even more strange is i install the plugins and configure my gradle files appropriately, then call gradlew install from the terminal and it works perfectly! It's when jitpacks tries to compile using that task, that it becomes an issue. Only thing i can think of is excluded files on github, but i can't tell. I've imported my library to my app locally so i can get on with development, but if you have any more tricks up your sleeves i'd be happy to try – whompum Dec 13 '17 at 05:32
  • That's weird haha. How about this one? You've checked this one? https://github.com/jitpack/jitpack.io/issues/19 The error seems the same as yours. – Abdul Rahman A Samad Dec 13 '17 at 05:38
  • yuuuuupppp tried that too! you're right this is weird. Here's a link to my repo if you want to try it yourself https://github.com/whompum/BonitaToolbox never mind the outdated readme – whompum Dec 13 '17 at 05:41