@@ -1473,6 +1473,7 @@ object Build {
14731473 // ==============================================================================================
14741474
14751475 lazy val `scala3-bootstrapped-new` = project
1476+ .enablePlugins(ScriptedPlugin )
14761477 .aggregate(`scala3-interfaces`, `scala3-library-bootstrapped-new` , `scala-library-bootstrapped`,
14771478 `tasty-core-bootstrapped-new`, `scala3-compiler-bootstrapped-new`, `scala3-sbt-bridge-bootstrapped`,
14781479 `scala3-staging-new`, `scala3-tasty-inspector-new`, `scala-library-sjs`, `scala3-library-sjs`, `scaladoc-new`)
@@ -1559,7 +1560,33 @@ object Build {
15591560 (if (args1.nonEmpty) " -Ddotty.tests.filter=" + args1.mkString(" " ) else " " )
15601561 (`scala3-compiler-bootstrapped-new` / Test / testOnly).toTask(cmd)
15611562 }
1562- }.evaluated
1563+ }.evaluated,
1564+ // ================================ SBT SCRIPT TEST SETTINGS ================================
1565+ sbtTestDirectory := (ThisBuild / baseDirectory).value / " sbt-test" ,
1566+ // The batch mode accidentally became the default with no way to disable
1567+ // it in sbt 1.4 (https://github.com/sbt/sbt/issues/5913#issuecomment-716003195).
1568+ // We enable it explicitly here to make it clear that we're using it.
1569+ scriptedBatchExecution := true ,
1570+ scriptedLaunchOpts ++= Seq (
1571+ s " -Dplugin.scalaVersion= ${dottyVersion}" ,
1572+ s " -Dplugin.scala2Version= ${stdlibVersion(Bootstrapped )}" ,
1573+ s " -Dplugin.scalaJSVersion= ${scalaJSVersion}" ,
1574+ ),
1575+ scriptedBufferLog := true ,
1576+ scripted := scripted.dependsOn(
1577+ (`scala3-sbt-bridge-bootstrapped` / publishLocalBin),
1578+ (`scala3-interfaces` / publishLocalBin),
1579+ (`scala3-compiler-bootstrapped-new` / publishLocalBin),
1580+ (`scala3-library-bootstrapped-new` / publishLocalBin),
1581+ (`scala-library-bootstrapped` / publishLocalBin),
1582+ (`scala-library-sjs` / publishLocalBin),
1583+ (`scala3-library-sjs` / publishLocalBin),
1584+ (`tasty-core-bootstrapped-new` / publishLocalBin),
1585+ (`scala3-staging-new` / publishLocalBin),
1586+ (`scala3-tasty-inspector-new` / publishLocalBin),
1587+ (`scaladoc-new` / publishLocalBin),
1588+ publishLocalBin,
1589+ ).evaluated,
15631590 )
15641591
15651592 /* Configuration of the org.scala-lang:scala3-sbt-bridge:*.**.**-bootstrapped project */
@@ -3516,47 +3543,6 @@ object Build {
35163543 BuildInfoPlugin .buildInfoScopedSettings(Test ),
35173544 )
35183545
3519- // various scripted sbt tests
3520- lazy val `sbt-test` = project.in(file(" sbt-test" )).
3521- enablePlugins(ScriptedPlugin ).
3522- settings(commonSettings).
3523- settings(
3524- sbtTestDirectory := baseDirectory.value,
3525- target := baseDirectory.value / " .." / " out" / name.value,
3526-
3527- // The batch mode accidentally became the default with no way to disable
3528- // it in sbt 1.4 (https://github.com/sbt/sbt/issues/5913#issuecomment-716003195).
3529- // We enable it explicitly here to make it clear that we're using it.
3530- scriptedBatchExecution := true ,
3531-
3532- scriptedLaunchOpts ++= Seq (
3533- " -Dplugin.version=" + version.value,
3534- " -Dplugin.scalaVersion=" + dottyVersion,
3535- " -Dplugin.scala2Version=" + stdlibVersion(Bootstrapped ),
3536- " -Dplugin.scalaJSVersion=" + scalaJSVersion,
3537- " -Dsbt.boot.directory=" + ((ThisBuild / baseDirectory).value / " .sbt-scripted" ).getAbsolutePath // Workaround sbt/sbt#3469
3538- ),
3539- // Pass along ivy home and repositories settings to sbt instances run from the tests
3540- scriptedLaunchOpts ++= {
3541- val repositoryPath = (io.Path .userHome / " .sbt" / " repositories" ).absolutePath
3542- s " -Dsbt.repository.config= $repositoryPath" ::
3543- ivyPaths.value.ivyHome.map(" -Dsbt.ivy.home=" + _.getAbsolutePath).toList
3544- },
3545- scriptedBufferLog := true ,
3546- scripted := scripted.dependsOn(
3547- (`scala3-sbt-bridge` / publishLocalBin),
3548- (`scala3-interfaces` / publishLocalBin),
3549- (`scala3-compiler-bootstrapped` / publishLocalBin),
3550- (`scala3-library-bootstrapped` / publishLocalBin),
3551- (`scala3-library-bootstrappedJS` / publishLocalBin),
3552- (`tasty-core-bootstrapped` / publishLocalBin),
3553- (`scala3-staging` / publishLocalBin),
3554- (`scala3-tasty-inspector` / publishLocalBin),
3555- (`scaladoc` / publishLocalBin),
3556- (`scala3-bootstrapped` / publishLocalBin) // Needed because sbt currently hardcodes the dotty artifact
3557- ).evaluated
3558- )
3559-
35603546 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}." )
35613547
35623548 lazy val `community-build` = project.in(file(" community-build" )).
0 commit comments