Skip to content

Commit

Permalink
Switch to build.sbt
Browse files Browse the repository at this point in the history
Using the same technique than scala-js where we just forward to
Build.scala: scala-js/scala-js#2312
  • Loading branch information
smarter committed Mar 24, 2017
1 parent a0e9060 commit 4e8427f
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 21 deletions.
21 changes: 21 additions & 0 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
val dotty = Build.dotty
val `dotty-bootstrapped` = Build.`dotty-bootstrapped`
val `dotty-interfaces` = Build.`dotty-interfaces`
val `dotty-bot` = Build.`dotty-bot`
val dottyCompilerSettings = Build.dottyCompilerSettings
val `dotty-compiler` = Build.`dotty-compiler`
val `dotty-compiler-bootstrapped` = Build.`dotty-compiler-bootstrapped`
val `dotty-bin-tests` = Build.`dotty-bin-tests`
val dottyLibrarySettings = Build.dottyLibrarySettings
val `dotty-library` = Build.`dotty-library`
val `dotty-library-bootstrapped` = Build.`dotty-library-bootstrapped`
val cleanSbtBridge = Build.cleanSbtBridge
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)
41 changes: 20 additions & 21 deletions project/Build.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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.

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

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 =
Expand Down

0 comments on commit 4e8427f

Please sign in to comment.