diff options
Diffstat (limited to 'project/Build.scala')
-rw-r--r-- | project/Build.scala | 79 |
1 files changed, 25 insertions, 54 deletions
diff --git a/project/Build.scala b/project/Build.scala index 0cc0c5c5d7..610f756a34 100644 --- a/project/Build.scala +++ b/project/Build.scala @@ -2,25 +2,11 @@ import sbt._ import Keys._ import partest._ import SameTest._ +import ScalaBuildKeys._ + + object ScalaBuild extends Build with Layers { - // New tasks/settings specific to the scala build. - lazy val lockerLock: TaskKey[Unit] = TaskKey("locker-lock", - "Locks the locker layer of the compiler build such that it won't rebuild on changed source files.") - lazy val lockerUnlock: TaskKey[Unit] = TaskKey("locker-unlock", - "Unlocks the locker layer of the compiler so that it will be recompiled on changed source files.") - lazy val lockFile: SettingKey[File] = SettingKey("lock-file", - "Location of the lock file compiling this project.") - // New tasks/settings specific to the scala build. - lazy val lock: TaskKey[Unit] = TaskKey("lock", "Locks this project so it won't be recompiled.") - lazy val unlock: TaskKey[Unit] = TaskKey("unlock", "Unlocks this project so it will be recompiled.") - lazy val makeDist: TaskKey[File] = TaskKey("make-dist", - "Creates a mini-distribution (scala home directory) for this build in a zip file.") - lazy val makeExplodedDist: TaskKey[File] = TaskKey("make-exploded-dist", - "Creates a mini-distribution (scala home directory) for this build in a directory.") - lazy val makeDistMappings: TaskKey[Map[File, String]] = TaskKey("make-dist-mappings", - "Creates distribution mappings for creating zips,jars,directorys,etc.") - lazy val buildFixed = AttributeKey[Boolean]("build-uri-fixed") // Build wide settings: override lazy val settings = super.settings ++ Versions.settings ++ Seq( @@ -35,22 +21,7 @@ object ScalaBuild extends Build with Layers { ), organization := "org.scala-lang", version <<= Versions.mavenVersion, - pomExtra := <xml:group> - <inceptionYear>2002</inceptionYear> - <licenses> - <license> - <name>BSD-like</name> - <url>http://www.scala-lang.org/downloads/license.html</url> - </license> - </licenses> - <scm> - <connection>scm:git:git://github.com/scala/scala.git</connection> - </scm> - <issueManagement> - <system>jira</system> - <url>http://issues.scala-lang.org</url> - </issueManagement> - </xml:group>, + pomExtra := epflPomExtra, commands += Command.command("fix-uri-projects") { (state: State) => if(state.get(buildFixed) getOrElse false) state else { @@ -154,26 +125,26 @@ object ScalaBuild extends Build with Layers { // These are setting overrides for most artifacts in the Scala build file. def settingOverrides: Seq[Setting[_]] = publishSettings ++ Seq( - crossPaths := false, - autoScalaLibrary := false, - // Work around a bug where scala-library (and forkjoin) is put on classpath for analysis. - classpathOptions := ClasspathOptions.manual, - publishArtifact in packageDoc := false, - publishArtifact in packageSrc := false, - target <<= (baseDirectory, name) apply (_ / "target" / _), - (classDirectory in Compile) <<= target(_ / "classes"), - javacOptions ++= Seq("-target", "1.5", "-source", "1.5"), - scalaSource in Compile <<= (baseDirectory, name) apply (_ / "src" / _), - javaSource in Compile <<= (baseDirectory, name) apply (_ / "src" / _), - autoScalaLibrary := false, - unmanagedJars in Compile := Seq(), - // Most libs in the compiler use this order to build. - compileOrder in Compile := CompileOrder.JavaThenScala, - lockFile <<= target(_ / "compile.lock"), - skip in Compile <<= lockFile map (_.exists), - lock <<= lockFile map (f => IO.touch(f)), - unlock <<= lockFile map IO.delete - ) + crossPaths := false, + autoScalaLibrary := false, + // Work around a bug where scala-library (and forkjoin) is put on classpath for analysis. + classpathOptions := ClasspathOptions.manual, + publishArtifact in packageDoc := false, + publishArtifact in packageSrc := false, + target <<= (baseDirectory, name) apply (_ / "target" / _), + (classDirectory in Compile) <<= target(_ / "classes"), + javacOptions ++= Seq("-target", "1.5", "-source", "1.5"), + scalaSource in Compile <<= (baseDirectory, name) apply (_ / "src" / _), + javaSource in Compile <<= (baseDirectory, name) apply (_ / "src" / _), + autoScalaLibrary := false, + unmanagedJars in Compile := Seq(), + // Most libs in the compiler use this order to build. + compileOrder in Compile := CompileOrder.JavaThenScala, + lockFile <<= target(_ / "compile.lock"), + skip in Compile <<= lockFile map (_.exists), + lock <<= lockFile map (f => IO.touch(f)), + unlock <<= lockFile map IO.delete + ) // -------------------------------------------------------------- // Libraries used by Scalac that change infrequently @@ -206,7 +177,7 @@ object ScalaBuild extends Build with Layers { } // Locker is a lockable Scala compiler that can be built of 'current' source to perform rapid development. - lazy val (lockerLib, lockerComp) = makeLayer("locker", STARR) + lazy val (lockerLib, lockerComp) = makeLayer("locker", STARR, autoLock = true) lazy val locker = Project("locker", file(".")) aggregate(lockerLib, lockerComp) // Quick is the general purpose project layer for the Scala compiler. |