Re: Copying static files / compile output among projects.

60 views
Skip to first unread message

edmondo1984

unread,
Aug 23, 2012, 4:36:03 AM8/23/12
to simple-b...@googlegroups.com
I have progressed and the problem which I am facing is how to copy settings among project.

Something like the following:

project1.settings(playExternalAssets += project2.playAssetsDirectory)

project1.settings(resolvers = global.resolvers)

What is the right way of doing it?

Best

Il giorno mercoledì 22 agosto 2012 17:26:13 UTC+2, edmondo1984 ha scritto:
Dear all,
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. 

 I have looked into the Play! 2.0 keys 

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
)

Thank you
Reply all
Reply to author
Forward
0 new messages