@@ -41,6 +41,8 @@ import scala.util.Properties.isJavaAtLeast
41
41
import org .portablescala .sbtplatformdeps .PlatformDepsPlugin .autoImport ._
42
42
import org .scalajs .linker .interface .{ModuleInitializer , StandardConfig }
43
43
44
+ import sbt .internal .inc .Analysis
45
+
44
46
object DottyJSPlugin extends AutoPlugin {
45
47
import Build ._
46
48
@@ -1140,6 +1142,35 @@ object Build {
1140
1142
lazy val `scala3-library` = project.in(file(" library" )).asDottyLibrary(NonBootstrapped )
1141
1143
lazy val `scala3-library-bootstrapped` : Project = project.in(file(" library" )).asDottyLibrary(Bootstrapped )
1142
1144
1145
+ /* Configuration of the org.scala-lang:scala-library:*.**.** project
1146
+ * NOTES: - This project only exists as a POM, it should not be used as a dependency to any other sbt project here
1147
+ * - The only commands you should run on this project are `publish` and `publishLocal`
1148
+ * - This project produces no artifacts and has no sources
1149
+ */
1150
+ lazy val `scala-library` = project.in(file(" scala-library" ))
1151
+ .settings(
1152
+ name := " scala-library" ,
1153
+ version := dottyVersion, // Keep the same version as the current Scala version
1154
+ scalaVersion := referenceVersion, // sbt 1.x defaults to Scala 2.12.*. Therefore, resolution below tries to resolve scala3-library_2.12
1155
+ crossPaths := false , // org.scala-lang:scala-library doesn't have a crosspath
1156
+ libraryDependencies := Seq (organization.value %% " scala3-library" % version.value),
1157
+ // Do not allow any sources or resources (managed or not, compilation or test) for this project
1158
+ Compile / sources := Seq .empty,
1159
+ Compile / resources := Seq .empty,
1160
+ Test / sources := Seq .empty,
1161
+ Test / resources := Seq .empty,
1162
+ Compile / compile := {
1163
+ streams.value.log.error(s " Compiling project ${name.value} is disabled. Please consider compiling ${(`scala3-library-bootstrapped` / name).value} instead. " )
1164
+ Analysis .Empty
1165
+ },
1166
+ // Only publish a .pom, no need to publish empty artifacts
1167
+ Compile / publishArtifact := false ,
1168
+ Test / publishArtifact := false ,
1169
+ // Make sure this project is not publishable. This will change starting from 3.8.0
1170
+ publish / skip := true ,
1171
+ )
1172
+
1173
+
1143
1174
def dottyLibrary (implicit mode : Mode ): Project = mode match {
1144
1175
case NonBootstrapped => `scala3-library`
1145
1176
case Bootstrapped => `scala3-library-bootstrapped`
0 commit comments