@@ -41,6 +41,7 @@ import scala.util.Properties.isJavaAtLeast
4141import org .portablescala .sbtplatformdeps .PlatformDepsPlugin .autoImport ._
4242import org .scalajs .linker .interface .{ModuleInitializer , StandardConfig }
4343
44+
4445object DottyJSPlugin extends AutoPlugin {
4546 import Build ._
4647
@@ -1409,6 +1410,33 @@ object Build {
14091410 )
14101411 )
14111412
1413+ // ==============================================================================================
1414+ // =================================== SCALA STANDARD LIBRARY ===================================
1415+ // ==============================================================================================
1416+
1417+ /* Configuration of the org.scala-lang:scala-library:*.**.**-nonboostrapped project */
1418+ lazy val `scala-library-nonbootstrapped` = project.in(file(" library" ))
1419+ .settings(
1420+ name := " scala-library-nonbootstrapped" ,
1421+ moduleName := " scala-library" ,
1422+ version := dottyNonBootstrappedVersion,
1423+ versionScheme := Some (" semver-spec" ),
1424+ scalaVersion := referenceVersion, // nonbootstrapped artifacts are compiled with the reference compiler (already officially published)
1425+ crossPaths := false , // org.scala-lang:scala-library doesn't have a crosspath
1426+ // NOTE: The only difference here is that we drop `-Werror` and semanticDB for now
1427+ Compile / scalacOptions := Seq (" -deprecation" , " -feature" , " -unchecked" , " -encoding" , " UTF8" , " -language:implicitConversions" ),
1428+ // Add the source directories for the stdlib (non-boostrapped)
1429+ Compile / unmanagedSourceDirectories := Seq (baseDirectory.value / " src" ),
1430+ Compile / unmanagedSourceDirectories += baseDirectory.value / " src-non-bootstrapped" ,
1431+ // Only publish compilation artifacts, no test artifacts
1432+ Compile / publishArtifact := true ,
1433+ Test / publishArtifact := false ,
1434+ // Do not allow to publish this project for now
1435+ publish / skip := true ,
1436+ // Project specific target folder. sbt doesn't like having two projects using the same target folder
1437+ target := target.value / " scala-library-nonbootstrapped" ,
1438+ )
1439+
14121440 def dottyLibrary (implicit mode : Mode ): Project = mode match {
14131441 case NonBootstrapped => `scala3-library`
14141442 case Bootstrapped => `scala3-library-bootstrapped`
0 commit comments