Skip to content

feat: add Gradle 9 and JVM 17 support - #216

Merged
maiflai merged 4 commits into
scoverage:masterfrom
ppantisawat:master
Jun 28, 2026
Merged

maiflai merged 4 commits into
scoverage:masterfrom
ppantisawat:master

Conversation

@ppantisawat

Copy link
Copy Markdown

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

Change Fix
JVM 17 hard requirement Bump CI to JDK 17; update wrapper to 9.0.0
Project.getBuildDir() deprecated Replace with project.layout.buildDirectory
Task.getProject() at execution time deprecated Add sourceRoot property to ScoverageReport/ScoverageAggregate; use getLogger() in @TaskAction
TestSuiteType enum removed Drop testType assignment from JvmTestSuite test fixtures
Groovy space-assignment syntax deprecated Fix group/version assignments in build.gradle and composite-build fixtures
Internal org.gradle.internal.impldep API Remove @VisibleForTesting import from CoverageChecker

CI hardening

  • Bump actions/checkout → v4, actions/setup-java → v4
  • Flip the "fail on warning" matrix job from continue-on-error: true → false now that the build is deprecation-free

Verification

./gradlew clean check --warning-mode=fail -PfailOnWarning passes on Gradle 9.0.0 + JDK 17.

- 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
@ppantisawat

Copy link
Copy Markdown
Author

@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.

@maiflai

maiflai commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

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,
stu

Pakanon Pantisawat added 2 commits June 20, 2026 20:39
- 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)
@ppantisawat

Copy link
Copy Markdown
Author

thanks Stu! i've reorganized the commits so the style changes will be in a separated commit.

@maiflai

maiflai commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

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.
@ppantisawat

Copy link
Copy Markdown
Author

yea i forgot one dependency style change migration. it should pass now. thanks stu!

@ppantisawat

Copy link
Copy Markdown
Author

@maiflai please do let me know if there's any other feedback. appreciated!

@maiflai
maiflai merged commit c50f4ed into scoverage:master Jun 28, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants