C:UsersfirstJavaProject>gradle build
FAILURE: Build failed with an exception.
- Where:
Settings file 'C:UsersfirstJavaProjectsettings.gradle' line: 20
- What went wrong:
Plugin [id: ‘org.gradle.toolchains.foojay-resolver-convention’, version: ‘0.4.0’] was not found in any of the following sources:
- Gradle Core Plugins (plugin is not in ‘org.gradle’ namespace)
- Plugin Repositories (could not resolve plugin artifact ‘org.gradle.toolchains.foojay-resolver-convention:org.gradle.toolchains.foojay-resolver-convention.gradle.plugin:0.4.0’)
Searched in the following repositories:
Gradle Central Plugin Repository
Google
MavenRepo
- 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 813ms
I have tried using plugin management
Seems it doesn’t work in my case, here are my configurations:
Java version: “java 17.0.12 2024-07-16 LTS”
Gradle version: Gradle 8.1.1
settings.gradle file:
plugins {
// Apply the foojay-resolver plugin to allow automatic download of JDKs
id 'org.gradle.toolchains.foojay-resolver-convention' version '0.4.0'
}