-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild.sbt
195 lines (155 loc) · 6.07 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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
ThisBuild / scalaVersion := "3.3.1"
ThisBuild / credentials += Credentials(
"GitHub Package Registry",
"maven.pkg.github.com",
System.getenv("GITHUB_USERNAME"),
System.getenv("GITHUB_TOKEN")
)
// ----- RESOLVERS ----- //
ThisBuild / resolvers ++= Seq(
"DataScalaxyReader Repo" at "https://maven.pkg.github.com/teamclairvoyant/data-scalaxy-reader/",
"DataScalaxyTestUtil Repo" at "https://maven.pkg.github.com/teamclairvoyant/data-scalaxy-test-util/",
"DataScalaxyTransformer Repo" at "https://maven.pkg.github.com/teamclairvoyant/data-scalaxy-transformer/",
"DataScalaxyWriter Repo" at "https://maven.pkg.github.com/teamclairvoyant/data-scalaxy-writer/"
)
// ----- PACKAGE SETTINGS ----- //
ThisBuild / organization := "com.clairvoyant"
ThisBuild / version := "3.2.0"
// ----- PUBLISH TO GITHUB PACKAGES ----- //
ThisBuild / publishTo := Some("Restonomer Github Repo" at "https://maven.pkg.github.com/teamclairvoyant/restonomer/")
// ----- ASSEMBLY MERGE STRATEGY ----- //
ThisBuild / assemblyMergeStrategy := {
case PathList(ps @ _*)
if Seq(
".properties",
".dat",
".proto",
".txt",
".gitkeep",
".class"
).exists(ps.last endsWith _) =>
MergeStrategy.last
case x => (ThisBuild / assemblyMergeStrategy).value(x)
}
// ----- SCALA COMPILER OPTIONS ----- //
Global / scalacOptions ++= Seq("-Xmax-inlines", "100")
// ----- SCALAFIX ----- //
ThisBuild / semanticdbEnabled := true
ThisBuild / scalafixOnCompile := true
// ----- WARTREMOVER ----- //
ThisBuild / wartremoverErrors ++= Warts.allBut(
Wart.Any,
Wart.DefaultArguments,
Wart.Equals,
Wart.FinalCaseClass,
Wart.GlobalExecutionContext,
Wart.ImplicitParameter,
Wart.IsInstanceOf,
Wart.IterableOps,
Wart.LeakingSealed,
Wart.Nothing,
Wart.OptionPartial,
Wart.Overloading,
Wart.PlatformDefault,
Wart.Recursion,
Wart.RedundantConversions,
Wart.StringPlusAny,
Wart.Throw,
Wart.ToString
)
// ----- TOOL VERSIONS ----- //
val catsVersion = "2.10.0"
val dataScalaxyReaderVersion = "2.0.0"
val dataScalaxyTestUtilVersion = "1.0.0"
val dataScalaxyTransformerVersion = "1.2.0"
val dataScalaxyWriterAWSVersion = "2.0.0"
val dataScalaxyWriterGCPVersion = "2.0.0"
val dataScalaxyWriterLocalFileSystemVersion = "2.0.0"
val googleCloudStorageVersion = "2.32.1"
val jsonPathVersion = "2.9.0"
val jwtCoreVersion = "10.0.0"
val monovoreDeclineVersion = "2.4.1"
val odelayVersion = "0.4.0"
val scalaParserCombinatorsVersion = "2.3.0"
val scalaXmlVersion = "2.2.0"
val sparkMLLibVersion = "3.5.0"
val sttpVersion = "3.9.2"
val testContainersScalaVersion = "0.41.2"
val wireMockVersion = "3.0.1"
val zioConfigVersion = "4.0.0-RC16"
// ----- TOOL DEPENDENCIES ----- //
val catsDependencies = Seq(
"org.typelevel" %% "cats-core" % catsVersion
)
val dataScalaxyReaderDependencies = Seq(
"com.clairvoyant.data.scalaxy" %% "reader-text" % dataScalaxyReaderVersion
)
val dataScalaxyTestUtilDependencies = Seq(
"com.clairvoyant.data.scalaxy" %% "test-util" % dataScalaxyTestUtilVersion % "it,test"
)
val dataScalaxyTransformerDependencies = Seq(
"com.clairvoyant.data.scalaxy" %% "transformer" % dataScalaxyTransformerVersion
)
val dataScalaxyWriterDependencies = Seq(
"com.clairvoyant.data.scalaxy" %% "writer-local-file-system" % dataScalaxyWriterLocalFileSystemVersion,
"com.clairvoyant.data.scalaxy" %% "writer-aws" % dataScalaxyWriterAWSVersion,
"com.clairvoyant.data.scalaxy" %% "writer-gcp" % dataScalaxyWriterGCPVersion
)
val googleCloudStorageDependencies = Seq("com.google.cloud" % "google-cloud-storage" % googleCloudStorageVersion)
val sparkMLLibDependencies = Seq("org.apache.spark" %% "spark-mllib" % sparkMLLibVersion)
.map(_.cross(CrossVersion.for3Use2_13))
.map(_.excludeAll("org.typelevel", "cats-kernel"))
val jsonPathDependencies = Seq("com.jayway.jsonpath" % "json-path" % jsonPathVersion)
val jwtCoreDependencies = Seq("com.github.jwt-scala" %% "jwt-core" % jwtCoreVersion)
val monovoreDeclineDependencies = Seq("com.monovore" %% "decline" % monovoreDeclineVersion)
val odelayDependencies = Seq("com.softwaremill.odelay" %% "odelay-core" % odelayVersion)
val scalaParserCombinatorsDependencies = Seq(
"org.scala-lang.modules" %% "scala-parser-combinators" % scalaParserCombinatorsVersion
)
val scalaXmlDependencies = Seq("org.scala-lang.modules" %% "scala-xml" % scalaXmlVersion)
val sttpDependencies = Seq("com.softwaremill.sttp.client3" %% "core" % sttpVersion)
val testContainersScalaDependencies = Seq("com.dimafeng" %% "testcontainers-scala" % testContainersScalaVersion % Test)
val wireMockDependencies = Seq("com.github.tomakehurst" % "wiremock-standalone" % wireMockVersion % "it,test")
val zioConfigDependencies = Seq(
"dev.zio" %% "zio-config" % zioConfigVersion,
"dev.zio" %% "zio-config-magnolia" % zioConfigVersion,
"dev.zio" %% "zio-config-typesafe" % zioConfigVersion
)
// ----- MODULE DEPENDENCIES ----- //
val restonomerDependencies =
catsDependencies ++
dataScalaxyReaderDependencies ++
dataScalaxyTestUtilDependencies ++
dataScalaxyTransformerDependencies ++
dataScalaxyWriterDependencies ++
googleCloudStorageDependencies ++
jsonPathDependencies ++
jwtCoreDependencies ++
monovoreDeclineDependencies ++
odelayDependencies ++
scalaParserCombinatorsDependencies ++
scalaXmlDependencies ++
sparkMLLibDependencies ++
sttpDependencies ++
testContainersScalaDependencies ++
wireMockDependencies ++
zioConfigDependencies
// ----- PROJECTS ----- //
lazy val restonomer = (project in file("."))
.configs(IntegrationTest)
.settings(
libraryDependencies ++= restonomerDependencies
.map { dependency =>
if (dependency.organization == "org.apache.spark")
dependency % "provided"
else
dependency
}
.map(_ excludeAll ("org.scala-lang.modules", "scala-collection-compat")),
Test / parallelExecution := false,
IntegrationTest / parallelExecution := false,
Defaults.itSettings,
scalafixConfigSettings(IntegrationTest),
assembly / mainClass := Some("com.clairvoyant.restonomer.app.RestonomerApp")
)
.enablePlugins(AssemblyPlugin)