Skip to content

Commit cce3ae5

Browse files
committed
Inject the sources of the sbt-dotty plugin in the dotty build
This means the dotty build can use the latest unreleased version of the sbt-dotty plugin instead of depending on a published version, in the next commit we'll add IDE support to the sbt-dotty plugin and immediately be able to use them on the dotty build itself.
1 parent 0faa6ca commit cce3ae5

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

project/Build.scala

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import org.scalajs.sbtplugin.ScalaJSPlugin.autoImport._
1515
import sbt.Package.ManifestAttributes
1616

1717
import com.typesafe.sbteclipse.plugin.EclipsePlugin._
18+
import dotty.tools.sbtplugin.DottyPlugin.autoImport._
1819

1920
/* In sbt 0.13 the Build trait would expose all vals to the shell, where you
2021
* can use them in "set a := b" like expressions. This re-exposes them.
@@ -132,8 +133,6 @@ object Build {
132133
EclipseKeys.skipProject := true,
133134
version := dottyVersion,
134135
scalaVersion := dottyNonBootstrappedVersion,
135-
scalaOrganization := dottyOrganization,
136-
scalaBinaryVersion := "0.1",
137136

138137
// Avoid having to run `dotty-sbt-bridge/publishLocal` before compiling a bootstrapped project
139138
scalaCompilerBridgeSource :=
@@ -174,9 +173,9 @@ object Build {
174173
libraryDependencies ++= {
175174
if (bootstrapFromPublishedJars.value)
176175
Seq(
177-
dottyOrganization % "dotty-library_2.11" % dottyNonBootstrappedVersion % Configurations.ScalaTool.name,
178-
dottyOrganization % "dotty-compiler_2.11" % dottyNonBootstrappedVersion % Configurations.ScalaTool.name
179-
)
176+
dottyOrganization %% "dotty-library" % dottyNonBootstrappedVersion % Configurations.ScalaTool.name,
177+
dottyOrganization %% "dotty-compiler" % dottyNonBootstrappedVersion % Configurations.ScalaTool.name
178+
).map(_.withDottyCompat())
180179
else
181180
Seq()
182181
},
@@ -439,7 +438,7 @@ object Build {
439438

440439
// get libraries onboard
441440
libraryDependencies ++= Seq("com.typesafe.sbt" % "sbt-interface" % sbtVersion.value,
442-
"org.scala-lang.modules" % "scala-xml_2.11" % "1.0.1",
441+
("org.scala-lang.modules" %% "scala-xml" % "1.0.1").withDottyCompat(),
443442
"com.novocode" % "junit-interface" % "0.11" % "test",
444443
"org.scala-lang" % "scala-library" % scalacVersion % "test"),
445444

@@ -695,7 +694,7 @@ object Build {
695694
libraryDependencies ++= Seq(
696695
"com.typesafe.sbt" % "sbt-interface" % sbtVersion.value,
697696
"org.scala-sbt" % "api" % sbtVersion.value % "test",
698-
"org.specs2" % "specs2_2.11" % "2.3.11" % "test"
697+
("org.specs2" %% "specs2" % "2.3.11" % "test").withDottyCompat()
699698
),
700699
// The sources should be published with crossPaths := false since they
701700
// need to be compiled by the project using the bridge.

project/inject-sbt-dotty.sbt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// Include the sources of the sbt-dotty plugin in the project build,
2+
// so that we can use the current in-development version of the plugin
3+
// in our build instead of a released version.
4+
5+
unmanagedSourceDirectories in Compile += baseDirectory.value / "../sbt-dotty/src"

0 commit comments

Comments
 (0)