From 4c76201be849b658e29004cd5749f18198547b5d Mon Sep 17 00:00:00 2001 From: Josh Suereth Date: Tue, 6 Dec 2011 13:13:02 -0500 Subject: 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. --- project/Layers.scala | 67 ++++++++++++++++++++++++++-------------------------- 1 file changed, 33 insertions(+), 34 deletions(-) (limited to 'project/Layers.scala') 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) -- cgit v1.2.3