Skip to content

Conversation

@big-andy-coates
Copy link
Collaborator

@big-andy-coates big-andy-coates commented Feb 20, 2024

fixes: #258

Gradle 7.6 is executing tasks in a different order, with mergeClasses being run after compileTestJava. This results in compileTestJava failing as it can't find the module-info.class which is generated by mergeClasses.

Fix looks to be to have the compileTestJava task, i.e. JavaPlugin.COMPILE_TEST_JAVA_TASK_NAME, depend on the mergeClasses task. Thereby ensuring mergeClasses runs first and the module-info.class is available to compileTestJava.

It is possible/likely that the JavaPlugin.TEST_TASK_NAME task, i.e. test task, no longer needs to depend on mergeClasses. However, removing it may cause problems if there are other tasks run by test that require the output of mergeClasses. Of course, those tasks may also run foul of the re-ordering happening with Gradle 7.6.

@big-andy-coates big-andy-coates merged commit 21d10c3 into java9-modularity:master Feb 20, 2024
@big-andy-coates big-andy-coates deleted the gradle_7_6 branch February 20, 2024 13:44
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.

Compatibility issue with Gradle 7.6+

1 participant