forked from lagom/activator-lagom-java
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
61 lines (52 loc) · 2.06 KB
/
build.sbt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
organization in ThisBuild := "sample.helloworld"
// the Scala version that will be used for cross-compiled libraries
scalaVersion in ThisBuild := "2.11.7"
lazy val helloworldApi = project("helloworld-api")
.settings(
version := "1.0-SNAPSHOT",
libraryDependencies += lagomJavadslApi
)
lazy val helloworldImpl = project("helloworld-impl")
.enablePlugins(LagomJava)
.settings(
version := "1.0-SNAPSHOT",
libraryDependencies ++= Seq(
lagomJavadslPersistence,
lagomJavadslTestKit
)
)
.settings(lagomForkedTestSettings: _*)
.dependsOn(helloworldApi)
lazy val hellostreamApi = project("hellostream-api")
.settings(version := "1.0-SNAPSHOT")
.settings(
libraryDependencies += lagomJavadslApi
)
lazy val hellostreamImpl = project("hellostream-impl")
.settings(version := "1.0-SNAPSHOT")
.enablePlugins(LagomJava)
.dependsOn(hellostreamApi, helloworldApi)
.settings(
libraryDependencies += lagomJavadslTestKit
)
def project(id: String) = Project(id, base = file(id))
.settings(eclipseSettings: _*)
.settings(javacOptions in compile ++= Seq("-encoding", "UTF-8", "-source", "1.8", "-target", "1.8", "-Xlint:unchecked", "-Xlint:deprecation"))
.settings(jacksonParameterNamesJavacSettings: _*) // applying it to every project even if not strictly needed.
// See https://github.com/FasterXML/jackson-module-parameter-names
lazy val jacksonParameterNamesJavacSettings = Seq(
javacOptions in compile += "-parameters"
)
// Configuration of sbteclipse
// Needed for importing the project into Eclipse
lazy val eclipseSettings = Seq(
EclipseKeys.projectFlavor := EclipseProjectFlavor.Java,
EclipseKeys.withBundledScalaContainers := false,
EclipseKeys.createSrc := EclipseCreateSrc.Default + EclipseCreateSrc.Resource,
EclipseKeys.eclipseOutput := Some(".target"),
EclipseKeys.withSource := true,
EclipseKeys.withJavadoc := true,
// avoid some scala specific source directories
unmanagedSourceDirectories in Compile := Seq((javaSource in Compile).value),
unmanagedSourceDirectories in Test := Seq((javaSource in Test).value)
)