-
Notifications
You must be signed in to change notification settings - Fork 93
/
build.sbt
60 lines (53 loc) · 1.94 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
import spray.json._
import DefaultJsonProtocol._
name := "magda-metadata"
lazy val packageJson = {
// Ideally, the version of each component would come from the component's own
// package.json. But for now our version number's are synchronized anyway, so
// just use the version in lerna.json.
val source = scala.io.Source.fromFile("lerna.json").mkString
val jsonAst = source.parseJson.asJsObject
Map(
"version" -> jsonAst.getFields("version").head.asInstanceOf[JsString].value
)
}
lazy val commonSettings = Seq(
organization := "au.csiro.data61",
version := packageJson("version"),
scalaVersion := "2.12.10"
)
lazy val root = (project in file("."))
.aggregate(common, searchApi, indexer, registryApi, intTest)
.settings(commonSettings: _*)
lazy val common = (project in file("magda-scala-common"))
.settings(commonSettings: _*)
lazy val searchApi = (project in file("magda-search-api"))
.settings(commonSettings: _*)
.dependsOn(common % "test->test;compile->compile")
.enablePlugins(sbtdocker.DockerPlugin, JavaServerAppPackaging)
.settings(
dockerBaseImage := "openjdk:8-jre"
)
lazy val indexer = (project in file("magda-indexer"))
.settings(commonSettings: _*)
.dependsOn(common % "test->test;compile->compile")
.enablePlugins(sbtdocker.DockerPlugin, JavaServerAppPackaging)
.settings(
dockerBaseImage := "openjdk:8-jre"
)
lazy val registryApi = (project in file("magda-registry-api"))
.settings(commonSettings: _*)
.dependsOn(common)
.enablePlugins(sbtdocker.DockerPlugin, JavaServerAppPackaging)
.settings(
dockerBaseImage := "openjdk:8-jre"
)
lazy val intTest = (project in file("magda-int-test"))
.settings(commonSettings: _*)
.dependsOn(indexer)
.dependsOn(searchApi)
.dependsOn(registryApi % "test->test;compile->compile")
Revolver.settings
Revolver.enableDebugging(port = 8000, suspend = false)
concurrentRestrictions in Global += Tags.limit(Tags.Test, 1)
sbt.Keys.fork in Test := false