I recently started seeing a build error in our CircleCI build:
A problem occurred configuring root project 'android'.
> Could not resolve all artifacts for configuration ':classpath'.
> Could not find semver4j-0.16.4-nodeps.jar (com.github.gundy:semver4j:0.16.4).
Searched in the following locations:
https://jitpack.io/com/github/gundy/semver4j/0.16.4/semver4j-0.16.4-nodeps.jar
Re-running the job sometimes allows the build to complete, even though when I locally attempt to load that URL (https://jitpack.io/com/github/gundy/semver4j/0.16.4/semver4j-0.16.4-nodeps.jar), I get an error: "Not found in JitPack repository".
I tried running the build locally with the --refresh-dependencies
gradle option, and I was able to reproduce the error... but only once. With no changes to my build.gradle file, the build succeeded the next time I tried it.
I found that the Kotlin gradle plugin's dependency on semver4j was modified in this commit, making it an embedded dependency. I was hopeful that upgrading the Kotlin gradle plugin to 1.7.0 would pick up this change, but I'm not sure that it did; it certainly didn't fix my CircleCI build issues.
I did confirm that jitpack is included in the repositories section of our build.gradle file:
maven { url "https://jitpack.io" }
I'm hoping someone else has a fix for this, or some gradle magic that can serve as a workaround?
CodePudding user response:
Looks like some Jitpack's services are suffering an outage, check it out on https://status.jitpack.io/
CodePudding user response:
In buildscript { repositories {
delete "maven { url 'https://jitpack.io' }"
put in "maven { url 'https://mvnrepository.com/artifact/com.github.gundy/semver4j'}"
In allprojects { repositories {
put in "maven { url 'https://mvnrepository.com/artifact/com.github.gundy/semver4j'}"
but over
"maven { url 'https://jitpack.io' }"