Skip to content

Commit

Permalink
Added Automatic-Module-Name to JAR manifest (zio#6843)
Browse files Browse the repository at this point in the history
  • Loading branch information
ajaychandran authored May 25, 2022
1 parent d80b62d commit a187097
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion project/BuildHelper.scala
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,13 @@ object BuildHelper {
autoAPIMappings := true,
unusedCompileDependenciesFilter -= moduleFilter("org.scala-js", "scalajs-library"),
Compile / fork := true,
Test / fork := false
Test / fork := false,
// For compatibility with Java 9+ module system;
// without Automatic-Module-Name, the module name is derived from the jar file which is invalid because of the scalaVersion suffix.
Compile / packageBin / packageOptions +=
Package.ManifestAttributes(
"Automatic-Module-Name" -> s"${organization.value}.$prjName".replaceAll("-", ".")
)
)

def macroExpansionSettings = Seq(
Expand Down

0 comments on commit a187097

Please sign in to comment.