I am using Play! 2.0 with and I have a question about the build system. I have an aggregate of multiple projects, and I have a shared module which contains static files and some .less files which gets compiled into a css.
How can I copy the static files as well as the output of the compiled stylesheets into other projects? I tried to understand by myself but it appears that, while I can apply easily to a project a setting, I can't retrieve from another project that setting.
val playAssetsDirectories = SettingKey[Seq[File]]("play-assets-directories")
val incrementalAssetsCompilation = SettingKey[Boolean]("play-incremental-assets-compilation")
val playExternalAssets = SettingKey[Seq[(File, File => PathFinder, String)]]("play-external-assets")
But I have no idea on how to use this information to modify my build file.
object ApplicationBuild extends Build {
val appName = "Website"
val appVersion = "1.0-SNAPSHOT"
val appDependencies = Seq(
// Add your project dependencies here,
)
val common = PlayProject(
appName + "-common", appVersion, path = file("modules/common"),mainLang=SCALA,
lessEntryPoints <<= baseDirectory(_ / "app" / "assets" / "stylesheets" ** "bootstrap.less")
)
val website = PlayProject(
appName + "-website", appVersion, path = file("modules/website"),mainLang=SCALA,
).dependsOn(common)
val adminArea = PlayProject(
appName + "-admin", appVersion, path = file("modules/admin"),mainLang=SCALA,
).dependsOn(common)
val main = PlayProject(
appName, appVersion,appDependencies,mainLang=SCALA
).dependsOn(
website, adminArea
)