Skip to content

Commit

Permalink
Set JPMS module version (#713 / #716)
Browse files Browse the repository at this point in the history
Use [Java Library Plugin](https://docs.gradle.org/current/userguide/java_library_plugin.html#declaring_module_versions)
to set `javaModuleVersion` when releasing.

Closes #713
PR: #716
  • Loading branch information
Bukama committed Feb 19, 2023
1 parent 10b91cb commit 3f8392f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,11 @@ tasks {
options.compilerArgs.add("-Werror")
// Do not break the build on "exports" warnings (see CONTRIBUTING.md for details)
options.compilerArgs.add("-Xlint:all,-exports")

if (project.version != "unspecified") {
// Add version to Java modules
options.javaModuleVersion.set(project.version.toString());
}
}

// Prepares test-related JVM args
Expand Down

0 comments on commit 3f8392f

Please sign in to comment.