diff options
-rw-r--r-- | project/Layers.scala | 4 | ||||
-rw-r--r-- | project/Versions.scala | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/project/Layers.scala b/project/Layers.scala index 9438c752b5..3d6d780f8f 100644 --- a/project/Layers.scala +++ b/project/Layers.scala @@ -59,7 +59,7 @@ trait Layers extends Build { // TODO - Allow other scalac option settings. scalacOptions in Compile <++= (scalaSource in Compile) map (src => Seq("-sourcepath", src.getAbsolutePath)), classpathOptions := ClasspathOptions.manual, - resourceGenerators in Compile <+= (resourceManaged, Versions.scalaVersions, streams) map Versions.generateVersionPropertiesFile("library.properties"), + resourceGenerators in Compile <+= (resourceManaged, Versions.scalaVersions, skip in Compile, streams) map Versions.generateVersionPropertiesFile("library.properties"), referenceScala ) @@ -71,7 +71,7 @@ trait Layers extends Build { unmanagedSourceDirectories in Compile <+= (baseDirectory) apply (_ / "src" / "msil"), defaultExcludes := ("tests"), defaultExcludes in unmanagedResources := "*.scala", - resourceGenerators in Compile <+= (resourceManaged, Versions.scalaVersions, streams) map Versions.generateVersionPropertiesFile("compiler.properties"), + resourceGenerators in Compile <+= (resourceManaged, Versions.scalaVersions, skip in Compile, streams) map Versions.generateVersionPropertiesFile("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 { diff --git a/project/Versions.scala b/project/Versions.scala index 5f1fe0cacc..b588ec55ac 100644 --- a/project/Versions.scala +++ b/project/Versions.scala @@ -46,7 +46,7 @@ object Versions { /** This generates a properties file, if it does not already exist, with the maximum lastmodified timestamp * of any source file. */ - def generateVersionPropertiesFile(name: String)(dir: File, versions: VersionInfo, s: TaskStreams): Seq[File] = { + def generateVersionPropertiesFile(name: String)(dir: File, versions: VersionInfo, skip: Boolean, s: TaskStreams): Seq[File] = { // TODO - We can probably clean this up by moving caching bits elsewhere perhaps.... val target = dir / name // TODO - Regenerate on triggers, like recompilation or something... @@ -56,7 +56,7 @@ object Versions { try props.load(in) finally in.close() versions.canonical == (props getProperty "version.number") } - if (!target.exists || !hasSameVersion) { + if (!target.exists || !(skip || hasSameVersion)) { makeVersionPropertiesFile(target, versions) } target :: Nil |