Starting Build
Caching disabled for Kotlin DSL script compilation (Settings/TopLevel/stage1) because:
Build cache is disabled
Caching disabled for Kotlin DSL script compilation (Settings/TopLevel/stage2) because:
Build cache is disabled
Settings evaluated using settings file '/Users/Ms@hh.com/Desktop/SnapshotService/demo/settings.gradle.kts'.
Projects loaded. Root project using build file '/Users/Ms@hh.com/Desktop/SnapshotService/demo/build.gradle.kts'.
Included projects: [root project 'root-project']
> Configure project :
Evaluating root project 'root-project' using build file '/Users/Ms@hh.com/Desktop/SnapshotService/demo/build.gradle.kts'.
Caching disabled for Kotlin DSL script compilation (Project/TopLevel/stage1) because:
Build cache is disabled
FAILURE: Build failed with an exception. I'm thinking why the build should go suddenly informing build cache disabled but I didn't do this intentionally.
Plugin in the settings script is anyway wrong, even if it would have been found, application will fail as it is a project plugin that needs to be applied in your build script, not a settings plugin. Removed plugin from settings.gradle.kts and the situation is similar.
Having mavenCentral()
before gradlePluginPortal()
- mavenCentral() moved to first place now after understanding why it should be scanned first. Thanks
* What went wrong:
Could not resolve all artifacts for configuration 'classpath'.
> Could not resolve com.gradle:gradle-enterprise-gradle-plugin:3.16.2.
Required by:
unspecified:unspecified:unspecified
> Could not resolve com.gradle:gradle-enterprise-gradle-plugin:3.16.2.
> Could not get resource 'https://repo.maven.apache.org/maven2/com/gradle/gradle-enterprise-gradle-plugin/3.16.2/gradle-enterprise-gradle-plugin-3.16.2.pom'.
> Could not GET 'https://repo.maven.apache.org/maven2/com/gradle/gradle-enterprise-gradle-plugin/3.16.2/gradle-enterprise-gradle-plugin-3.16.2.pom'.
> Got SSL handshake exception during request. It might be caused by SSL misconfiguration
> PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
> Could not resolve com.gradle:gradle-enterprise-gradle-plugin:3.16.2.
> Could not get resource 'https://plugins.gradle.org/m2/com/gradle/gradle-enterprise-gradle-plugin/3.16.2/gradle-enterprise-gradle-plugin-3.16.2.pom'.
> Could not GET 'https://plugins.gradle.org/m2/com/gradle/gradle-enterprise-gradle-plugin/3.16.2/gradle-enterprise-gradle-plugin-3.16.2.pom'.
> Got SSL handshake exception during request. It might be caused by SSL misconfiguration
> PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
I tried to build with out VPN connection but I still stay with the same issue of
Plugin [id: 'org.jetbrains.kotlin.jvm'] was not found in any of the following sources:
gradle build info
That’s using the installed Gradle version which I said you should not use to execute a build, but always the Gradle wrapper gradlew
that is part of the project 
“Build cache is disabled all the way down and the process terminates”. Is that gives any clue here?
The build cache is not enabled by default, that is just an informational warning and not any cause for build failure. See Build Cache for further information.
PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
This means the HTTPS connection cannot be done securely.
This can have many reasons, for example a man-in-the-middle attack, or some portal page showing instead of the real response, or broken certificates in the Java you use to run Gradle, …
To really investigate you would need to enable javax.net.debug
logging and be able to interpret the output.
I installed gradle manually through homebrew. should not I install manually if the gradle project is imported from other repo? If already installed, should I uninstall now. I keep getting the below issue. Java home version is pointing to /Users/M@i.com/Library/Java/JavaVirtualMachines/corretto-17.0.9/Contents/Home. If I select gradle to be controlled from IntelliJ in the screenshot then won’t that be controlled from the IDE? can you please clear my confusion? Thanks.
Could not open init generic class cache for initialization script ‘/private/var/folders/n1/qd4ndth54tzfcqnsp6lnnhl00000gq/T/wrapper_init9.gradle’ (/Users/M@g.com/Downloads/gradle-8.6/bin/caches/8.6/scripts/49u46auhyi0mkz3oj0077s53o).
BUG! exception in phase ‘semantic analysis’ in source unit ‘BuildScript’ Unsupported class file major version 66
I installed gradle manually through homebrew. should not I install manually if the gradle project is imported from other repo?
As I said, you practically never need any installed Gradle version, and especially not if you just try to build an existing project.
If already installed, should I uninstall now.
Doesn’t matter, as long as you do not use it.
If you call gradle ...
you do use it.
Never do that, always use ./gradlew ...
.
I keep getting the below issue. Java home version is pointing to /Users/M@i.com/Library/Java/JavaVirtualMachines/corretto-17.0.9/Contents/Home. If I select gradle to be controlled from IntelliJ in the screenshot then won’t that be controlled from the IDE? can you please clear my confusion? Thanks.
Yes, the option in the screenshot controls the version used to run Gradle.
One option is to use JAVA_HOME, but that’s not what you selected, you selected to use the Project JDK which is Java 22.
And the error complains about exactly that, as you try to run Gradle 8.6 with Java 22 which is not supported: Compatibility Matrix
No, not at all.
From 8.7 on you can use Java 22 as toolchain.
There is not Gradle version that can be run with Java 22 yet.
Gradle 8.6 can use up to Java 21 as a toolchain and up to Java 19 to run it with.