-
Notifications
You must be signed in to change notification settings - Fork 5
/
build.sbt
99 lines (90 loc) · 3.25 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
ThisBuild / versionScheme := Some("strict")
// Build configuration
ThisBuild / scalaVersion := "2.12.12"
ThisBuild / organization := "com.amadeus.dataio"
val sparkVersion = settingKey[String]("The version of Spark used for building.")
ThisBuild / sparkVersion := sys.env.getOrElse("SPARK_VERSION_OVERRIDE", "3.4.1")
// Common dependencies
ThisBuild / libraryDependencies ++= Seq(
// Core
"org.apache.logging.log4j" %% "log4j-api-scala" % "12.0",
"org.apache.logging.log4j" % "log4j-api" % "2.19.0",
"com.typesafe" % "config" % "1.4.0",
"commons-io" % "commons-io" % "2.9.0",
// Spark
"org.apache.spark" %% "spark-sql-kafka-0-10" % sparkVersion.value,
"org.apache.spark" %% "spark-sql" % sparkVersion.value,
"org.apache.spark" %% "spark-core" % sparkVersion.value,
"net.snowflake" %% "spark-snowflake" % f"2.15.0-spark_3.4"
)
// Tests configuration
ThisBuild / Test / parallelExecution := false
ThisBuild / Test / publishArtifact := false
// Publication configuration
ThisBuild / publishTo := Some("GitHub Packages" at "https://maven.pkg.github.com/AmadeusITGroup/dataio-framework")
ThisBuild / credentials += Credentials(
"GitHub Package Registry",
"maven.pkg.github.com",
"",
sys.env.getOrElse("GITHUB_REGISTRY_TOKEN", "")
)
ThisBuild / publishMavenStyle := true
ThisBuild / pomIncludeRepository := { _ => true }
ThisBuild / pomExtra :=
<url>https://github.com/AmadeusITGroup/dataio-framework</url>
<licenses>
<license>
<name>Apache License 2.0</name>
<url>https://github.com/AmadeusITGroup/dataio-framework/blob/main/LICENSE</url>
</license>
</licenses>
// Release configuration
import ReleaseTransformations._
releaseVersionBump := sbtrelease.Version.Bump.Minor
releaseProcess := Seq[ReleaseStep](
checkSnapshotDependencies,
inquireVersions,
runClean,
runTest,
setReleaseVersion,
commitReleaseVersion,
tagRelease,
publishArtifacts,
setNextVersion,
commitNextVersion,
pushChanges
)
// Projects configuration
lazy val root = (project in file("."))
.aggregate(core, test)
.settings(
publishArtifact := false
)
lazy val core = (project in file("core"))
.settings(
name := "dataio-core",
libraryDependencies ++= Seq(
// Distribution
"javax.mail" % "mail" % "1.4.7",
// Input / Output
"org.elasticsearch" %% "elasticsearch-spark-30" % "8.4.3"
exclude ("org.scala-lang", "scala-library")
exclude ("org.scala-lang", "scala-reflect")
exclude ("org.slf4j", "slf4j-api")
exclude ("org.apache.spark", "spark-core_" + scalaVersion.value.substring(0, 4))
exclude ("org.apache.spark", "spark-sql_" + scalaVersion.value.substring(0, 4))
exclude ("org.apache.spark", "spark-catalyst_" + scalaVersion.value.substring(0, 4))
exclude ("org.apache.spark", "spark-streaming_" + scalaVersion.value.substring(0, 4)),
// Tests
"org.scalatest" %% "scalatest" % "3.2.16" % Test,
"org.scalamock" %% "scalamock" % "5.2.0" % Test
)
)
lazy val test = (project in file("test"))
.settings(
name := "dataio-test",
libraryDependencies ++= Seq(
"org.scalatest" %% "scalatest" % "3.2.16",
"org.scalamock" %% "scalamock" % "5.2.0"
)
)