-
Notifications
You must be signed in to change notification settings - Fork 12
/
build.sbt
103 lines (89 loc) · 3.17 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
import ReleaseTransformations._
resolvers += Resolver.mavenLocal
ThisBuild / scalaVersion := "2.12.18"
crossScalaVersions := Seq("2.12.18", "2.13.12")
lazy val root = (project in file("."))
.settings(
name := "spark-connector",
idePackagePrefix := Some("io.weaviate.spark")
)
ThisBuild / scalafixDependencies += "org.scalalint" %% "rules" % "0.2.1" % "runtime"
lazy val sparkVersion = "3.5.0"
lazy val weaviateClientVersion = "4.5.1"
libraryDependencies ++= Seq(
"org.scalatest" %% "scalatest" % "3.2.17" % "test",
"org.apache.spark" %% "spark-core" % sparkVersion % "provided,test",
"org.apache.spark" %% "spark-sql" % sparkVersion % "provided,test",
"org.apache.spark" %% "spark-catalyst" % sparkVersion % "provided,test",
"org.scala-lang.modules" %% "scala-collection-compat" % "2.11.0",
"io.weaviate" % "client" % weaviateClientVersion,
"io.grpc" % "grpc-netty-shaded" % "1.60.1"
)
assemblyShadeRules in assembly := Seq(
ShadeRule.rename("com.google.protobuf.**" -> "shade_proto.@1").inAll,
ShadeRule.rename("com.google.common.**" -> "shade_googlecommon.@1").inAll
)
ThisBuild / organization := "io.weaviate"
ThisBuild / organizationName := "Weaviate B.V."
ThisBuild / organizationHomepage := Some(url("https://weaviate.io"))
ThisBuild / scmInfo := Some(
ScmInfo(
url("https://github.com/weaviate/spark-connector/tree/main"),
"scm:git@github.com:weaviate/spark-connector.git"
)
)
ThisBuild / developers := List(
Developer(
id = "aliszka",
name = "Andrzej Liszka",
email = "andrzej@weaviate.io",
url = url("https://github.com/aliszka")
),
Developer(
id = "samos123",
name = "Sam Stoelinga",
email = "",
url = url("https://github.com/samos123")
),
Developer(
id = "sam-h-bean",
name = "Sam Bean",
email = "",
url = url("https://github.com/sam-h-bean")
),
)
ThisBuild / description := "Weaviate Spark Connector to use in Spark ETLs to populate a Weaviate vector database."
ThisBuild / licenses := List(
"Weaviate B.V. License" -> new URL("https://github.com/weaviate/spark-connector/blob/main/LICENSE")
)
ThisBuild / homepage := Some(url("https://github.com/weaviate/spark-connector"))
// Fix for "deduplicate: different file contents found in the following" error
ThisBuild / assemblyMergeStrategy := {
case PathList("module-info.class") => MergeStrategy.discard
case x if x.endsWith("/module-info.class") => MergeStrategy.discard
case x =>
val oldStrategy = (ThisBuild / assemblyMergeStrategy).value
oldStrategy(x)
}
Test / parallelExecution := false
// Remove all additional repository other than Maven Central from POM
pomIncludeRepository := { _ => false }
publishMavenStyle := true
publishTo := sonatypePublishToBundle.value
sonatypeCredentialHost := "s01.oss.sonatype.org"
sonatypeRepository := "https://s01.oss.sonatype.org/service/local"
sonatypeProfileName := "io.weaviate"
// Custom release process
releaseProcess := Seq[ReleaseStep](
checkSnapshotDependencies,
inquireVersions,
runClean,
runTest,
setReleaseVersion,
commitReleaseVersion,
tagRelease,
// publishArtifacts, // done by CI on tag push
setNextVersion,
commitNextVersion,
// pushChanges // done manually
)