forked from EpamLifeSciencesTeam/cmwl_pipeline
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
136 lines (121 loc) · 4.29 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
import Dependencies._
ThisBuild / version := "0.1"
ThisBuild / scalaVersion := "2.12.9"
ThisBuild / scalacOptions := Seq(
"-encoding",
"utf8",
"-deprecation",
"-Xfatal-warnings",
"-Xlint:unused"
)
ThisBuild / useCoursier := false
lazy val formatAll = taskKey[Unit]("Format all the source code which includes src, test, and build files")
lazy val checkFormat = taskKey[Unit]("Check all the source code which includes src, test, and build files")
lazy val commonSettings = Seq(
formatAll := {
(scalafmt in Compile).value
(scalafmt in Test).value
},
checkFormat := {
(scalafmtCheck in Compile).value
(scalafmtCheck in Test).value
},
compile in Compile := (compile in Compile).dependsOn(checkFormat).value,
test in Test := (test in Test).dependsOn(checkFormat).value,
testOptions in Test += Tests.Argument(TestFrameworks.ScalaTest, "-h", "target/test-reports"),
coverageEnabled in Test := true,
coverageMinimum := 50,
coverageFailOnMinimum := true,
coverageExcludedPackages :=
"cromwell\\.pipeline; cromwell\\.pipeline\\.database.*"
)
addCommandAlias("fmt", "all scalafmtSbt scalafmt test:scalafmt")
addCommandAlias("check", "all scalafmtSbtCheck scalafmtCheck test:scalafmtCheck")
lazy val root = (project in file("."))
.settings(
name := "Cromwell pipeline",
commonSettings
)
.aggregate(portal, datasource, womtool)
lazy val IntegrationTest = config("it").extend(Test)
lazy val datasource = project
.settings(
name := "Datasource",
commonSettings,
libraryDependencies ++= dbDependencies ++ logDependencies :+ configHokon :+ mongoBson :+ mongoDriverCore
)
.dependsOn(utils)
lazy val portal = project
.configs(IntegrationTest)
.enablePlugins(JavaAppPackaging, DockerPlugin)
.settings(
name := "Portal",
commonSettings,
libraryDependencies ++= akkaDependencies ++ jsonDependencies ++ logDependencies :+ configHokon :+ akkaHttpCore :+ akkaHttpCors,
Defaults.itSettings,
Seq(parallelExecution in Test := false),
addCommandAlias("testAll", "; test ; it:test"),
mainClass in Compile := Some("cromwell.pipeline.CromwellPipelineApp")
)
.aggregate(repositories, services, controllers, utils)
.dependsOn(
datasource,
repositories % "compile->compile;test->test",
services,
controllers,
utils % "compile->compile;test->test",
auth
)
lazy val auth =
(project in file("auth"))
.settings(
libraryDependencies ++= jsonDependencies :+ configHokon :+ playJson :+ akkaHttp,
commonSettings
)
.dependsOn(
repositories % "compile->compile;test->test",
utils % "compile->compile;test->test"
)
lazy val utils =
(project in file("utils"))
.configs(IntegrationTest)
.settings(
libraryDependencies ++= (jsonDependencies ++ testContainers ++ coreTestDependencies ++ dbDependencies ++ akkaDependencies) :+ configHokon :+ cats :+ playFunctional :+ pegdown,
commonSettings
)
.dependsOn(model)
lazy val repositories =
(project in file("repositories"))
.settings(
Seq(parallelExecution in Test := false),
libraryDependencies ++= allTestDependencies ++ jsonDependencies ++ mongoDependencies :+ cats :+ slick :+ slickPg :+ slickPgCore :+ configHokon :+ playJson :+ catsKernel :+ playFunctional
)
.configs(IntegrationTest)
.dependsOn(datasource, model, utils % "compile->compile;test->test")
lazy val services =
(project in file("services"))
.settings(libraryDependencies ++= jsonDependencies ++ mongoDependencies :+ cats :+ playJson)
.dependsOn(
repositories % "compile->compile;test->test",
utils % "compile->compile;test->test",
womtool,
model,
auth
)
lazy val controllers =
(project in file("controllers"))
.settings(
libraryDependencies ++= akkaDependencies ++ jsonDependencies :+ cats :+ akkaHttpCore :+ playJson
)
.dependsOn(services, utils, model, repositories % "test->test")
lazy val womtool = (project in file("womtool"))
.configs(IntegrationTest)
.settings(
name := "WomTool",
commonSettings,
libraryDependencies ++= allTestDependencies :+ pegdown :+ configHokon :+ cats,
addCommandAlias("testAll", "; test ; it:test")
)
.dependsOn(repositories)
lazy val model =
(project in file("model")).settings(libraryDependencies ++= jsonDependencies ++ dbDependencies :+ cats)