Skip to content

Instantly share code, notes, and snippets.

@elm-

elm-/Build.scala Secret

Created October 14, 2015 08:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save elm-/538a6895be605517c0a1 to your computer and use it in GitHub Desktop.
Save elm-/538a6895be605517c0a1 to your computer and use it in GitHub Desktop.
object Build {
lazy val root = Project(id = "cupenya-root",
base = file("."))
.settings(basicSettings: _*)
.aggregate(engineApi, engineCore, frontendApi, frontendCore, consoleTools)
lazy val engineApi = Project(id = "engine-api",
base = file("engine-api"))
.settings(basicSettings: _*)
lazy val engineCore = Project(id = "engine-core",
base = file("engine-core"))
.settings(basicSettings: _*)
.settings(sprayRunSettings: _*)
.settings(aspectJSettings: _*)
.dependsOn(engineApi)
lazy val frontendApi = Project(id = "frontend-api",
base = file("frontend-api"))
.settings(basicSettings: _*)
.dependsOn(engineApi)
lazy val frontendCore = Project(id = "frontend-core",
base = file("frontend-core"))
.settings(basicSettings: _*)
.settings(sprayRunSettings: _*)
.settings(aspectJSettings: _*)
lazy val consoleTools = Project(id = "console-tools",
base = file("console-tools"))
.settings(basicSettings: _*)
.settings(sprayRunSettings: _*)
}
object BuildSettings {
lazy val basicSettings = Seq(
organization := "***",
scalaVersion := "2.11.7",
resolvers ++= Dependencies.resolutionRepos,
credentials += Credentials(Path.userHome / ".sbt" / ".credentials"),
javaOptions += "-XX:+HeapDumpOnOutOfMemoryError",
javaOptions += "-Xmx8G",
javaOptions += "-XX:MaxPermSize=512M",
javaOptions += "-XX:+CMSClassUnloadingEnabled",
javaOptions += "-XX:+UseConcMarkSweepGC",
scalacOptions := Seq(
"-encoding", "utf8",
"-feature",
"-unchecked",
"-deprecation",
"-target:jvm-1.7",
"-Xlog-reflective-calls",
// "-Xlog-implicits",
"-optimise",
"-Yclosure-elim",
"-Yinline",
"-Ybackend:GenBCode"
),
incOptions := incOptions.value.withNameHashing(false),
// for WAR packing
exportJars := true,
// generate junit report
testOptions in Test += Tests.Argument(TestFrameworks.Specs2, "console", "junitxml")
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment