diff options
author | Guillaume Martres <smarter@ubuntu.com> | 2017-03-24 15:32:09 +0100 |
---|---|---|
committer | Guillaume Martres <smarter@ubuntu.com> | 2017-03-24 19:15:42 +0100 |
commit | 70c072abc729c1ffc080baff68dfd8fd6db1bcd1 (patch) | |
tree | 2f2435219254ccbfda61f55a549730fc47dc954e | |
parent | d9f98c2848dbb0ae18ae75159761598fdac894c3 (diff) | |
download | dotty-70c072abc729c1ffc080baff68dfd8fd6db1bcd1.tar.gz dotty-70c072abc729c1ffc080baff68dfd8fd6db1bcd1.tar.bz2 dotty-70c072abc729c1ffc080baff68dfd8fd6db1bcd1.zip |
Switch to build.sbt
Using the same technique than scala-js where we just forward to
Build.scala: https://github.com/scala-js/scala-js/pull/2312
-rw-r--r-- | build.sbt | 19 | ||||
-rw-r--r-- | project/Build.scala | 45 |
2 files changed, 41 insertions, 23 deletions
diff --git a/build.sbt b/build.sbt new file mode 100644 index 000000000..8f3754e57 --- /dev/null +++ b/build.sbt @@ -0,0 +1,19 @@ +val dotty = Build.dotty +val `dotty-bootstrapped` = Build.`dotty-bootstrapped` +val `dotty-interfaces` = Build.`dotty-interfaces` +val `dotty-doc` = Build.`dotty-doc` +val `dotty-bot` = Build.`dotty-bot` +val `dotty-compiler` = Build.`dotty-compiler` +val `dotty-compiler-bootstrapped` = Build.`dotty-compiler-bootstrapped` +val `dotty-bin-tests` = Build.`dotty-bin-tests` +val `dotty-library` = Build.`dotty-library` +val `dotty-library-bootstrapped` = Build.`dotty-library-bootstrapped` +val `dotty-sbt-bridge` = Build.`dotty-sbt-bridge` +val sjsSandbox = Build.sjsSandbox +val `dotty-bench` = Build.`dotty-bench` +val `scala-library` = Build.`scala-library` +val `scala-compiler` = Build.`scala-compiler` +val `scala-reflect` = Build.`scala-reflect` +val scalap = Build.scalap + +inThisBuild(Build.thisBuildSettings) diff --git a/project/Build.scala b/project/Build.scala index 10a397678..336cf9c81 100644 --- a/project/Build.scala +++ b/project/Build.scala @@ -10,7 +10,7 @@ import org.scalajs.sbtplugin.ScalaJSPlugin import org.scalajs.sbtplugin.ScalaJSPlugin.autoImport._ import sbt.Package.ManifestAttributes -object DottyBuild extends Build { +object Build { val scalacVersion = "2.11.5" // Do not rename, this is grepped in bin/common. @@ -59,26 +59,25 @@ object DottyBuild extends Build { // Shorthand for compiling a docs site lazy val dottydoc = inputKey[Unit]("run dottydoc") - override def settings: Seq[Setting[_]] = { - super.settings ++ Seq( - scalaVersion in Global := scalacVersion, - version in Global := dottyVersion, - organization in Global := dottyOrganization, - organizationName in Global := "LAMP/EPFL", - organizationHomepage in Global := Some(url("http://lamp.epfl.ch")), - homepage in Global := Some(url("https://github.com/lampepfl/dotty")), - - // scalac options - scalacOptions in Global ++= Seq( - "-feature", - "-deprecation", - "-encoding", "UTF8", - "-language:existentials,higherKinds,implicitConversions" - ), - - javacOptions in Global ++= Seq("-Xlint:unchecked", "-Xlint:deprecation") - ) - } + // Used in build.sbt + val thisBuildSettings = Seq( + scalaVersion in Global := scalacVersion, + version in Global := dottyVersion, + organization in Global := dottyOrganization, + organizationName in Global := "LAMP/EPFL", + organizationHomepage in Global := Some(url("http://lamp.epfl.ch")), + homepage in Global := Some(url("https://github.com/lampepfl/dotty")), + + // scalac options + scalacOptions in Global ++= Seq( + "-feature", + "-deprecation", + "-encoding", "UTF8", + "-language:existentials,higherKinds,implicitConversions" + ), + + javacOptions in Global ++= Seq("-Xlint:unchecked", "-Xlint:deprecation") + ) /** Enforce 2.11.5. Do not let it be upgraded by dependencies. */ private val overrideScalaVersionSetting = @@ -124,7 +123,7 @@ object DottyBuild extends Build { lazy val dotty = project.in(file(".")). // FIXME: we do not aggregate `bin` because its tests delete jars, thus breaking other tests aggregate(`dotty-interfaces`, `dotty-library`, `dotty-compiler`, `dotty-doc`, dottySbtBridgeRef, - `scala-library`, `scala-compiler`, `scala-reflect`, `scalap`). + `scala-library`, `scala-compiler`, `scala-reflect`, scalap). dependsOn(`dotty-compiler`). dependsOn(`dotty-library`). settings( @@ -728,7 +727,7 @@ object DottyInjectedPlugin extends AutoPlugin { libraryDependencies := Seq("org.scala-lang" % "scala-reflect" % scalaVersion.value) ). settings(publishing) - lazy val `scalap` = project. + lazy val scalap = project. settings( crossPaths := false, libraryDependencies := Seq("org.scala-lang" % "scalap" % scalaVersion.value) |