Skip to content

Migrate build to Gradle 9.4 + JDK25 compatibility tests - PoC#401

Draft
szpak wants to merge 9 commits into
develfrom
fix/gradle9-deprecation-warnings-enh
Draft

Migrate build to Gradle 9.4 + JDK25 compatibility tests - PoC#401
szpak wants to merge 9 commits into
develfrom
fix/gradle9-deprecation-warnings-enh

Conversation

@szpak
Copy link
Copy Markdown
Owner

@szpak szpak commented Apr 1, 2026

Just to test changes in #399. We need to think over, if it doesn't break compatibility with Gradle <9 (8.4+ is still supported). JDK <17 has been no longer officially supported since 1.19.0(-rc.1), so now it's just a formal change (due to the dependencies).

dantte-lp and others added 5 commits April 1, 2026 00:17
- Remove Configuration.visible (deprecated 9.1, no effect since 9.0)
- Use lazy DirectoryProperty.dir() instead of eager .asFile.get() for report dirs
- Remove @CompileDynamic (no longer needed — Gradle <6.0 compat dropped in 1.19.0)
- Replace deprecated afterSuite(Closure) with TestListener interface (deprecated 9.4)

All changes are backward-compatible with Gradle 8.4+.
Supersedes #397 (production code changes only).
- Add .get() on configurations.named() — Groovy 4 stricter Callable<Configuration> coercion
- Make PitestTask abstract — Groovy 4 enforces abstract @Inject methods from JavaExec

Both changes are backward-compatible with Groovy 3 (Gradle 8.x).
- Use named() directly instead of .get() + Callable wrapper (szpak review)
- Conditionally set visible=false only for Gradle <9 (szpak review)
- Remove unused Callable import
As it is used by default in functional tests.
szpak and others added 4 commits April 2, 2026 00:01
- Filter PIT versions < 1.19.0 on JDK 25+ (ASM 9.7 doesn't support class file version 69)
- Skip historyInputLocation test on JDK 25+ (PIT internal error)
- Add JDK 25 → Gradle 9.4.1 entry to Java/Gradle compatibility map
@szpak szpak force-pushed the fix/gradle9-deprecation-warnings-enh branch from e98624f to 9ac7bac Compare April 1, 2026 22:01
//TODO: Add plugin features once available - https://github.com/hcoles/pitest-plugins/issues/2
}

@IgnoreIf({ Runtime.version().feature() >= 25 }) //PIT crashes with historyInputLocation on JDK 25+ (internal error)
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still a problem?

@szpak szpak changed the title Migrate build to Gradle 9.4 - PoC Migrate build to Gradle 9.4 + JDK25 compatibility tests - PoC Apr 7, 2026
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