Skip to content

Add Automatic-Module-Names to MANIFEST.MF files of projects with suffix_3 #12903

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

Merged
merged 2 commits into from
Jun 24, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions project/Build.scala
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,13 @@ object Build {
// If someone puts a source file at the root (e.g., for manual testing),
// don't pick it up as part of any project.
sourcesInBase := 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 _3 suffix.
Compile / packageBin / packageOptions +=
Package.ManifestAttributes(
"Automatic-Module-Name" -> s"${dottyOrganization.replaceAll("-",".")}.${moduleName.value.replaceAll("-",".")}"
)
)

// Settings used for projects compiled only with Java
Expand Down