@@ -41,6 +41,7 @@ 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
+
44
45
object DottyJSPlugin extends AutoPlugin {
45
46
import Build ._
46
47
@@ -1411,6 +1412,38 @@ object Build {
1411
1412
)
1412
1413
)
1413
1414
1415
+ // ==============================================================================================
1416
+ // =================================== SCALA STANDARD LIBRARY ===================================
1417
+ // ==============================================================================================
1418
+
1419
+ /* Configuration of the org.scala-lang:scala-library:*.**.**-nonboostrapped project */
1420
+ lazy val `scala-library-nonbootstrapped` = project.in(file(" library" ))
1421
+ .settings(
1422
+ name := " scala-library-nonbootstrapped" ,
1423
+ moduleName := " scala-library" ,
1424
+ version := dottyNonBootstrappedVersion,
1425
+ versionScheme := Some (" semver-spec" ),
1426
+ scalaVersion := referenceVersion, // nonbootstrapped artifacts are compiled with the reference compiler (already officially published)
1427
+ crossPaths := false , // org.scala-lang:scala-library doesn't have a crosspath
1428
+ // NOTE: The only difference here is that we drop `-Werror` and semanticDB for now
1429
+ Compile / scalacOptions := Seq (" -deprecation" , " -feature" , " -unchecked" , " -encoding" , " UTF8" , " -language:implicitConversions" ),
1430
+ // Add the source directories for the stdlib (non-boostrapped)
1431
+ Compile / unmanagedSourceDirectories := Seq (baseDirectory.value / " src" ),
1432
+ Compile / unmanagedSourceDirectories += baseDirectory.value / " src-non-bootstrapped" ,
1433
+ // Only publish compilation artifacts, no test artifacts
1434
+ Compile / publishArtifact := true ,
1435
+ Test / publishArtifact := false ,
1436
+ // Do not allow to publish this project for now
1437
+ publish / skip := true ,
1438
+ // Project specific target folder. sbt doesn't like having two projects using the same target folder
1439
+ target := target.value / " scala-library-nonbootstrapped" ,
1440
+ // TODO HR: Why on earth is this necessary??
1441
+ projectID ~= {id =>
1442
+ val line = " scala.versionLine" -> versionLine
1443
+ id.withExtraAttributes(id.extraAttributes + line)
1444
+ },
1445
+ )
1446
+
1414
1447
def dottyLibrary (implicit mode : Mode ): Project = mode match {
1415
1448
case NonBootstrapped => `scala3-library`
1416
1449
case Bootstrapped => `scala3-library-bootstrapped`
0 commit comments