@@ -751,9 +751,18 @@ object Build {
751
751
def dottyCompilerSettings (implicit mode : Mode ): sbt.Def .SettingsDefinition =
752
752
if (mode == NonBootstrapped ) nonBootstrapedDottyCompilerSettings else bootstrapedDottyCompilerSettings
753
753
754
- lazy val `scala3-compiler` = project.in(file(" compiler" )).asDottyCompiler(NonBootstrapped )
755
- lazy val `scala3-compiler-bootstrapped` = project.in(file(" compiler" )).asDottyCompiler(Bootstrapped )
756
-
754
+ lazy val `scala3-compiler` = project.in(file(" compiler" )).
755
+ asDottyCompiler(NonBootstrapped ).
756
+ settings(
757
+ Compile / packageBin / packageOptions +=
758
+ Package .ManifestAttributes (" Automatic-Module-Name" -> s " $dottyOrganization- ${name.value}" )
759
+ )
760
+ lazy val `scala3-compiler-bootstrapped` = project.in(file(" compiler" )).
761
+ asDottyCompiler(Bootstrapped ).
762
+ settings(
763
+ Compile / packageBin / packageOptions +=
764
+ Package .ManifestAttributes (" Automatic-Module-Name" -> s " $dottyOrganization- ${name.value}" )
765
+ )
757
766
def dottyCompiler (implicit mode : Mode ): Project = mode match {
758
767
case NonBootstrapped => `scala3-compiler`
759
768
case Bootstrapped => `scala3-compiler-bootstrapped`
@@ -767,8 +776,18 @@ object Build {
767
776
),
768
777
)
769
778
770
- lazy val `scala3-library` = project.in(file(" library" )).asDottyLibrary(NonBootstrapped )
771
- lazy val `scala3-library-bootstrapped` : Project = project.in(file(" library" )).asDottyLibrary(Bootstrapped )
779
+ lazy val `scala3-library` = project.in(file(" library" )).
780
+ asDottyLibrary(NonBootstrapped ).
781
+ settings(
782
+ Compile / packageBin / packageOptions +=
783
+ Package .ManifestAttributes (" Automatic-Module-Name" -> s " $dottyOrganization- ${name.value}" )
784
+ )
785
+ lazy val `scala3-library-bootstrapped` : Project = project.in(file(" library" )).
786
+ asDottyLibrary(Bootstrapped ).
787
+ settings(
788
+ Compile / packageBin / packageOptions +=
789
+ Package .ManifestAttributes (" Automatic-Module-Name" -> s " $dottyOrganization- ${name.value}" )
790
+ )
772
791
773
792
def dottyLibrary (implicit mode : Mode ): Project = mode match {
774
793
case NonBootstrapped => `scala3-library`
@@ -792,6 +811,8 @@ object Build {
792
811
(" org.scala-js" %% " scalajs-library" % scalaJSVersion).cross(CrossVersion .for3Use2_13),
793
812
Compile / unmanagedSourceDirectories ++=
794
813
(`scala3-library-bootstrapped` / Compile / unmanagedSourceDirectories).value,
814
+ Compile / packageBin / packageOptions +=
815
+ Package .ManifestAttributes (" Automatic-Module-Name" -> s " $dottyOrganization- ${name.value}" ),
795
816
796
817
// Configure the source maps to point to GitHub for releases
797
818
scalacOptions ++= {
@@ -813,9 +834,24 @@ object Build {
813
834
scalacOptions += " -source:3.0-migration"
814
835
)
815
836
816
- lazy val `tasty-core` = project.in(file(" tasty" )).asTastyCore(NonBootstrapped )
817
- lazy val `tasty-core-bootstrapped` : Project = project.in(file(" tasty" )).asTastyCore(Bootstrapped )
818
- lazy val `tasty-core-scala2` : Project = project.in(file(" tasty" )).asTastyCoreScala2
837
+ lazy val `tasty-core` = project.in(file(" tasty" )).
838
+ asTastyCore(NonBootstrapped ).
839
+ settings(
840
+ Compile / packageBin / packageOptions +=
841
+ Package .ManifestAttributes (" Automatic-Module-Name" -> s " $dottyOrganization- ${name.value}" )
842
+ )
843
+ lazy val `tasty-core-bootstrapped` : Project = project.in(file(" tasty" )).
844
+ asTastyCore(Bootstrapped ).
845
+ settings(
846
+ Compile / packageBin / packageOptions +=
847
+ Package .ManifestAttributes (" Automatic-Module-Name" -> s " $dottyOrganization- ${name.value}" )
848
+ )
849
+ lazy val `tasty-core-scala2` : Project = project.in(file(" tasty" )).
850
+ asTastyCoreScala2.
851
+ settings(
852
+ Compile / packageBin / packageOptions +=
853
+ Package .ManifestAttributes (" Automatic-Module-Name" -> s " $dottyOrganization- ${name.value}" )
854
+ )
819
855
820
856
def tastyCore (implicit mode : Mode ): Project = mode match {
821
857
case NonBootstrapped => `tasty-core`
@@ -829,7 +865,9 @@ object Build {
829
865
// but we always need it to be present on the JVM classpath at runtime.
830
866
dependsOn(dottyCompiler(Bootstrapped ) % " provided; compile->runtime; test->test" ).
831
867
settings(
832
- javaOptions := (`scala3-compiler-bootstrapped` / javaOptions).value
868
+ javaOptions := (`scala3-compiler-bootstrapped` / javaOptions).value,
869
+ Compile / packageBin / packageOptions +=
870
+ Package .ManifestAttributes (" Automatic-Module-Name" -> s " $dottyOrganization- ${name.value}" )
833
871
)
834
872
835
873
lazy val `scala3-tasty-inspector` = project.in(file(" tasty-inspector" )).
@@ -839,7 +877,9 @@ object Build {
839
877
// but we always need it to be present on the JVM classpath at runtime.
840
878
dependsOn(dottyCompiler(Bootstrapped ) % " provided; compile->runtime; test->test" ).
841
879
settings(
842
- javaOptions := (`scala3-compiler-bootstrapped` / javaOptions).value
880
+ javaOptions := (`scala3-compiler-bootstrapped` / javaOptions).value,
881
+ Compile / packageBin / packageOptions +=
882
+ Package .ManifestAttributes (" Automatic-Module-Name" -> s " $dottyOrganization- ${name.value}" )
843
883
)
844
884
845
885
/** Scala library compiled by dotty using the latest published sources of the library */
@@ -999,6 +1039,8 @@ object Build {
999
1039
// Work around https://github.com/eclipse/lsp4j/issues/295
1000
1040
dependencyOverrides += " org.eclipse.xtend" % " org.eclipse.xtend.lib" % " 2.16.0" ,
1001
1041
javaOptions := (`scala3-compiler-bootstrapped` / javaOptions).value,
1042
+ Compile / packageBin / packageOptions +=
1043
+ Package .ManifestAttributes (" Automatic-Module-Name" -> s " $dottyOrganization- ${name.value}" ),
1002
1044
1003
1045
run := Def .inputTaskDyn {
1004
1046
val inputArgs = spaceDelimited(" <arg>" ).parsed
@@ -1302,6 +1344,8 @@ object Build {
1302
1344
Compile / mainClass := Some (" dotty.tools.scaladoc.Main" ),
1303
1345
Compile / buildInfoKeys := Seq [BuildInfoKey ](version),
1304
1346
Compile / buildInfoPackage := " dotty.tools.scaladoc" ,
1347
+ Compile / packageBin / packageOptions +=
1348
+ Package .ManifestAttributes (" Automatic-Module-Name" -> s " $dottyOrganization- ${name.value}" ),
1305
1349
BuildInfoPlugin .buildInfoScopedSettings(Compile ),
1306
1350
BuildInfoPlugin .buildInfoDefaultSettings,
1307
1351
0 commit comments