Skip to content

Commit

Permalink
[fixes lh 659] make sure subprojects' artifacts are included in the d…
Browse files Browse the repository at this point in the history
…istribution
  • Loading branch information
ph2734 committed Sep 8, 2012
1 parent a6287e1 commit fc21cc9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
8 changes: 3 additions & 5 deletions framework/src/sbt-plugin/src/main/scala/PlayCommands.scala
Expand Up @@ -91,11 +91,11 @@ trait PlayCommands extends PlayAssetsCompiler with PlayEclipse {
val prefix = "javascripts" + java.io.File.separator
val subDir = prefix + requireSubFolder
val rjoldDir = crossTarget / "classes" / "public" / subDir
val rjnewDir = new java.io.File(rjoldDir.getAbsolutePath + "-min")
val jsFiles = (rjoldDir ** "*.js").filter(_.getName.endsWith("min.js") == false).get.toSet
val buildDesc = crossTarget / "classes" / "public" / buildDescName
val relativeModulePath = (file: File) => rjoldDir.toURI.relativize(file.toURI).toString.replace(".js", "")
if (jsFiles.isEmpty == false) {
val rjnewDir = new java.io.File(rjoldDir.getAbsolutePath + "-min")
val relativeModulePath = (file: File) => rjoldDir.toURI.relativize(file.toURI).toString.replace(".js", "")
IO.write(buildDesc,
"""({
appDir: """" + subDir + """",
Expand All @@ -121,12 +121,10 @@ trait PlayCommands extends PlayAssetsCompiler with PlayEclipse {
cr
}

val buildRequireAndPackage = TaskKey[File]("play-build-require-and-package")
val buildRequireAndPackageTask = (packageBin in Compile).dependsOn(buildRequire)

val playPackageEverything = TaskKey[Seq[File]]("play-package-everything")
val playPackageEverythingTask = (state, thisProjectRef, crossTarget) flatMap { (s, r, crossTarget) =>
inAllDependencies(r, buildRequireAndPackage.task, Project structure s).join
inAllDependencies(r, (packageBin in Compile).task, Project structure s).join
}

val playCopyAssets = TaskKey[Seq[(File, File)]]("play-copy-assets")
Expand Down
2 changes: 1 addition & 1 deletion framework/src/sbt-plugin/src/main/scala/PlaySettings.scala
Expand Up @@ -178,7 +178,7 @@ trait PlaySettings {

buildRequire <<= buildRequireTask,

buildRequireAndPackage <<= buildRequireAndPackageTask,
packageBin in Compile <<= (packageBin in Compile).dependsOn(buildRequire),

resourceGenerators in Compile <+= LessCompiler,
resourceGenerators in Compile <+= CoffeescriptCompiler,
Expand Down

0 comments on commit fc21cc9

Please sign in to comment.