anyone facing this? on Gradle 7.1: ```FAILURE: Bui...
# gradle
p
anyone facing this? on Gradle 7.1:
Copy code
FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':buildSrc'.
> Could not resolve all artifacts for configuration ':buildSrc:classpath'.
   > Could not resolve org.gradle.kotlin:gradle-kotlin-dsl-plugins:2.1.4.
     Required by:
         project :buildSrc > org.gradle.kotlin.kotlin-dsl:org.gradle.kotlin.kotlin-dsl.gradle.plugin:2.1.4
      > Could not resolve org.gradle.kotlin:gradle-kotlin-dsl-plugins:2.1.4.
         > Could not get resource '<https://plugins.gradle.org/m2/org/gradle/kotlin/gradle-kotlin-dsl-plugins/2.1.4/gradle-kotlin-dsl-plugins-2.1.4.module>'.
            > Could not GET '<https://jcenter.bintray.com/org/gradle/kotlin/gradle-kotlin-dsl-plugins/2.1.4/gradle-kotlin-dsl-plugins-2.1.4.module>'.
               > PKIX path validation failed: java.security.cert.CertPathValidatorException: validity check failed
on Gradle 7.2 - a bunch of these:
Copy code
> Could not resolve all artifacts for configuration ':buildSrc:classpath'.
   > Could not resolve org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.21.
     Required by:
         project :buildSrc
      > Could not resolve org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.21.
         > Could not get resource '<https://plugins.gradle.org/m2/org/jetbrains/kotlin/kotlin-stdlib-jdk8/1.5.21/kotlin-stdlib-jdk8-1.5.21.pom>'.
            > Could not HEAD '<https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-stdlib-jdk8/1.5.21/kotlin-stdlib-jdk8-1.5.21.pom>'.
               > PKIX path validation failed: java.security.cert.CertPathValidatorException: validity check failed
   > Could not resolve org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.21.
Bintray was deprecated, right?
also yes 1
k
maybe worth annoucements?
👌 1
p
@tapchicoma any idea for a workaround? this issue doesn't let me fix an issue in my project
will defining an alternative repository help?
t
Try
--offline
mode. If it will not work - no idea about workaround. Actual redirection to JCenter is done by Gradle plugin portal
p
works locally because I have some version cached, but unfortunately not in CI
that was quick. Thanks!
j
my CI is still failing...
Could not resolve org.jetbrains.kotlinkotlin test junit1.5.31.
IMO those basic and important libs shouldn't be depend on JCenter
p
how do you depend on it? is it explicit or implicit?
j
I havent even jcenter, but Gradle fallback to jcenter by default or something so
p
it's hard to help without some concrete code 🙂
v
IMO those basic and important libs shouldn't be depend on JCenter
They don't actually
j
https://jcenter.bintray.com/ this should be accesible?
v
The POM is hosted on the Gradle Plugin Portal and has a reference to the Gradle module metadata, so it searches for the module file. The module file though is missing on the plugin portal. Things that are missing on the plugin portal are forwarede to JCenter, which then finally forwards to Maven Central for things it does not host itself.
p
it's just a website - it's something else than hosting for Maven artifacts
v
With the certificate being fixed, JCenter returns a 404 error when requesting the module file and Gradle can just go on.
😐 1
But with the invalid certificate it was not able to complete the request
https://jcenter.bintray.com/ this should be accesible?
Not anymore. All the web part and directory listings is forbidden now, but the artifacts are still served.
👍 2
c
But with the invalid certificate it was not able to complete the request
thats a gradle bug then. gradle should just try the next repo.
v
Maybe it would have, but there is no next repo
Only Gradle plugin portal is defined as repo
And no, if it asked the next repo it would be a bug
Gradle never takes artifacts for one and dependencies from different repos
The first repo it finds the dependency in the requested version is used. If that repo is broken, things go awry. That's also one of the main reasons you should avoid
mavenLocal
whenever you can and at most use it with explicit content filters, but not generally in a Gradle build, let alone as first entry.