Last active
August 29, 2015 14:00
-
-
Save sifue/11389701 to your computer and use it in GitHub Desktop.
Play2.1でレイヤー化アーキテクチャを強制するBuild.scala
This file contains 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 play.Project._ | |
object ApplicationBuild extends Build { | |
val appName = "layered" | |
val appVersion = "1.0-SNAPSHOT" | |
override def settings = super.settings ++ com.typesafe.sbtidea.SbtIdeaPlugin.ideaSettings | |
aggregate in Test := true | |
val appDependencies = Seq( | |
// Add your project dependencies here, | |
jdbc, | |
anorm | |
) | |
val main = play.Project(appName, appVersion, appDependencies).settings( | |
// Add your own project settings here | |
).aggregate( | |
// Add all modules for testing | |
layeredApplication, | |
layeredDomain, | |
layeredInfrastructure | |
).dependsOn( | |
layeredApplication, | |
layeredDomain, | |
layeredInfrastructure | |
) | |
lazy val layeredApplication = play.Project( | |
name = "layered-application", | |
path= file("modules/layered-application"), | |
settings = Project.defaultSettings ++ com.typesafe.sbtidea.SbtIdeaPlugin.ideaSettings | |
).dependsOn( | |
layeredDomain, | |
layeredInfrastructure | |
) | |
lazy val layeredDomain = Project( | |
id = "layered-domain", | |
base = file("modules/layered-domain"), | |
settings = Project.defaultSettings ++ com.typesafe.sbtidea.SbtIdeaPlugin.ideaSettings | |
).dependsOn( | |
layeredInfrastructure | |
) | |
lazy val layeredInfrastructure = Project( | |
id = "layered-infrastructure", | |
base = file("modules/layered-infrastructure"), | |
settings = Project.defaultSettings ++ com.typesafe.sbtidea.SbtIdeaPlugin.ideaSettings | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment