Whenever I reload changes to a gradle file within my project I encounter this sync error. Every plugin-based task as well as the wrapper works just fine. It only occurs when "reloading all gradle projects" or "loading gradle changes".
Suspecting my corporate proxy, I've already done everything in Intellij/Gradle sync fails behind Corporate proxy. This is also not a problem in other projects with near identical config up-to gradle DSL.
Curiously reloading doesn't seem to honor my gradle-wrapper.properties distributionUrl
which is set to our own artifactory.
Error thrown (shortened):
> Task :prepareKotlinBuildScriptModel UP-TO-DATE
Unexpected exception while resolving Gradle distribution sources: Could not resolve all files for configuration ':detachedConfiguration1'.
org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration$ArtifactResolveException: Could not resolve all files for configuration ':detachedConfiguration1'.
Caused by: org.gradle.internal.resolve.ModuleVersionResolveException: Could not resolve gradle:gradle:8.1.1.
Required by:
project :
Caused by: org.gradle.internal.resolve.ModuleVersionResolveException: Could not resolve gradle:gradle:8.1.1.
Caused by: org.gradle.api.resources.ResourceException: Could not get resource 'https://services.gradle.org/distributions/gradle-8.1.1-src.zip'.
Caused by: org.gradle.internal.resource.transport.http.HttpRequestException: Could not HEAD 'https://services.gradle.org/distributions/gradle-8.1.1-src.zip'.
Caused by: org.gradle.internal.resource.transport.http.HttpRequestException: The server may not support the client's requested TLS protocol versions: (TLSv1.2, TLSv1.3). You may need to configure the client to allow other protocols to be used. See: https://docs.gradle.org/8.1.1/userguide/build_environment.html#sec:gradle_system_properties
Caused by: javax.net.ssl.SSLHandshakeException: Remote host terminated the handshake
Caused by: java.io.EOFException: SSL peer shut down incorrectly
BUILD SUCCESSFUL in 3s