@@ -27,15 +27,6 @@ import sbtbuildinfo.BuildInfoPlugin.autoImport._
2727
2828import scala .util .Properties .isJavaAtLeast
2929
30- /* In sbt 0.13 the Build trait would expose all vals to the shell, where you
31- * can use them in "set a := b" like expressions. This re-exposes them.
32- */
33- object ExposedValues extends AutoPlugin {
34- object autoImport {
35- val bootstrapFromPublishedJars = Build .bootstrapFromPublishedJars
36- }
37- }
38-
3930object Build {
4031 val scalacVersion = " 2.12.8"
4132
@@ -100,8 +91,6 @@ object Build {
10091 // Shorthand for compiling a docs site
10192 val dottydoc = inputKey[Unit ](" run dottydoc" )
10293
103- val bootstrapFromPublishedJars = settingKey[Boolean ](" If true, bootstrap dotty from published non-bootstrapped dotty" )
104-
10594 // Only available in vscode-dotty
10695 val unpublish = taskKey[Unit ](" Unpublish a package" )
10796
@@ -129,9 +118,6 @@ object Build {
129118
130119 javacOptions in (Compile , compile) ++= Seq (" -Xlint:unchecked" , " -Xlint:deprecation" ),
131120
132- // Change this to true if you want to bootstrap using a published non-bootstrapped compiler
133- bootstrapFromPublishedJars := false ,
134-
135121 // Override `runCode` from sbt-dotty to use the language-server and
136122 // vscode extension from the source repository of dotty instead of a
137123 // published version.
@@ -251,41 +237,14 @@ object Build {
251237 // ...but scala-library is
252238 libraryDependencies += " org.scala-lang" % " scala-library" % scalacVersion,
253239
254- ivyConfigurations ++= {
255- if (bootstrapFromPublishedJars.value)
256- Seq (Configurations .ScalaTool )
257- else
258- Seq ()
259- },
260- libraryDependencies ++= {
261- if (bootstrapFromPublishedJars.value)
262- Seq (
263- dottyOrganization %% " dotty-library" % dottyNonBootstrappedVersion % Configurations .ScalaTool .name,
264- dottyOrganization %% " dotty-compiler" % dottyNonBootstrappedVersion % Configurations .ScalaTool .name
265- ).map(_.withDottyCompat(scalaVersion.value))
266- else
267- Seq ()
268- },
269-
270240 // Compile using the non-bootstrapped and non-published dotty
271241 managedScalaInstance := false ,
272242 scalaInstance := {
273243 import sbt .internal .inc .ScalaInstance
274244 import sbt .internal .inc .classpath .ClasspathUtilities
275245
276- val updateReport = update.value
277- var libraryJar = packageBin.in(`dotty-library`, Compile ).value
278- var compilerJar = packageBin.in(`dotty-compiler`, Compile ).value
279-
280- if (bootstrapFromPublishedJars.value) {
281- val jars = updateReport.select(
282- configuration = configurationFilter(Configurations .ScalaTool .name),
283- module = moduleFilter(),
284- artifact = artifactFilter(extension = " jar" )
285- )
286- libraryJar = jars.find(_.getName.startsWith(" dotty-library_2.12" )).get
287- compilerJar = jars.find(_.getName.startsWith(" dotty-compiler_2.12" )).get
288- }
246+ val libraryJar = packageBin.in(`dotty-library`, Compile ).value
247+ val compilerJar = packageBin.in(`dotty-compiler`, Compile ).value
289248
290249 // All dotty-doc's and compiler's dependencies except the library.
291250 // (we get the compiler's dependencies because dottydoc depends on the compiler)
0 commit comments