Tidy up test migration and fix Gradle 9 test compatibility#1630
Open
Tidy up test migration and fix Gradle 9 test compatibility#1630
Conversation
…the new Java Junit framework
…rationSpec` to the new Java Junit framework
writeVersionsLocks
…dle-testing-junit-framework-a6415fc369dfdcc8
…work-36debc64a3cf516f
check-unused-constraints
error-prone-apply-suppress
…dle-testing-junit-framework-a6415fc369dfdcc8
…nit-framework-36debc64a3cf516f' into finlayw/tidy-up
- Remove nebula-test dependency (no longer needed after migration) - Add Gradle 7 and 9 to test matrix - Fix ConfigurationOnDemandTest for Gradle 9 cross-project resolution - Fix file URI and property handling in migrated tests
Generate changelog in
|
✅ Successfully generated changelog entry!Need to regenerate?Simply interact with the changelog bot comment again to regenerate these entries. 📋Changelog Preview💡 Improvements
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Important
Depends on #1506 and #1538 being merged first.
Before this PR
There were some rough edges left over from the test migration that needed tidying up, and
ConfigurationOnDemandTesthad a test that fails on Gradle 9.The
transitive_dependencies_cause_upstream_projects_to_be_configured_sufficiently_earlytest resolved another project's configuration directly from a task action:This cross-project configuration resolution is no longer allowed in Gradle 9:
After this PR
==COMMIT_MSG==
Fix Gradle 9 compatibility in
ConfigurationOnDemandTestand tidy up the test migration==COMMIT_MSG==
The
writeClasspathOfAtask is removed. Instead, the test uses the existingwriteClasspathtask onprojectC(registered for all subprojects in@BeforeEach), which resolvesprojectC's ownruntimeClasspath. SinceprojectC -> projectB -> projectA, the transitive dependencytransitive-test-depis still present and the version constraint from the lock file (1.1.0rather than1.0.0) is still validated.Other tidy-ups:
nebula-testdependency (no longer needed after migration)gradle-test-versions.yml@AdditionallyRunWithGradle("9.3.0")fromCheckUnusedConstraintIntegrationTest(covered by the test matrix now)file:///URI touri()inVersionsPropsPluginIntegrationTestsee Add explicit callout to useuri("%s")instead of rawfile:///URLs gradle-plugin-testing#416 for reasoningPossible downsides?