Convert Custom Test Tasks to Test Suites for Gradle 9 Compatibility #74
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR migrates all custom
Test
tasks to modernJvmTestSuite
to resolve compatibility issues with Gradle 9, where custom Test tasks are marked as "NO-SOURCE" and skipped entirely.Problem
Gradle 9 changed how it handles custom Test tasks, causing them to be marked as "NO-SOURCE" and not executed. This affected 102 build files across the repository that used patterns like:
Solution
Migrated all custom Test tasks to use the modern Test Suites API with
JvmTestSuite
:Before:
After:
Changes Made
by registering(Test::class)
toby registering(JvmTestSuite::class)
targets.all.testTask.configure { }
testing.suites { }
blocksdependsOn(taskName)
todependsOn(testing.suites.named("taskName"))
Impact
Verification
Fixes #73.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.