Skip to content

Compile module descriptors using regular compileJava task #4523

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 10 commits into
base: develop/6.x
Choose a base branch
from

Conversation

marcphilipp
Copy link
Member

Overview

This PR gets rid of the extra JavaCompile tasks called compileModule that were used to compile the module descriptors, moves them to src/main/java, and uses the regular compileJava task to compile them alongside the regular Java sources.


Definition of Done

@marcphilipp marcphilipp added this to the 6.0.0-M1 milestone May 9, 2025
@marcphilipp marcphilipp self-assigned this May 9, 2025
@sormuras sormuras self-requested a review May 9, 2025 19:29
@marcphilipp marcphilipp force-pushed the marc/module-descriptor-compilation-cleanup branch from 0a3778e to 1a50e16 Compare May 9, 2025 19:37
@@ -21,6 +22,11 @@ dependencies {
osgiVerification(projects.junitPlatformLauncher)
}

extraJavaModuleInfo {
automaticModule(libs.univocity.parsers, "univocity.parsers")
Copy link
Member Author

Choose a reason for hiding this comment

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

💬 This is used to add an Automatic-Module-Name manifest to the JAR so Gradle will put it on the module path.

Comment on lines +57 to +58
addStringOption("-add-modules", "univocity.parsers")
addStringOption("-add-reads", "${javaModuleName}=univocity.parsers")
Copy link
Member Author

Choose a reason for hiding this comment

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

💬 Javadoc for individual subprojects now also uses the module path instead of the classpath and hence needs these options as well.

" \"module\": \"junit-jupiter-engine\",", //
" \"version\": {", //
">> VERSION >>", //
" }", //
Copy link
Member Author

Choose a reason for hiding this comment

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

💬 Only the order has changed here

@marcphilipp marcphilipp force-pushed the marc/module-descriptor-compilation-cleanup branch from 881f2eb to 120e8ab Compare May 10, 2025 12:02
@marcphilipp marcphilipp force-pushed the marc/module-descriptor-compilation-cleanup branch from f0a3da4 to 493a827 Compare May 10, 2025 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant