Repository navigation
feat: add Gradle 9 and JVM 17 support - #216
Conversation
- Replace project.buildDir with layout.buildDirectory to remove deprecated API (warns under --warning-mode=fail) - Add sourceRoot property to ScoverageReport/ScoverageAggregate; use getLogger() in @TaskAction to avoid deprecated Task.getProject() at execution time - Remove org.gradle.internal.impldep @VisibleForTesting import - Fix Groovy space-assignment syntax (group/version) in build.gradle and composite-build fixtures — deprecated in Gradle 9 - Remove testType = TestSuiteType.INTEGRATION_TEST from JvmTestSuite fixtures; both property and enum removed in Gradle 9 - Bump wrapper to 9.0.0, CI to JDK 17 (hard runtime requirement) - Flip CI fail-on-warning job to continue-on-error: false now that build is clean
|
@maiflai I understand that this repo is not much actively maintained so I am opting to contribute for Gradle 9.0 support. Please feel free to request for changes and I would appreciate the feedback. |
|
thanks very much, it will take me a little while to review the 41 files. I'll try to get it done over the weekend. at a first glance I think many of these are style changes for dependency declaration? In future it might be cleaner to do those in a separate commit. thanks again, |
- Gradle 9.6 no longer bundles Groovy/slf4j in test worker classpath; declare localGroovy() and gradleApi() explicitly - ScoverageAggregate requires @CacheableTask or @DisableCachingByDefault (validatePlugins hard error in 9.6) - io.spring.dependency-management 1.1.5 triggers module_identity_for_root_component deprecation; bump to 1.1.7 - Replace project.properties.containsKey / getProperties().get() with hasProperty / findProperty (getProperties() deprecated in 9.6)
|
thanks Stu! i've reorganized the commits so the style changes will be in a separated commit. |
|
sorry, looks like the functional tests might be broken? (I've not tried to run these locally yet) |
Convert the remaining group/name dependency declarations missed in the prior pass so the fail-on-warning CI job passes on Gradle 9.6.
|
yea i forgot one dependency style change migration. it should pass now. thanks stu! |
|
@maiflai please do let me know if there's any other feedback. appreciated! |
Summary
Migrates the plugin build to Gradle 9.0 + JVM 17 and fixes all Gradle 9
breaking changes and deprecations. The published plugin remains compatible
with Gradle 8.x consumers — none of the fixes require Gradle 9-only APIs.
Breaking changes in Gradle 9 addressed
Project.getBuildDir()deprecatedproject.layout.buildDirectoryTask.getProject()at execution time deprecatedsourceRootproperty toScoverageReport/ScoverageAggregate; usegetLogger()in@TaskActionTestSuiteTypeenum removedtestTypeassignment fromJvmTestSuitetest fixturesgroup/versionassignments inbuild.gradleand composite-build fixturesorg.gradle.internal.impldepAPI@VisibleForTestingimport fromCoverageCheckerCI hardening
actions/checkout→ v4,actions/setup-java→ v4continue-on-error: true→falsenow that the build is deprecation-freeVerification
./gradlew clean check --warning-mode=fail -PfailOnWarningpasses on Gradle 9.0.0 + JDK 17.