@@ -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,36 @@ 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
+ versionScheme := Some (" semver-spec" ),
1155
+ scalaVersion := referenceVersion, // sbt 1.x defaults to Scala 2.12.*. Therefore, resolution below tries to resolve scala3-library_2.12
1156
+ crossPaths := false , // org.scala-lang:scala-library doesn't have a crosspath
1157
+ libraryDependencies := Seq (organization.value %% " scala3-library" % version.value),
1158
+ // Do not allow any sources or resources (managed or not, compilation or test) for this project
1159
+ Compile / sources := Seq .empty,
1160
+ Compile / resources := Seq .empty,
1161
+ Test / sources := Seq .empty,
1162
+ Test / resources := Seq .empty,
1163
+ Compile / compile := {
1164
+ streams.value.log.error(s " Compiling project ${name.value} is disabled. Please consider compiling ${(`scala3-library-bootstrapped` / name).value} instead. " )
1165
+ Analysis .Empty
1166
+ },
1167
+ // Only publish a .pom, no need to publish empty artifacts
1168
+ Compile / publishArtifact := false ,
1169
+ Test / publishArtifact := false ,
1170
+ // Make sure this project is not publishable. This will change starting from 3.8.0
1171
+ publish / skip := true ,
1172
+ )
1173
+
1174
+
1143
1175
def dottyLibrary (implicit mode : Mode ): Project = mode match {
1144
1176
case NonBootstrapped => `scala3-library`
1145
1177
case Bootstrapped => `scala3-library-bootstrapped`
0 commit comments