Skip to content

Commit 093b1ca

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 3395f20 commit 093b1ca

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
@@ -12,6 +12,7 @@ import org.scalajs.sbtplugin.ScalaJSPlugin.autoImport._
1212
import sbt.Package.ManifestAttributes
1313

1414
import com.typesafe.sbteclipse.plugin.EclipsePlugin._
15+
import dotty.tools.sbtplugin.DottyPlugin.autoImport._
1516

1617
/* In sbt 0.13 the Build trait would expose all vals to the shell, where you
1718
* can use them in "set a := b" like expressions. This re-exposes them.
@@ -129,8 +130,6 @@ object Build {
129130
EclipseKeys.skipProject := true,
130131
version := dottyVersion,
131132
scalaVersion := dottyNonBootstrappedVersion,
132-
scalaOrganization := dottyOrganization,
133-
scalaBinaryVersion := "0.1",
134133

135134
// Avoid having to run `dotty-sbt-bridge/publishLocal` before compiling a bootstrapped project
136135
scalaCompilerBridgeSource :=
@@ -171,9 +170,9 @@ object Build {
171170
libraryDependencies ++= {
172171
if (bootstrapFromPublishedJars.value)
173172
Seq(
174-
dottyOrganization % "dotty-library_2.11" % dottyNonBootstrappedVersion % Configurations.ScalaTool.name,
175-
dottyOrganization % "dotty-compiler_2.11" % dottyNonBootstrappedVersion % Configurations.ScalaTool.name
176-
)
173+
dottyOrganization %% "dotty-library" % dottyNonBootstrappedVersion % Configurations.ScalaTool.name,
174+
dottyOrganization %% "dotty-compiler" % dottyNonBootstrappedVersion % Configurations.ScalaTool.name
175+
).map(_.withDottyCompat())
177176
else
178177
Seq()
179178
},
@@ -426,7 +425,7 @@ object Build {
426425

427426
// get libraries onboard
428427
libraryDependencies ++= Seq("com.typesafe.sbt" % "sbt-interface" % sbtVersion.value,
429-
"org.scala-lang.modules" % "scala-xml_2.11" % "1.0.1",
428+
("org.scala-lang.modules" %% "scala-xml" % "1.0.1").withDottyCompat(),
430429
"com.novocode" % "junit-interface" % "0.11" % "test",
431430
"org.scala-lang" % "scala-library" % scalacVersion % "test"),
432431

@@ -682,7 +681,7 @@ object Build {
682681
libraryDependencies ++= Seq(
683682
"com.typesafe.sbt" % "sbt-interface" % sbtVersion.value,
684683
"org.scala-sbt" % "api" % sbtVersion.value % "test",
685-
"org.specs2" % "specs2_2.11" % "2.3.11" % "test"
684+
("org.specs2" %% "specs2" % "2.3.11" % "test").withDottyCompat()
686685
),
687686
// The sources should be published with crossPaths := false since they
688687
// 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)