@@ -27,15 +27,6 @@ import sbtbuildinfo.BuildInfoPlugin.autoImport._
27
27
28
28
import scala .util .Properties .isJavaAtLeast
29
29
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
-
39
30
object Build {
40
31
val scalacVersion = " 2.12.8"
41
32
@@ -103,8 +94,6 @@ object Build {
103
94
// Shorthand for compiling a docs site
104
95
val dottydoc = inputKey[Unit ](" run dottydoc" )
105
96
106
- val bootstrapFromPublishedJars = settingKey[Boolean ](" If true, bootstrap dotty from published non-bootstrapped dotty" )
107
-
108
97
// Only available in vscode-dotty
109
98
val unpublish = taskKey[Unit ](" Unpublish a package" )
110
99
@@ -132,9 +121,6 @@ object Build {
132
121
133
122
javacOptions in (Compile , compile) ++= Seq (" -Xlint:unchecked" , " -Xlint:deprecation" ),
134
123
135
- // Change this to true if you want to bootstrap using a published non-bootstrapped compiler
136
- bootstrapFromPublishedJars := false ,
137
-
138
124
// Override `runCode` from sbt-dotty to use the language-server and
139
125
// vscode extension from the source repository of dotty instead of a
140
126
// published version.
@@ -254,41 +240,15 @@ object Build {
254
240
// ...but scala-library is
255
241
libraryDependencies += " org.scala-lang" % " scala-library" % scalacVersion,
256
242
257
- ivyConfigurations ++= {
258
- if (bootstrapFromPublishedJars.value)
259
- Seq (Configurations .ScalaTool )
260
- else
261
- Seq ()
262
- },
263
- libraryDependencies ++= {
264
- if (bootstrapFromPublishedJars.value)
265
- Seq (
266
- dottyOrganization %% " dotty-library" % dottyNonBootstrappedVersion % Configurations .ScalaTool .name,
267
- dottyOrganization %% " dotty-compiler" % dottyNonBootstrappedVersion % Configurations .ScalaTool .name
268
- ).map(_.withDottyCompat(scalaVersion.value))
269
- else
270
- Seq ()
271
- },
272
-
273
243
// Compile using the non-bootstrapped and non-published dotty
274
244
managedScalaInstance := false ,
275
245
scalaInstance := {
276
246
import sbt .internal .inc .ScalaInstance
277
247
import sbt .internal .inc .classpath .ClasspathUtilities
278
248
279
249
val updateReport = update.value
280
- var libraryJar = packageBin.in(`dotty-library`, Compile ).value
281
- var compilerJar = packageBin.in(`dotty-compiler`, Compile ).value
282
-
283
- if (bootstrapFromPublishedJars.value) {
284
- val jars = updateReport.select(
285
- configuration = configurationFilter(Configurations .ScalaTool .name),
286
- module = moduleFilter(),
287
- artifact = artifactFilter(extension = " jar" )
288
- )
289
- libraryJar = jars.find(_.getName.startsWith(" dotty-library_2.12" )).get
290
- compilerJar = jars.find(_.getName.startsWith(" dotty-compiler_2.12" )).get
291
- }
250
+ val libraryJar = packageBin.in(`dotty-library`, Compile ).value
251
+ val compilerJar = packageBin.in(`dotty-compiler`, Compile ).value
292
252
293
253
// All dotty-doc's and compiler's dependencies except the library.
294
254
// (we get the compiler's dependencies because dottydoc depends on the compiler)
0 commit comments