@@ -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 */
@@ -3507,47 +3534,6 @@ object Build {
35073534 BuildInfoPlugin .buildInfoScopedSettings(Test ),
35083535 )
35093536
3510- // various scripted sbt tests
3511- lazy val `sbt-test` = project.in(file(" sbt-test" )).
3512- enablePlugins(ScriptedPlugin ).
3513- settings(commonSettings).
3514- settings(
3515- sbtTestDirectory := baseDirectory.value,
3516- target := baseDirectory.value / " .." / " out" / name.value,
3517-
3518- // The batch mode accidentally became the default with no way to disable
3519- // it in sbt 1.4 (https://github.com/sbt/sbt/issues/5913#issuecomment-716003195).
3520- // We enable it explicitly here to make it clear that we're using it.
3521- scriptedBatchExecution := true ,
3522-
3523- scriptedLaunchOpts ++= Seq (
3524- " -Dplugin.version=" + version.value,
3525- " -Dplugin.scalaVersion=" + dottyVersion,
3526- " -Dplugin.scala2Version=" + stdlibVersion(Bootstrapped ),
3527- " -Dplugin.scalaJSVersion=" + scalaJSVersion,
3528- " -Dsbt.boot.directory=" + ((ThisBuild / baseDirectory).value / " .sbt-scripted" ).getAbsolutePath // Workaround sbt/sbt#3469
3529- ),
3530- // Pass along ivy home and repositories settings to sbt instances run from the tests
3531- scriptedLaunchOpts ++= {
3532- val repositoryPath = (io.Path .userHome / " .sbt" / " repositories" ).absolutePath
3533- s " -Dsbt.repository.config= $repositoryPath" ::
3534- ivyPaths.value.ivyHome.map(" -Dsbt.ivy.home=" + _.getAbsolutePath).toList
3535- },
3536- scriptedBufferLog := true ,
3537- scripted := scripted.dependsOn(
3538- (`scala3-sbt-bridge` / publishLocalBin),
3539- (`scala3-interfaces` / publishLocalBin),
3540- (`scala3-compiler-bootstrapped` / publishLocalBin),
3541- (`scala3-library-bootstrapped` / publishLocalBin),
3542- (`scala3-library-bootstrappedJS` / publishLocalBin),
3543- (`tasty-core-bootstrapped` / publishLocalBin),
3544- (`scala3-staging` / publishLocalBin),
3545- (`scala3-tasty-inspector` / publishLocalBin),
3546- (`scaladoc` / publishLocalBin),
3547- (`scala3-bootstrapped` / publishLocalBin) // Needed because sbt currently hardcodes the dotty artifact
3548- ).evaluated
3549- )
3550-
35513537 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}." )
35523538
35533539 lazy val `community-build` = project.in(file(" community-build" )).
0 commit comments