Created
October 9, 2012 02:05
-
-
Save lakshminarayanan/3856157 to your computer and use it in GitHub Desktop.
Multi module build
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sbt._ | |
import Keys._ | |
import PlayProject._ | |
/* | |
* This contains a data project with models. It also contains a frontend web | |
* app. Finally, there is a backend project. The backend project is just a copy | |
* of the fronend project for demonstration purposes, but in real life may | |
* contain heavy data batch processing jobs or similar. Both projects rely on | |
* the same database and so must both depend on the data project which contains | |
* the models. | |
*/ | |
object ApplicationBuild extends Build { | |
val appName = "example" | |
val appVersion = "1.0-SNAPSHOT" | |
val dataDependencies = Seq( | |
) | |
val frontendDependencies = Seq( | |
) | |
val backendDependencies = Seq( | |
) | |
def customLessEntryPoints(base: File): PathFinder = ( | |
(base / "frontend" / "app" / "assets" / "stylesheets" * "frontend.css.less") | |
) | |
val dataProject = PlayProject(appName + "-data", appVersion, dataDependencies, path = file("data"), mainLang = JAVA) | |
val frontend = PlayProject(appName + "-frontend", appVersion, frontendDependencies, path = file("frontend"), mainLang = JAVA).dependsOn(dataProject).aggregate(dataProject) | |
val backend = PlayProject(appName + "-backend", appVersion, backendDependencies, path = file("backend"), mainLang = JAVA).dependsOn(dataProject).aggregate(dataProject) | |
val main = PlayProject(appName).dependsOn(frontend,backend).aggregate (frontend,backend).settings ( | |
lessEntryPoints <<= baseDirectory(_ / "frontend" / "app" / "assets" / "stylesheets" ** "*.less") | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment