Skip to content

Commit 4e8427f

Browse files
committed
Switch to build.sbt
Using the same technique than scala-js where we just forward to Build.scala: scala-js/scala-js#2312
1 parent a0e9060 commit 4e8427f

File tree

2 files changed

+41
-21
lines changed

2 files changed

+41
-21
lines changed

build.sbt

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
val dotty = Build.dotty
2+
val `dotty-bootstrapped` = Build.`dotty-bootstrapped`
3+
val `dotty-interfaces` = Build.`dotty-interfaces`
4+
val `dotty-bot` = Build.`dotty-bot`
5+
val dottyCompilerSettings = Build.dottyCompilerSettings
6+
val `dotty-compiler` = Build.`dotty-compiler`
7+
val `dotty-compiler-bootstrapped` = Build.`dotty-compiler-bootstrapped`
8+
val `dotty-bin-tests` = Build.`dotty-bin-tests`
9+
val dottyLibrarySettings = Build.dottyLibrarySettings
10+
val `dotty-library` = Build.`dotty-library`
11+
val `dotty-library-bootstrapped` = Build.`dotty-library-bootstrapped`
12+
val cleanSbtBridge = Build.cleanSbtBridge
13+
val `dotty-sbt-bridge` = Build.`dotty-sbt-bridge`
14+
val sjsSandbox = Build.sjsSandbox
15+
val `dotty-bench` = Build.`dotty-bench`
16+
val `scala-library` = Build.`scala-library`
17+
val `scala-compiler` = Build.`scala-compiler`
18+
val `scala-reflect` = Build.`scala-reflect`
19+
val `scalap` = Build.`scalap`
20+
21+
inThisBuild(Build.thisBuildSettings)

project/Build.scala

Lines changed: 20 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import org.scalajs.sbtplugin.ScalaJSPlugin
1010
import org.scalajs.sbtplugin.ScalaJSPlugin.autoImport._
1111
import sbt.Package.ManifestAttributes
1212

13-
object DottyBuild extends Build {
13+
object Build {
1414

1515
val scalacVersion = "2.11.5" // Do not rename, this is grepped in bin/common.
1616

@@ -65,26 +65,25 @@ object DottyBuild extends Build {
6565
"dottydoc dependencies, should be moved to a dottydoc sbt subproject eventually"
6666
)
6767

68-
override def settings: Seq[Setting[_]] = {
69-
super.settings ++ Seq(
70-
scalaVersion in Global := scalacVersion,
71-
version in Global := dottyVersion,
72-
organization in Global := dottyOrganization,
73-
organizationName in Global := "LAMP/EPFL",
74-
organizationHomepage in Global := Some(url("http://lamp.epfl.ch")),
75-
homepage in Global := Some(url("https://github.com/lampepfl/dotty")),
76-
77-
// scalac options
78-
scalacOptions in Global ++= Seq(
79-
"-feature",
80-
"-deprecation",
81-
"-encoding", "UTF8",
82-
"-language:existentials,higherKinds,implicitConversions"
83-
),
84-
85-
javacOptions in Global ++= Seq("-Xlint:unchecked", "-Xlint:deprecation")
86-
)
87-
}
68+
// Used in build.sbt
69+
val thisBuildSettings = Seq(
70+
scalaVersion in Global := scalacVersion,
71+
version in Global := dottyVersion,
72+
organization in Global := dottyOrganization,
73+
organizationName in Global := "LAMP/EPFL",
74+
organizationHomepage in Global := Some(url("http://lamp.epfl.ch")),
75+
homepage in Global := Some(url("https://github.com/lampepfl/dotty")),
76+
77+
// scalac options
78+
scalacOptions in Global ++= Seq(
79+
"-feature",
80+
"-deprecation",
81+
"-encoding", "UTF8",
82+
"-language:existentials,higherKinds,implicitConversions"
83+
),
84+
85+
javacOptions in Global ++= Seq("-Xlint:unchecked", "-Xlint:deprecation")
86+
)
8887

8988
/** Enforce 2.11.5. Do not let it be upgraded by dependencies. */
9089
private val overrideScalaVersionSetting =

0 commit comments

Comments
 (0)