@@ -1396,14 +1396,25 @@ object Build {
1396
1396
scalaVersion := referenceVersion, // nonbootstrapped artifacts are compiled with the reference compiler (already officially published)
1397
1397
crossPaths := false , // org.scala-lang:scala3-sbt-bridge doesn't have a crosspath
1398
1398
autoScalaLibrary := false , // do not add a dependency to stdlib, we depend transitively on the stdlib from `scala3-compiler-nonbootstrapped`
1399
- // Add the source directories for the stdlib (non-boostrapped)
1399
+ // Add the source directories for the sbt-bridge (non-boostrapped)
1400
1400
Compile / unmanagedSourceDirectories := Seq (baseDirectory.value / " src" ),
1401
+ Test / unmanagedSourceDirectories := Seq (baseDirectory.value / " test" ),
1401
1402
Compile / resourceDirectory := baseDirectory.value / " resources" ,
1402
1403
// NOTE: The only difference here is that we drop `-Werror` and semanticDB for now
1403
1404
Compile / scalacOptions := Seq (" -deprecation" , " -feature" , " -unchecked" , " -encoding" , " UTF8" , " -language:implicitConversions" ),
1404
1405
// Make sure that the produced artifacts have the minimum JVM version in the bytecode
1405
1406
Compile / javacOptions ++= Seq (" --target" , Versions .minimumJVMVersion),
1406
1407
Compile / scalacOptions ++= Seq (" --java-output-version" , Versions .minimumJVMVersion),
1408
+ // Add all the project's external dependencies
1409
+ libraryDependencies ++= Seq (
1410
+ (" org.scala-sbt" %% " zinc-apiinfo" % " 1.8.0" % Test ).cross(CrossVersion .for3Use2_13),
1411
+ " com.github.sbt" % " junit-interface" % " 0.13.3" % Test ,
1412
+ ),
1413
+ // Exclude the transitive dependencies from `zinc-apiinfo` that causes issues at the moment
1414
+ excludeDependencies ++= Seq (
1415
+ " org.scala-lang" % " scala-reflect" ,
1416
+ " org.scala-lang" % " scala-compiler" ,
1417
+ ),
1407
1418
// Packaging configuration of the stdlib
1408
1419
Compile / packageBin / publishArtifact := true ,
1409
1420
Compile / packageDoc / publishArtifact := false ,
@@ -1455,7 +1466,7 @@ object Build {
1455
1466
1456
1467
/* Configuration of the org.scala-lang:scala3-sbt-bridge:*.**.**-bootstrapped project */
1457
1468
lazy val `scala3-sbt-bridge-bootstrapped` = project.in(file(" sbt-bridge" ))
1458
- .dependsOn(`scala3-compiler-bootstrapped`) // TODO: Would this actually evict the reference compiler in scala-tool?
1469
+ .dependsOn(`scala3-compiler-bootstrapped-new `) // TODO: Would this actually evict the reference compiler in scala-tool?
1459
1470
.settings(
1460
1471
name := " scala3-sbt-bridge-bootstrapped" ,
1461
1472
moduleName := " scala3-sbt-bridge" ,
@@ -1464,15 +1475,27 @@ object Build {
1464
1475
scalaVersion := referenceVersion, // nonbootstrapped artifacts are compiled with the reference compiler (already officially published)
1465
1476
crossPaths := false , // org.scala-lang:scala3-sbt-bridge doesn't have a crosspath
1466
1477
autoScalaLibrary := false , // do not add a dependency to stdlib, we depend transitively on the stdlib from `scala3-compiler-nonbootstrapped`
1467
- // Add the source directories for the stdlib (non- boostrapped)
1478
+ // Add the source directories for the sbt-bridge ( boostrapped)
1468
1479
Compile / unmanagedSourceDirectories := Seq (baseDirectory.value / " src" ),
1480
+ Test / unmanagedSourceDirectories := Seq (baseDirectory.value / " test" ),
1469
1481
Compile / resourceDirectory := baseDirectory.value / " resources" ,
1470
1482
// NOTE: The only difference here is that we drop `-Werror` and semanticDB for now
1471
1483
Compile / scalacOptions := Seq (" -deprecation" , " -feature" , " -unchecked" , " -encoding" , " UTF8" , " -language:implicitConversions" ),
1472
1484
// Make sure that the produced artifacts have the minimum JVM version in the bytecode
1473
1485
Compile / javacOptions ++= Seq (" --target" , Versions .minimumJVMVersion),
1474
1486
Compile / scalacOptions ++= Seq (" --java-output-version" , Versions .minimumJVMVersion),
1475
- // Packaging configuration of the stdlib
1487
+ // Add all the project's external dependencies
1488
+ libraryDependencies ++= Seq (
1489
+ (" org.scala-sbt" %% " zinc-apiinfo" % " 1.8.0" % Test ).cross(CrossVersion .for3Use2_13),
1490
+ " com.github.sbt" % " junit-interface" % " 0.13.3" % Test ,
1491
+ ),
1492
+ // Exclude the transitive dependencies from `zinc-apiinfo` that causes issues at the moment
1493
+ excludeDependencies ++= Seq (
1494
+ " org.scala-lang" % " scala-reflect" ,
1495
+ " org.scala-lang" % " scala-compiler" ,
1496
+ ),
1497
+ //
1498
+ // Packaging configuration of `scala3-sbt-bridge`
1476
1499
Compile / packageBin / publishArtifact := true ,
1477
1500
Compile / packageDoc / publishArtifact := false ,
1478
1501
Compile / packageSrc / publishArtifact := true ,
@@ -1714,10 +1737,17 @@ object Build {
1714
1737
autoScalaLibrary := false ,
1715
1738
// Add the source directories for the stdlib (non-boostrapped)
1716
1739
Compile / unmanagedSourceDirectories := Seq (baseDirectory.value / " src" ),
1740
+ Test / unmanagedSourceDirectories := Seq (baseDirectory.value / " test" ),
1717
1741
Compile / unmanagedSourceDirectories += baseDirectory.value / " src-non-bootstrapped" ,
1742
+ // NOTE: The only difference here is that we drop `-Werror` and semanticDB for now
1743
+ Compile / scalacOptions := Seq (" -deprecation" , " -feature" , " -unchecked" , " -encoding" , " UTF8" , " -language:implicitConversions" ),
1718
1744
// Make sure that the produced artifacts have the minimum JVM version in the bytecode
1719
1745
Compile / javacOptions ++= Seq (" --target" , Versions .minimumJVMVersion),
1720
1746
Compile / scalacOptions ++= Seq (" --java-output-version" , Versions .minimumJVMVersion),
1747
+ // Add all the project's external dependencies
1748
+ libraryDependencies ++= Seq (
1749
+ " com.github.sbt" % " junit-interface" % " 0.13.3" % Test ,
1750
+ ),
1721
1751
// Packaging configuration of the stdlib
1722
1752
Compile / packageBin / publishArtifact := true ,
1723
1753
Compile / packageDoc / publishArtifact := false ,
@@ -1745,11 +1775,16 @@ object Build {
1745
1775
state.value,
1746
1776
scalaInstanceTopLoader.value,
1747
1777
)},
1778
+ // Add configuration of the test
1779
+ Test / envVars ++= Map (
1780
+ " EXPECTED_TASTY_VERSION" -> expectedTastyVersion,
1781
+ ),
1782
+
1748
1783
)
1749
1784
1750
1785
/* Configuration of the org.scala-lang:tasty-core_3:*.**.**-bootstrapped project */
1751
1786
lazy val `tasty-core-bootstrapped-new` = project.in(file(" tasty" ))
1752
- .dependsOn(`scala3-library-bootstrapped`)
1787
+ .dependsOn(`scala3-library-bootstrapped-new `)
1753
1788
.settings(
1754
1789
name := " tasty-core-bootstrapped" ,
1755
1790
moduleName := " tasty-core" ,
@@ -1761,10 +1796,17 @@ object Build {
1761
1796
autoScalaLibrary := false ,
1762
1797
// Add the source directories for the stdlib (non-boostrapped)
1763
1798
Compile / unmanagedSourceDirectories := Seq (baseDirectory.value / " src" ),
1799
+ Test / unmanagedSourceDirectories := Seq (baseDirectory.value / " test" ),
1764
1800
Compile / unmanagedSourceDirectories += baseDirectory.value / " src-bootstrapped" ,
1801
+ // NOTE: The only difference here is that we drop `-Werror` and semanticDB for now
1802
+ Compile / scalacOptions := Seq (" -deprecation" , " -feature" , " -unchecked" , " -encoding" , " UTF8" , " -language:implicitConversions" ),
1765
1803
// Make sure that the produced artifacts have the minimum JVM version in the bytecode
1766
1804
Compile / javacOptions ++= Seq (" --target" , Versions .minimumJVMVersion),
1767
1805
Compile / scalacOptions ++= Seq (" --java-output-version" , Versions .minimumJVMVersion),
1806
+ // Add all the project's external dependencies
1807
+ libraryDependencies ++= Seq (
1808
+ " com.github.sbt" % " junit-interface" % " 0.13.3" % Test ,
1809
+ ),
1768
1810
// Packaging configuration of the stdlib
1769
1811
Compile / packageBin / publishArtifact := true ,
1770
1812
Compile / packageDoc / publishArtifact := false ,
@@ -1801,6 +1843,10 @@ object Build {
1801
1843
scalaCompilerBridgeBinaryJar := {
1802
1844
Some ((`scala3-sbt-bridge-nonbootstrapped` / Compile / packageBin).value)
1803
1845
},
1846
+ // Add configuration of the test
1847
+ Test / envVars ++= Map (
1848
+ " EXPECTED_TASTY_VERSION" -> expectedTastyVersion,
1849
+ ),
1804
1850
)
1805
1851
1806
1852
// ==============================================================================================
@@ -1930,7 +1976,7 @@ object Build {
1930
1976
1931
1977
/* Configuration of the org.scala-lang:scala3-compiler_3:*.**.**-bootstrapped project */
1932
1978
lazy val `scala3-compiler-bootstrapped-new` = project.in(file(" compiler" ))
1933
- .dependsOn(`scala3-interfaces`, `tasty-core-bootstrapped`, `scala3-library-bootstrapped`)
1979
+ .dependsOn(`scala3-interfaces`, `tasty-core-bootstrapped-new `, `scala3-library-bootstrapped-new `)
1934
1980
.settings(
1935
1981
name := " scala3-compiler-bootstrapped" ,
1936
1982
moduleName := " scala3-compiler" ,
0 commit comments