@@ -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
@@ -100,8 +91,6 @@ object Build {
100
91
// Shorthand for compiling a docs site
101
92
val dottydoc = inputKey[Unit ](" run dottydoc" )
102
93
103
- val bootstrapFromPublishedJars = settingKey[Boolean ](" If true, bootstrap dotty from published non-bootstrapped dotty" )
104
-
105
94
// Only available in vscode-dotty
106
95
val unpublish = taskKey[Unit ](" Unpublish a package" )
107
96
@@ -129,9 +118,6 @@ object Build {
129
118
130
119
javacOptions in (Compile , compile) ++= Seq (" -Xlint:unchecked" , " -Xlint:deprecation" ),
131
120
132
- // Change this to true if you want to bootstrap using a published non-bootstrapped compiler
133
- bootstrapFromPublishedJars := false ,
134
-
135
121
// Override `runCode` from sbt-dotty to use the language-server and
136
122
// vscode extension from the source repository of dotty instead of a
137
123
// published version.
@@ -251,41 +237,14 @@ object Build {
251
237
// ...but scala-library is
252
238
libraryDependencies += " org.scala-lang" % " scala-library" % scalacVersion,
253
239
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
-
270
240
// Compile using the non-bootstrapped and non-published dotty
271
241
managedScalaInstance := false ,
272
242
scalaInstance := {
273
243
import sbt .internal .inc .ScalaInstance
274
244
import sbt .internal .inc .classpath .ClasspathUtilities
275
245
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
289
248
290
249
// All dotty-doc's and compiler's dependencies except the library.
291
250
// (we get the compiler's dependencies because dottydoc depends on the compiler)
0 commit comments