summaryrefslogtreecommitdiff
path: root/project/Layers.scala
diff options
context:
space:
mode:
authorJosh Suereth <joshua.suereth@gmail.com>2011-12-06 13:13:02 -0500
committerJosh Suereth <joshua.suereth@gmail.com>2011-12-06 13:13:02 -0500
commit4c76201be849b658e29004cd5749f18198547b5d (patch)
tree30094fa717806446fb162315fcfdb65a196763ac /project/Layers.scala
parent57eb3abad07a5a8e07f84312857098e0bb22bcf4 (diff)
downloadscala-4c76201be849b658e29004cd5749f18198547b5d.tar.gz
scala-4c76201be849b658e29004cd5749f18198547b5d.tar.bz2
scala-4c76201be849b658e29004cd5749f18198547b5d.zip
Fixed publish issue.
* Cleaned up layered build settings definition * Removed scalaVersion specification from build (not NEEDED). * Fixed a migration from build.sbt to project/Build.scala where publish settings were only being used on the root project and not also used for sub-projects which are published.
Diffstat (limited to 'project/Layers.scala')
-rw-r--r--project/Layers.scala67
1 files changed, 33 insertions, 34 deletions
diff --git a/project/Layers.scala b/project/Layers.scala
index 84c926f072..50037f8f9f 100644
--- a/project/Layers.scala
+++ b/project/Layers.scala
@@ -48,42 +48,41 @@ trait Layers extends Build {
* Note: The library and compiler are not *complete* in the sense that they are missing things like "actors" and "fjbg".
*/
def makeLayer(layer: String, referenceScala: Setting[Task[ScalaInstance]]) : (Project, Project) = {
- val library = Project(layer + "-library", file(".")) settings( (settingOverrides ++
- Seq(version := layer,
- // TODO - use depends on.
- unmanagedClasspath in Compile <<= (exportedProducts in forkjoin in Compile).identity,
- managedClasspath in Compile := Seq(),
- scalaSource in Compile <<= (baseDirectory) apply (_ / "src" / "library"),
- resourceDirectory in Compile <<= baseDirectory apply (_ / "src" / "library"),
- defaultExcludes in unmanagedResources := ("*.scala" | "*.java" | "*.disabled"),
- // TODO - Allow other scalac option settings.
- scalacOptions in Compile <++= (scalaSource in Compile) map (src => Seq("-sourcepath", src.getAbsolutePath)),
- classpathOptions := ClasspathOptions.manual,
- resourceGenerators in Compile <+= (baseDirectory, version, resourceManaged, gitRunner) map Release.generatePropertiesFile("library.properties"),
- referenceScala
- )) :_*)
+ val library = Project(layer + "-library", file(".")) settings(settingOverrides: _*) settings(
+ version := layer,
+ // TODO - use depends on.
+ unmanagedClasspath in Compile <<= (exportedProducts in forkjoin in Compile).identity,
+ managedClasspath in Compile := Seq(),
+ scalaSource in Compile <<= (baseDirectory) apply (_ / "src" / "library"),
+ resourceDirectory in Compile <<= baseDirectory apply (_ / "src" / "library"),
+ defaultExcludes in unmanagedResources := ("*.scala" | "*.java" | "*.disabled"),
+ // TODO - Allow other scalac option settings.
+ scalacOptions in Compile <++= (scalaSource in Compile) map (src => Seq("-sourcepath", src.getAbsolutePath)),
+ classpathOptions := ClasspathOptions.manual,
+ resourceGenerators in Compile <+= (baseDirectory, version, resourceManaged, gitRunner) map Release.generatePropertiesFile("library.properties"),
+ referenceScala
+ )
// Define the compiler
- val compiler = Project(layer + "-compiler", file(".")) settings((settingOverrides ++
- Seq(version := layer,
- scalaSource in Compile <<= (baseDirectory) apply (_ / "src" / "compiler"),
- resourceDirectory in Compile <<= baseDirectory apply (_ / "src" / "compiler"),
- defaultExcludes in unmanagedResources := "*.scala",
- resourceGenerators in Compile <+= (baseDirectory, version, resourceManaged, gitRunner) map Release.generatePropertiesFile("compiler.properties"),
- // Note, we might be able to use the default task, but for some reason ant was filtering files out. Not sure what's up, but we'll
- // stick with that for now.
- unmanagedResources in Compile <<= (baseDirectory) map {
- (bd) =>
- val dirs = Seq(bd / "src" / "compiler")
- dirs.descendentsExcept( ("*.xml" | "*.html" | "*.gif" | "*.png" | "*.js" | "*.css" | "*.tmpl" | "*.swf" | "*.properties" | "*.txt"),"*.scala").get
- },
- // TODO - Use depends on *and* SBT's magic dependency mechanisms...
- unmanagedClasspath in Compile <<= Seq(forkjoin, library, fjbg, jline, msil).map(exportedProducts in Compile in _).join.map(_.flatten),
- classpathOptions := ClasspathOptions.manual,
- externalDeps,
- referenceScala
- )
- ):_*)
+ val compiler = Project(layer + "-compiler", file(".")) settings(settingOverrides:_*) settings(
+ version := layer,
+ scalaSource in Compile <<= (baseDirectory) apply (_ / "src" / "compiler"),
+ resourceDirectory in Compile <<= baseDirectory apply (_ / "src" / "compiler"),
+ defaultExcludes in unmanagedResources := "*.scala",
+ resourceGenerators in Compile <+= (baseDirectory, version, resourceManaged, gitRunner) map Release.generatePropertiesFile("compiler.properties"),
+ // Note, we might be able to use the default task, but for some reason ant was filtering files out. Not sure what's up, but we'll
+ // stick with that for now.
+ unmanagedResources in Compile <<= (baseDirectory) map {
+ (bd) =>
+ val dirs = Seq(bd / "src" / "compiler")
+ dirs.descendentsExcept( ("*.xml" | "*.html" | "*.gif" | "*.png" | "*.js" | "*.css" | "*.tmpl" | "*.swf" | "*.properties" | "*.txt"),"*.scala").get
+ },
+ // TODO - Use depends on *and* SBT's magic dependency mechanisms...
+ unmanagedClasspath in Compile <<= Seq(forkjoin, library, fjbg, jline, msil).map(exportedProducts in Compile in _).join.map(_.flatten),
+ classpathOptions := ClasspathOptions.manual,
+ externalDeps,
+ referenceScala
+ )
// Return the generated projects.
(library, compiler)