spring-projects/spring-boot · error · GradleException
Spring Boot plugin requires Gradle 8.x (8.14 or later) or…
Error message
Spring Boot plugin requires Gradle 8.x (8.14 or later) or 9.x. The current version is {} What it means
Thrown by SpringBootPlugin.verifyGradleVersion during plugin application. It compares GradleVersion.current() against 8.14 and throws a GradleException if the running Gradle is older than 8.14. This is a hard version gate — the plugin refuses to load on incompatible Gradle versions. The message indicates support for Gradle 8.x (8.14+) and 9.x.
Solutions
- Upgrade the Gradle wrapper: run 'gradle wrapper --gradle-version 8.14' (or newer, e.g. 8.14.2 or 9.x).
- If you cannot upgrade Gradle, downgrade the Spring Boot plugin to a version compatible with your Gradle (check the plugin's compatibility matrix).
- Ensure CI uses the wrapper (./gradlew) rather than a system Gradle install so the version gate is satisfied.
- Verify the version in gradle/wrapper/gradle-wrapper.properties after upgrading.
Example fix
// before: gradle-wrapper.properties distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip // after distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.2-bin.zip
Defensive patterns
Strategy: validation
Validate before calling
// In the root build.gradle or settings.gradle, verify Gradle version at configuration time.
import org.gradle.util.GradleVersion
if (GradleVersion.current().compareTo(GradleVersion.version("8.14")) < 0) {
throw new GradleException("This build requires Gradle 8.14+. Current: " + GradleVersion.current())
} Prevention
- Always use the Gradle wrapper (./gradlew) so the version is enforced.
- Set the wrapper version explicitly: 'gradle wrapper --gradle-version 8.14.2'.
- In CI, invoke ./gradlew rather than a system gradle to respect the wrapper version.
When it happens
Trigger: Applying the 'org.springframework.boot' Gradle plugin in a project whose Gradle wrapper or installed Gradle is below version 8.14. The check runs at apply() time, before any task executes.
Common situations: Upgrading the Spring Boot dependency/plugin version without upgrading the Gradle wrapper. A CI environment with an older system Gradle that bypasses the wrapper. A new developer whose local Gradle install is outdated. Forking or pinning an old Gradle version for stability.
Related errors
- Main class name has not been configured and it could not be…
- Each image building cache can be configured only once
- Each image building cache can be configured only once
- Failed to get dir mode from CopySpec
- Failed to get file mode from CopySpec
AI-assisted analysis of spring-projects/spring-boot@270dfe353f (2026-08-11).
Data as JSON: /api/errors/a56e1a4f23eb225c.
Report an issue: GitHub.
Appendix: source
Thrown at build-plugin/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/plugin/SpringBootPlugin.java:129
/**
* The coordinates {@code (group:name:version)} of the
* {@code spring-boot-dependencies} bom.
*/
public static final String BOM_COORDINATES = "org.springframework.boot:spring-boot-dependencies:"
+ SPRING_BOOT_VERSION;
@Override
public void apply(Project project) {
verifyGradleVersion();
createExtension(project);
Configuration bootArchives = createBootArchivesConfiguration(project);
registerPluginActions(project, bootArchives);
}
private void verifyGradleVersion() {
GradleVersion currentVersion = GradleVersion.current();
if (currentVersion.compareTo(GradleVersion.version("8.14")) < 0) {
throw new GradleException("Spring Boot plugin requires Gradle 8.x (8.14 or later) or 9.x. "
+ "The current version is " + currentVersion);
}
}
private void createExtension(Project project) {
project.getExtensions().create("springBoot", SpringBootExtension.class, project);
}
private Configuration createBootArchivesConfiguration(Project project) {
Configuration bootArchives = project.getConfigurations().create(BOOT_ARCHIVES_CONFIGURATION_NAME);
bootArchives.setDescription("Configuration for Spring Boot archive artifacts.");
bootArchives.setCanBeResolved(false);
return bootArchives;
}
private void registerPluginActions(Project project, Configuration bootArchives) {
SinglePublishedArtifact singlePublishedArtifact = new SinglePublishedArtifact(bootArchives,
project.getArtifacts());View on GitHub (pinned to 270dfe353f)