diff options
author | Josh Suereth <joshua.suereth@gmail.com> | 2011-12-29 08:38:39 -0500 |
---|---|---|
committer | Josh Suereth <joshua.suereth@gmail.com> | 2011-12-29 08:38:39 -0500 |
commit | 716ef5b0a6b4da94f44234226782a3f3d473fa5e (patch) | |
tree | 9fdf3578a1a39a09987ed01b98cf3aab8915dfd1 /project/Build.scala | |
parent | 0947d08eef6397efe6dd97c41cf480ff13762591 (diff) | |
download | scala-716ef5b0a6b4da94f44234226782a3f3d473fa5e.tar.gz scala-716ef5b0a6b4da94f44234226782a3f3d473fa5e.tar.bz2 scala-716ef5b0a6b4da94f44234226782a3f3d473fa5e.zip |
All projects can be locked now.
* Added 'lock' key to write 'compile.lock' file to target dir.
* Added 'unlock' key to delete 'compile.lock' file to target dir.
Diffstat (limited to 'project/Build.scala')
-rw-r--r-- | project/Build.scala | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/project/Build.scala b/project/Build.scala index 297f82e515..abab775666 100644 --- a/project/Build.scala +++ b/project/Build.scala @@ -11,6 +11,9 @@ object ScalaBuild extends Build with Layers { "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", @@ -164,7 +167,9 @@ object ScalaBuild extends Build with Layers { // 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) + skip in Compile <<= lockFile.map(_ exists), + lock <<= lockFile map { f => IO.touch(f) }, + unlock <<= lockFile map IO.delete ) // -------------------------------------------------------------- |