generated from teamclairvoyant/scala3-application-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sbt
128 lines (100 loc) · 3.18 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
ThisBuild / scalaVersion := "3.3.0"
ThisBuild / organization := "com.clairvoyant.data.scalaxy"
ThisBuild / credentials += Credentials(
"GitHub Package Registry",
"maven.pkg.github.com",
System.getenv("GITHUB_USERNAME"),
System.getenv("GITHUB_TOKEN")
)
// ----- RESOLVERS ----- //
ThisBuild / resolvers ++= Seq(
"DataScalaxyTestUtil Repo" at "https://maven.pkg.github.com/teamclairvoyant/data-scalaxy-test-util/"
)
// ----- PUBLISH TO GITHUB PACKAGES ----- //
ThisBuild / publishTo := Some(
"Github Repo" at s"https://maven.pkg.github.com/teamclairvoyant/data-scalaxy-reader/"
)
// ----- SCALAFIX ----- //
ThisBuild / semanticdbEnabled := true
ThisBuild / scalafixOnCompile := true
// ----- WARTREMOVER ----- //
ThisBuild / wartremoverErrors ++= Warts.allBut(
Wart.Any,
Wart.DefaultArguments,
Wart.Equals,
Wart.FinalCaseClass,
Wart.ImplicitParameter,
Wart.LeakingSealed,
Wart.Null,
Wart.Overloading,
Wart.Throw,
Wart.TryPartial,
Wart.ToString
)
// ----- TOOL VERSIONS ----- //
val dataScalaxyTestUtilVersion = "1.0.0"
val jsoupVersion = "1.16.1"
val scalaParserCombinatorsVersion = "2.3.0"
val sparkVersion = "3.4.1"
val sparkXMLVersion = "0.16.0"
val zioConfigVersion = "4.0.0-RC16"
val crealyticsVersion = "3.4.1_0.19.0"
val poiVersion = "5.2.5"
// ----- TOOL DEPENDENCIES ----- //
val dataScalaxyTestUtilDependencies = Seq(
"com.clairvoyant.data.scalaxy" %% "test-util" % dataScalaxyTestUtilVersion % Test
)
val jsoupDependencies = Seq(
"org.jsoup" % "jsoup" % jsoupVersion
)
val scalaParserCombinatorsDependencies = Seq(
"org.scala-lang.modules" %% "scala-parser-combinators" % scalaParserCombinatorsVersion
)
val sparkDependencies = Seq(
"org.apache.spark" %% "spark-core" % sparkVersion,
"org.apache.spark" %% "spark-sql" % sparkVersion
)
.map(_ excludeAll ("org.scala-lang.modules", "scala-xml"))
.map(_.cross(CrossVersion.for3Use2_13))
val sparkXMLDependencies = Seq(
"com.databricks" %% "spark-xml" % sparkXMLVersion
).map(_.cross(CrossVersion.for3Use2_13))
val zioConfigDependencies = Seq(
"dev.zio" %% "zio-config-magnolia" % zioConfigVersion
).map(_ excludeAll ("org.scala-lang.modules", "scala-collection-compat"))
val crealyticsDependencies = Seq(
"com.crealytics" %% "spark-excel" % crealyticsVersion
).map(_.cross(CrossVersion.for3Use2_13))
val poiDependencies = Seq(
"org.apache.poi" % "poi" % poiVersion
)
// ----- MODULE DEPENDENCIES ----- //
val textDependencies =
dataScalaxyTestUtilDependencies ++
jsoupDependencies ++
sparkDependencies ++
sparkXMLDependencies ++
zioConfigDependencies
val excelDependencies =
dataScalaxyTestUtilDependencies ++
crealyticsDependencies ++
poiDependencies ++
sparkDependencies ++
zioConfigDependencies
// ----- PROJECTS ----- //
lazy val `data-scalaxy-reader` = (project in file("."))
.settings(
publish / skip := true,
publishLocal / skip := true
)
.aggregate(`reader-text`, `reader-excel`)
lazy val `reader-text` = (project in file("text"))
.settings(
version := "2.0.0",
libraryDependencies ++= textDependencies
)
lazy val `reader-excel` = (project in file("excel"))
.settings(
version := "1.0.0",
libraryDependencies ++= excelDependencies
)