@@ -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
@@ -107,8 +98,6 @@ object Build {
107
98
// Shorthand for compiling a docs site
108
99
lazy val dottydoc = inputKey[Unit ](" run dottydoc" )
109
100
110
- lazy val bootstrapFromPublishedJars = settingKey[Boolean ](" If true, bootstrap dotty from published non-bootstrapped dotty" )
111
-
112
101
// Only available in vscode-dotty
113
102
lazy val unpublish = taskKey[Unit ](" Unpublish a package" )
114
103
@@ -136,9 +125,6 @@ object Build {
136
125
137
126
javacOptions in (Compile , compile) ++= Seq (" -Xlint:unchecked" , " -Xlint:deprecation" ),
138
127
139
- // Change this to true if you want to bootstrap using a published non-bootstrapped compiler
140
- bootstrapFromPublishedJars := false ,
141
-
142
128
// Override `runCode` from sbt-dotty to use the language-server and
143
129
// vscode extension from the source repository of dotty instead of a
144
130
// published version.
@@ -268,41 +254,15 @@ object Build {
268
254
// ...but scala-library is
269
255
libraryDependencies += " org.scala-lang" % " scala-library" % scalacVersion,
270
256
271
- ivyConfigurations ++= {
272
- if (bootstrapFromPublishedJars.value)
273
- Seq (Configurations .ScalaTool )
274
- else
275
- Seq ()
276
- },
277
- libraryDependencies ++= {
278
- if (bootstrapFromPublishedJars.value)
279
- Seq (
280
- dottyOrganization %% " dotty-library" % dottyNonBootstrappedVersion % Configurations .ScalaTool .name,
281
- dottyOrganization %% " dotty-compiler" % dottyNonBootstrappedVersion % Configurations .ScalaTool .name
282
- ).map(_.withDottyCompat(scalaVersion.value))
283
- else
284
- Seq ()
285
- },
286
-
287
257
// Compile using the non-bootstrapped and non-published dotty
288
258
managedScalaInstance := false ,
289
259
scalaInstance := {
290
260
import sbt .internal .inc .ScalaInstance
291
261
import sbt .internal .inc .classpath .ClasspathUtilities
292
262
293
263
val updateReport = update.value
294
- var libraryJar = packageBin.in(`dotty-library`, Compile ).value
295
- var compilerJar = packageBin.in(`dotty-compiler`, Compile ).value
296
-
297
- if (bootstrapFromPublishedJars.value) {
298
- val jars = updateReport.select(
299
- configuration = configurationFilter(Configurations .ScalaTool .name),
300
- module = moduleFilter(),
301
- artifact = artifactFilter(extension = " jar" )
302
- )
303
- libraryJar = jars.find(_.getName.startsWith(" dotty-library_2.12" )).get
304
- compilerJar = jars.find(_.getName.startsWith(" dotty-compiler_2.12" )).get
305
- }
264
+ val libraryJar = packageBin.in(`dotty-library`, Compile ).value
265
+ val compilerJar = packageBin.in(`dotty-compiler`, Compile ).value
306
266
307
267
// All dotty-doc's and compiler's dependencies except the library.
308
268
// (we get the compiler's dependencies because dottydoc depends on the compiler)
0 commit comments