@@ -1471,6 +1471,7 @@ object Build {
14711471 // ==============================================================================================
14721472
14731473 lazy val `scala3-bootstrapped-new` = project
1474+ .enablePlugins(ScriptedPlugin )
14741475 .aggregate(`scala3-interfaces`, `scala3-library-bootstrapped-new` , `scala-library-bootstrapped`,
14751476 `tasty-core-bootstrapped-new`, `scala3-compiler-bootstrapped-new`, `scala3-sbt-bridge-bootstrapped`,
14761477 `scala3-staging-new`, `scala3-tasty-inspector-new`, `scala-library-sjs`, `scala3-library-sjs`, `scaladoc-new`)
@@ -1557,7 +1558,33 @@ object Build {
15571558 (if (args1.nonEmpty) " -Ddotty.tests.filter=" + args1.mkString(" " ) else " " )
15581559 (`scala3-compiler-bootstrapped-new` / Test / testOnly).toTask(cmd)
15591560 }
1560- }.evaluated
1561+ }.evaluated,
1562+ // ================================ SBT SCRIPT TEST SETTINGS ================================
1563+ sbtTestDirectory := (ThisBuild / baseDirectory).value / " sbt-test" ,
1564+ // The batch mode accidentally became the default with no way to disable
1565+ // it in sbt 1.4 (https://github.com/sbt/sbt/issues/5913#issuecomment-716003195).
1566+ // We enable it explicitly here to make it clear that we're using it.
1567+ scriptedBatchExecution := true ,
1568+ scriptedLaunchOpts ++= Seq (
1569+ s " -Dplugin.scalaVersion= ${dottyVersion}" ,
1570+ s " -Dplugin.scala2Version= ${stdlibVersion(Bootstrapped )}" ,
1571+ s " -Dplugin.scalaJSVersion= ${scalaJSVersion}" ,
1572+ ),
1573+ scriptedBufferLog := true ,
1574+ scripted := scripted.dependsOn(
1575+ (`scala3-sbt-bridge-bootstrapped` / publishLocalBin),
1576+ (`scala3-interfaces` / publishLocalBin),
1577+ (`scala3-compiler-bootstrapped-new` / publishLocalBin),
1578+ (`scala3-library-bootstrapped-new` / publishLocalBin),
1579+ (`scala-library-bootstrapped` / publishLocalBin),
1580+ (`scala-library-sjs` / publishLocalBin),
1581+ (`scala3-library-sjs` / publishLocalBin),
1582+ (`tasty-core-bootstrapped-new` / publishLocalBin),
1583+ (`scala3-staging-new` / publishLocalBin),
1584+ (`scala3-tasty-inspector-new` / publishLocalBin),
1585+ (`scaladoc-new` / publishLocalBin),
1586+ publishLocalBin,
1587+ ).evaluated,
15611588 )
15621589
15631590 /* Configuration of the org.scala-lang:scala3-sbt-bridge:*.**.**-bootstrapped project */
@@ -3465,47 +3492,6 @@ object Build {
34653492 BuildInfoPlugin .buildInfoScopedSettings(Test ),
34663493 )
34673494
3468- // various scripted sbt tests
3469- lazy val `sbt-test` = project.in(file(" sbt-test" )).
3470- enablePlugins(ScriptedPlugin ).
3471- settings(commonSettings).
3472- settings(
3473- sbtTestDirectory := baseDirectory.value,
3474- target := baseDirectory.value / " .." / " out" / name.value,
3475-
3476- // The batch mode accidentally became the default with no way to disable
3477- // it in sbt 1.4 (https://github.com/sbt/sbt/issues/5913#issuecomment-716003195).
3478- // We enable it explicitly here to make it clear that we're using it.
3479- scriptedBatchExecution := true ,
3480-
3481- scriptedLaunchOpts ++= Seq (
3482- " -Dplugin.version=" + version.value,
3483- " -Dplugin.scalaVersion=" + dottyVersion,
3484- " -Dplugin.scala2Version=" + stdlibVersion(Bootstrapped ),
3485- " -Dplugin.scalaJSVersion=" + scalaJSVersion,
3486- " -Dsbt.boot.directory=" + ((ThisBuild / baseDirectory).value / " .sbt-scripted" ).getAbsolutePath // Workaround sbt/sbt#3469
3487- ),
3488- // Pass along ivy home and repositories settings to sbt instances run from the tests
3489- scriptedLaunchOpts ++= {
3490- val repositoryPath = (io.Path .userHome / " .sbt" / " repositories" ).absolutePath
3491- s " -Dsbt.repository.config= $repositoryPath" ::
3492- ivyPaths.value.ivyHome.map(" -Dsbt.ivy.home=" + _.getAbsolutePath).toList
3493- },
3494- scriptedBufferLog := true ,
3495- scripted := scripted.dependsOn(
3496- (`scala3-sbt-bridge` / publishLocalBin),
3497- (`scala3-interfaces` / publishLocalBin),
3498- (`scala3-compiler-bootstrapped` / publishLocalBin),
3499- (`scala3-library-bootstrapped` / publishLocalBin),
3500- (`scala3-library-bootstrappedJS` / publishLocalBin),
3501- (`tasty-core-bootstrapped` / publishLocalBin),
3502- (`scala3-staging` / publishLocalBin),
3503- (`scala3-tasty-inspector` / publishLocalBin),
3504- (`scaladoc` / publishLocalBin),
3505- (`scala3-bootstrapped` / publishLocalBin) // Needed because sbt currently hardcodes the dotty artifact
3506- ).evaluated
3507- )
3508-
35093495 val prepareCommunityBuild = taskKey[Unit ](" Publish local the compiler and the sbt plugin. Also store the versions of the published local artefacts in two files, community-build/{scala3-bootstrapped.version,sbt-injected-plugins}." )
35103496
35113497 lazy val `community-build` = project.in(file(" community-build" )).
0 commit comments