@@ -10,6 +10,7 @@ import complete.DefaultParsers._
10
10
import pl .project13 .scala .sbt .JmhPlugin
11
11
import pl .project13 .scala .sbt .JmhPlugin .JmhKeys .Jmh
12
12
import sbt .Package .ManifestAttributes
13
+ import sbt .plugins .SbtPlugin
13
14
import sbt .ScriptedPlugin .autoImport ._
14
15
import xerial .sbt .pack .PackPlugin
15
16
import xerial .sbt .pack .PackPlugin .autoImport ._
@@ -356,7 +357,6 @@ object Build {
356
357
lazy val `dotty-bootstrapped` = project.asDottyRoot(Bootstrapped )
357
358
358
359
lazy val `dotty-interfaces` = project.in(file(" interfaces" )).
359
- disablePlugins(ScriptedPlugin ).
360
360
settings(commonScala2Settings). // Java-only project, so this is fine
361
361
settings(
362
362
// Do not append Scala versions to the generated artifacts
@@ -530,7 +530,7 @@ object Build {
530
530
// FIXME: Not needed, but should be on the compiler CP
531
531
(" org.scala-lang.modules" %% " scala-xml" % " 1.1.0" ).withDottyCompat(scalaVersion.value),
532
532
" org.scala-lang" % " scala-library" % scalacVersion % " test" ,
533
- Dependencies .compilerInterface(sbtVersion.value) ,
533
+ Dependencies .`compiler-interface` ,
534
534
" org.jline" % " jline-reader" % " 3.9.0" , // used by the REPL
535
535
" org.jline" % " jline-terminal" % " 3.9.0" ,
536
536
" org.jline" % " jline-terminal-jna" % " 3.9.0" // needed for Windows
@@ -799,8 +799,8 @@ object Build {
799
799
description := " sbt compiler bridge for Dotty" ,
800
800
resolvers += Resolver .typesafeIvyRepo(" releases" ), // For org.scala-sbt:api
801
801
libraryDependencies ++= Seq (
802
- Dependencies .compilerInterface(sbtVersion.value) % Provided ,
803
- (Dependencies .zincApiinfo(sbtVersion.value) % Test ).withDottyCompat(scalaVersion.value)
802
+ Dependencies .`compiler-interface` % Provided ,
803
+ (Dependencies .`zinc-api-info` % Test ).withDottyCompat(scalaVersion.value)
804
804
),
805
805
// The sources should be published with crossPaths := false since they
806
806
// need to be compiled by the project using the bridge.
@@ -893,7 +893,7 @@ object Build {
893
893
buildInfoPackage in Test := " dotty.tools.languageserver.util.server" ,
894
894
BuildInfoPlugin .buildInfoScopedSettings(Test ),
895
895
BuildInfoPlugin .buildInfoDefaultSettings
896
- ).disablePlugins( ScriptedPlugin )
896
+ )
897
897
898
898
lazy val `dotty-bench` = project.in(file(" bench" )).asDottyBench(NonBootstrapped )
899
899
lazy val `dotty-bench-bootstrapped` = project.in(file(" bench" )).asDottyBench(Bootstrapped )
@@ -928,6 +928,7 @@ object Build {
928
928
// sbt plugin to use Dotty in your own build, see
929
929
// https://github.com/lampepfl/dotty-example-project for usage.
930
930
lazy val `sbt-dotty` = project.in(file(" sbt-dotty" )).
931
+ enablePlugins(SbtPlugin ).
931
932
settings(commonSettings).
932
933
settings(
933
934
version := {
@@ -938,11 +939,10 @@ object Build {
938
939
// Keep in sync with inject-sbt-dotty.sbt
939
940
libraryDependencies ++= Seq (
940
941
Dependencies .`jackson-databind`,
941
- Dependencies .compilerInterface(sbtVersion.value)
942
+ Dependencies .`compiler-interface`
942
943
),
943
944
unmanagedSourceDirectories in Compile +=
944
945
baseDirectory.value / " ../language-server/src/dotty/tools/languageserver/config" ,
945
- sbtPlugin := true ,
946
946
sbtTestDirectory := baseDirectory.value / " sbt-test" ,
947
947
scriptedLaunchOpts ++= Seq (
948
948
" -Dplugin.version=" + version.value,
@@ -1253,7 +1253,6 @@ object Build {
1253
1253
1254
1254
// FIXME: we do not aggregate `bin` because its tests delete jars, thus breaking other tests
1255
1255
def asDottyRoot (implicit mode : Mode ): Project = project.withCommonSettings.
1256
- disablePlugins(ScriptedPlugin ).
1257
1256
aggregate(`dotty-interfaces`, dottyLibrary, dottyCompiler, dottyDoc, dottySbtBridgeReference).
1258
1257
bootstrappedAggregate(`scala-library`, `scala-compiler`, `scala-reflect`, scalap, `dotty-language-server`).
1259
1258
dependsOn(dottyCompiler).
@@ -1263,38 +1262,32 @@ object Build {
1263
1262
)
1264
1263
1265
1264
def asDottyCompiler (implicit mode : Mode ): Project = project.withCommonSettings.
1266
- disablePlugins(ScriptedPlugin ).
1267
1265
dependsOn(`dotty-interfaces`).
1268
1266
dependsOn(dottyLibrary).
1269
1267
settings(dottyCompilerSettings)
1270
1268
1271
1269
def asDottyLibrary (implicit mode : Mode ): Project = project.withCommonSettings.
1272
- disablePlugins(ScriptedPlugin ).
1273
1270
settings(dottyLibrarySettings).
1274
1271
bootstrappedSettings(
1275
1272
// Needed so that the library sources are visible when `dotty.tools.dotc.core.Definitions#init` is called.
1276
1273
scalacOptions in Compile ++= Seq (" -sourcepath" , (scalaSource in Compile ).value.getAbsolutePath)
1277
1274
)
1278
1275
1279
1276
def asDottyDoc (implicit mode : Mode ): Project = project.withCommonSettings.
1280
- disablePlugins(ScriptedPlugin ).
1281
1277
dependsOn(dottyCompiler, dottyCompiler % " test->test" ).
1282
1278
settings(dottyDocSettings)
1283
1279
1284
1280
def asDottySbtBridge (implicit mode : Mode ): Project = project.withCommonSettings.
1285
- disablePlugins(ScriptedPlugin ).
1286
1281
dependsOn(dottyCompiler % Provided ).
1287
1282
dependsOn(dottyDoc % Provided ).
1288
1283
settings(dottySbtBridgeSettings)
1289
1284
1290
1285
def asDottyBench (implicit mode : Mode ): Project = project.withCommonSettings.
1291
- disablePlugins(ScriptedPlugin ).
1292
1286
dependsOn(dottyCompiler).
1293
1287
settings(commonBenchmarkSettings).
1294
1288
enablePlugins(JmhPlugin )
1295
1289
1296
1290
def asDist (implicit mode : Mode ): Project = project.
1297
- disablePlugins(ScriptedPlugin ).
1298
1291
enablePlugins(PackPlugin ).
1299
1292
withCommonSettings.
1300
1293
dependsOn(`dotty-interfaces`, dottyCompiler, dottyLibrary, dottyDoc).
0 commit comments