This repository has been archived by the owner on Jul 12, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
71 lines (65 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
62
63
64
65
66
67
68
69
70
71
coverageMinimum := 15 //Update this once there're more tests
coverageFailOnMinimum := true
lazy val hamm = project.in(file("."))
.settings(
skip in publish := true,
Settings.commonSettings
)
.aggregate(core, automation, server, costUpdater)
lazy val core =
project
.in(file("core"))
.enablePlugins(BuildInfoPlugin)
.settings(
libraryDependencies ++= Dependencies.common,
Settings.commonSettings,
Settings.buildInfoSettings,
// This is not ideal, but BuildInfoPlugin doesn't work as expected for core
sourceGenerators in Compile += Def.task {
val outDir = (sourceManaged in Compile).value / "hammBuildInfo"
val outFile = new File(outDir, "buildinfo.scala")
outDir.mkdirs
val v = version.value
val t = System.currentTimeMillis
IO.write(outFile,
s"""|package org.broadinstitute.dsp.workbench.hamm
|
|/** Auto-generated build information. */
|object BuildInfo {
| val version = "$v"
| val buildTime = new java.util.Date(${t}L)
| val gitHeadCommit = "${git.gitHeadCommit.value.getOrElse("")}"
|}
|""".stripMargin)
Seq(outFile)
}.taskValue
)
lazy val server =
project
.in(file("server"))
.enablePlugins(JavaAppPackaging)
.settings(
libraryDependencies ++= Dependencies.server,
Settings.serverSettings
)
.dependsOn(core % "test->test;compile->compile")
lazy val costUpdater =
project
.in(file("cost-updater"))
.enablePlugins(JavaAppPackaging)
.settings(
libraryDependencies ++= Dependencies.costUpdater,
Settings.costUpdaterSettings,
Settings.buildInfoSettings
)
.dependsOn(core % "test->test;compile->compile")
lazy val automation =
project
.in(file("automation"))
.settings(
libraryDependencies ++= Dependencies.automation,
Settings.commonSettings,
Settings.buildInfoSettings
)
.dependsOn(core)
.dependsOn(server % "test->test;compile->compile")