Add gradle9 module: Spring Boot 4 build migrated from Gradle 8 to Gradle 9

Co-Authored-By: Claude Sonnet 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Gth99spB1CzQmBFofXmU4Z
This commit is contained in:
2026-09-28 09:00:03 +00:00
co-authored by Claude Sonnet 5
parent b4b43b94bf
commit 804c33f0d5
25 changed files with 689 additions and 0 deletions
+11
View File
@@ -0,0 +1,11 @@
$ gradle --version (Gradle 8)
Gradle 8.14.3
Kotlin: 2.0.21
Groovy: 3.0.24
Launcher JVM: 21.0.10 (Ubuntu 21.0.10+7-Ubuntu-124.04)
$ gradle --version (Gradle 9)
Gradle 9.8.0
Kotlin: 2.4.10
Groovy: 4.0.33
Launcher JVM: 25.0.4.1 (Eclipse Adoptium 25.0.4.1+1-LTS)
+14
View File
@@ -0,0 +1,14 @@
$ gradle build --warning-mode all # Gradle 8.14.3, JDK 21, legacy Groovy build
Build file 'WORK/a/build.gradle': line 9
The org.gradle.api.plugins.JavaPluginConvention type has been deprecated. This is scheduled to be removed in Gradle 9.0. Consult the upgrading guide for further information: https://docs.gradle.org/8.14.3/userguide/upgrading_version_8.html#java_convention_deprecation
at build_dlrldupk0ke03lzjij3dzgrv1.run(WORK/a/build.gradle:9)
(Run with --stacktrace to get the full stack trace of this deprecation warning.)
Build file 'WORK/a/build.gradle': line 10
The org.gradle.api.plugins.BasePluginConvention type has been deprecated. This is scheduled to be removed in Gradle 9.0. Consult the upgrading guide for further information: https://docs.gradle.org/8.14.3/userguide/upgrading_version_8.html#base_convention_deprecation
at build_dlrldupk0ke03lzjij3dzgrv1.run(WORK/a/build.gradle:10)
(Run with --stacktrace to get the full stack trace of this deprecation warning.)
Build file 'WORK/a/build.gradle': line 10
The BasePluginExtension.archivesBaseName property has been deprecated. This is scheduled to be removed in Gradle 9.0. Please use the archivesName property instead. For more information, please refer to https://docs.gradle.org/8.14.3/dsl/org.gradle.api.plugins.BasePluginExtension.html#org.gradle.api.plugins.BasePluginExtension:archivesName in the Gradle documentation.
at build_dlrldupk0ke03lzjij3dzgrv1.run(WORK/a/build.gradle:10)
(Run with --stacktrace to get the full stack trace of this deprecation warning.)
BUILD SUCCESSFUL
@@ -0,0 +1,5 @@
$ gradle build # Gradle 9.8.0, JDK 25, same legacy build, unchanged
Build file 'WORK/b/build.gradle' line: 9
* What went wrong:
> Could not set unknown property 'sourceCompatibility' for root project 'g9demo' of type org.gradle.api.Project.
BUILD FAILED
@@ -0,0 +1,5 @@
$ gradle build # after replacing sourceCompatibility = '17' with java { sourceCompatibility = ... }
Build file 'WORK/c/build.gradle' line: 10
* What went wrong:
> Could not set unknown property 'archivesBaseName' for root project 'g9demo' of type org.gradle.api.Project.
BUILD FAILED
@@ -0,0 +1,6 @@
$ gradle build buildInfo --warning-mode all # both removals fixed
Build file 'WORK/d/build.gradle': line 25
Invocation of Task.project at execution time has been deprecated. This will fail with an error in Gradle 10. This API is incompatible with the configuration cache, which will become the only mode supported by Gradle in a future release. Consult the upgrading guide for further information: https://docs.gradle.org/9.8.0/userguide/upgrading_version_7.html#task_project
at build_9kjx5jbekfxgd2u4kdta23gdc$_run_closure5$_closure7.doCall$original(WORK/d/build.gradle:25)
(Run with --stacktrace to get the full stack trace of this deprecation warning.)
BUILD SUCCESSFUL
@@ -0,0 +1,11 @@
$ gradle buildInfo --configuration-cache # same fixed legacy build
> Task :buildInfo FAILED
1 problem was found storing the configuration cache.
- Build file 'build.gradle': line 25: invocation of 'Task.project' at execution time is unsupported with the configuration cache.
[Incubating] Problems report is available at: file://WORK/d/build/reports/problems/problems-report.html
Build file 'WORK/d/build.gradle' line: 25
* What went wrong:
Execution failed for task ':buildInfo' (registered in build file 'build.gradle').
> Invocation of 'Task.project' by task ':buildInfo' at execution time is unsupported with the configuration cache.
BUILD FAILED
Configuration cache entry discarded with 1 problem.
@@ -0,0 +1,21 @@
$ ./gradlew buildInfo test --configuration-cache # migrated build, first run
> Task :buildInfo
> Task :testClasses
> Task :test
BUILD SUCCESSFUL
Configuration cache entry stored.
$ ./gradlew buildInfo test --configuration-cache # second run
Reusing configuration cache.
> Task :buildInfo UP-TO-DATE
> Task :testClasses UP-TO-DATE
> Task :test UP-TO-DATE
BUILD SUCCESSFUL
Configuration cache entry reused.
$ BUILD_STAMP=ci42 ./gradlew buildInfo --configuration-cache # env var changed
BUILD SUCCESSFUL
Configuration cache entry stored.
$ cat build/build-info.txt
g9demo 0.0.1 ci42
+10
View File
@@ -0,0 +1,10 @@
$ ./gradlew build # migrated build on the Gradle wrapper (9.8.0), tests included
> Task :bootJar
> Task :testClasses
> Task :test
BUILD SUCCESSFUL
7 actionable tasks: 7 executed
$ ls build/libs
g9demo-0.0.1-plain.jar
g9demo-0.0.1.jar
+10
View File
@@ -0,0 +1,10 @@
$ gradle build # Gradle 8.14.3 on JDK 25 (launcher JVM), migrated build
FAILURE: Build failed with an exception.
* What went wrong:
25.0.4.1
* 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