Skip to content
Advertisement

gradle build broken after dependency update

I use gradle to build a java project (ASCIIGenome).

One of the dependencies of ASCIIGenome is a repository on github (htsjdk, as you can see is a fork with some changes of mine). The ASCIIGenome project builds fine if I use this commit of htsjdk in build.gradle:

dependencies {
    ...
    compile 'com.github.dariober:htsjdk:80e355c'
    ...
}

I made edits to htsjdk so now the dependency is

compile 'com.github.dariober:htsjdk:609ca91'

and now the build fails with the following:

./gradlew build

FAILURE: Build failed with an exception.

* Where:
Build file '/home/dario/git_repos/ASCIIGenome/build.gradle' line: 77

* What went wrong:
Could not determine the dependencies of task ':jar'.
> Could not resolve all files for configuration ':compile'.
   > Could not find com.github.dariober:htsjdk:609ca91.
     Searched in the following locations:
       - https://jcenter.bintray.com/com/github/dariober/htsjdk/609ca91/htsjdk-609ca91.pom
       - https://jcenter.bintray.com/com/github/dariober/htsjdk/609ca91/htsjdk-609ca91.jar
       - https://jitpack.io/com/github/dariober/htsjdk/609ca91/htsjdk-609ca91.pom
       - https://jitpack.io/com/github/dariober/htsjdk/609ca91/htsjdk-609ca91.jar
     Required by:
         project :

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 3s

I can’t understand why htsjdk:80e355c is ok while htsjdk:609ca91 fails. Any idea what changes break the build? Please let me know if more information is necessary

Advertisement

Answer

It turns out there is a bug in the .gitignore repository of htsjdk that caused some files to be ignored so the htsjdk dependency was broken. Fixing .gitignore fixed my problem.

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement