-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
145 lines (120 loc) · 4.04 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
137
138
139
140
141
142
143
144
/*
build.sbt adapted from https://github.com/pbassiner/sbt-multi-project-example/blob/master/build.sbt
*/
name := "mtb-query-service"
ThisBuild / organization := "de.dnpm.dip"
ThisBuild / scalaVersion := "2.13.13"
ThisBuild / version := "1.0-SNAPSHOT"
//-----------------------------------------------------------------------------
// PROJECTS
//-----------------------------------------------------------------------------
lazy val global = project
.in(file("."))
.settings(
settings,
publish / skip := true
)
.aggregate(
api,
impl
)
lazy val api = project
.settings(
name := "mtb-query-service-api",
settings,
libraryDependencies ++= Seq(
dependencies.scalatest,
dependencies.mtb_model,
dependencies.service_base
)
)
lazy val impl = project
.settings(
name := "mtb-query-service-impl",
settings,
libraryDependencies ++= Seq(
dependencies.scalatest,
dependencies.mtb_generators,
dependencies.connector_base,
dependencies.icd10gm,
dependencies.icdo3,
dependencies.icd_catalogs,
dependencies.atc_impl,
dependencies.atc_catalogs,
dependencies.hgnc_geneset
)
)
.dependsOn(
api
)
//-----------------------------------------------------------------------------
// DEPENDENCIES
//-----------------------------------------------------------------------------
lazy val dependencies =
new {
val scalatest = "org.scalatest" %% "scalatest" % "3.2.17" % Test
val mtb_model = "de.dnpm.dip" %% "mtb-dto-model" % "1.0-SNAPSHOT"
val mtb_generators = "de.dnpm.dip" %% "mtb-dto-generators" % "1.0-SNAPSHOT"
val service_base = "de.dnpm.dip" %% "service-base" % "1.0-SNAPSHOT"
val connector_base = "de.dnpm.dip" %% "connector-base" % "1.0-SNAPSHOT"
val icd10gm = "de.dnpm.dip" %% "icd10gm-impl" % "1.0-SNAPSHOT" % Test
val icdo3 = "de.dnpm.dip" %% "icdo3-impl" % "1.0-SNAPSHOT" % Test
val icd_catalogs = "de.dnpm.dip" %% "icd-claml-packaged" % "1.0-SNAPSHOT" % Test
val atc_impl = "de.dnpm.dip" %% "atc-impl" % "1.0-SNAPSHOT" % Test
val atc_catalogs = "de.dnpm.dip" %% "atc-catalogs-packaged" % "1.0-SNAPSHOT" % Test
val hgnc_geneset = "de.dnpm.dip" %% "hgnc-gene-set-impl" % "1.0-SNAPSHOT" % Test
}
//-----------------------------------------------------------------------------
// SETTINGS
//-----------------------------------------------------------------------------
lazy val settings = commonSettings
// Compiler options from: https://alexn.org/blog/2020/05/26/scala-fatal-warnings/
lazy val compilerOptions = Seq(
// Feature options
"-encoding", "utf-8",
"-explaintypes",
"-feature",
"-language:existentials",
"-language:experimental.macros",
"-language:higherKinds",
"-language:implicitConversions",
"-language:postfixOps",
"-Ymacro-annotations",
// Warnings as errors!
"-Xfatal-warnings",
// Linting options
"-unchecked",
"-Xcheckinit",
"-Xlint:adapted-args",
"-Xlint:constant",
"-Xlint:delayedinit-select",
"-Xlint:deprecation",
"-Xlint:doc-detached",
"-Xlint:inaccessible",
"-Xlint:infer-any",
"-Xlint:missing-interpolator",
"-Xlint:nullary-unit",
"-Xlint:option-implicit",
"-Xlint:package-object-classes",
"-Xlint:poly-implicit-overload",
"-Xlint:private-shadow",
"-Xlint:stars-align",
"-Xlint:type-parameter-shadow",
"-Wdead-code",
"-Wextra-implicit",
"-Wnumeric-widen",
"-Wunused:imports",
"-Wunused:locals",
"-Wunused:patvars",
"-Wunused:privates",
"-Wunused:implicits",
"-Wvalue-discard",
// Deactivated to avoid many false positives from 'evidence' parameters in context bounds
// "-Wunused:params",
)
lazy val commonSettings = Seq(
scalacOptions ++= compilerOptions,
resolvers ++= Seq("Local Maven Repository" at "file://" + Path.userHome.absolutePath + "/.m2/repository") ++
Resolver.sonatypeOssRepos("releases") ++
Resolver.sonatypeOssRepos("snapshots")
)