forked from delta-io/delta
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
160 lines (125 loc) · 4.38 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
/*
* Copyright 2019 Databricks, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
name := "delta-core"
organization := "io.delta"
scalaVersion := "2.11.12"
crossScalaVersions := Seq("2.12.8", "2.11.12")
sparkVersion := "2.4.2"
libraryDependencies ++= Seq(
// Adding test classifier seems to break transitive resolution of the core dependencies
"org.apache.spark" %% "spark-hive" % sparkVersion.value % "provided",
"org.apache.spark" %% "spark-sql" % sparkVersion.value % "provided",
"org.apache.spark" %% "spark-core" % sparkVersion.value % "provided",
"org.apache.spark" %% "spark-catalyst" % sparkVersion.value % "provided",
// Test deps
"org.scalatest" %% "scalatest" % "3.0.5" % "test",
"org.apache.spark" %% "spark-catalyst" % sparkVersion.value % "test" classifier "tests",
"org.apache.spark" %% "spark-core" % sparkVersion.value % "test" classifier "tests",
"org.apache.spark" %% "spark-sql" % sparkVersion.value % "test" classifier "tests"
)
testOptions in Test += Tests.Argument("-oDF")
// Don't execute in parallel since we can't have multiple Sparks in the same JVM
parallelExecution in Test := false
scalacOptions ++= Seq("-target:jvm-1.8")
javaOptions += "-Xmx3g"
fork in Test := true
// Configurations to speed up tests and reduce memory footprint
javaOptions in Test ++= Seq(
"-Dspark.ui.enabled=false",
"-Dspark.ui.showConsoleProgress=false",
"-Dspark.databricks.delta.snapshotPartitions=2",
"-Dspark.sql.shuffle.partitions=5",
"-Ddelta.log.cacheSize=10",
"-Xmx2g"
)
scalastyleConfig := baseDirectory.value / "scalastyle-config.xml"
lazy val compileScalastyle = taskKey[Unit]("compileScalastyle")
compileScalastyle := scalastyle.in(Compile).toTask("").value
(compile in Compile) := ((compile in Compile) dependsOn compileScalastyle).value
lazy val testScalastyle = taskKey[Unit]("testScalastyle")
testScalastyle := scalastyle.in(Test).toTask("").value
(test in Test) := ((test in Test) dependsOn testScalastyle).value
/***************************
* Spark Packages settings *
***************************/
spName := "databricks/delta-core"
spAppendScalaVersion := true
spIncludeMaven := true
spIgnoreProvided := true
sparkComponents := Seq("sql")
/********************
* Release settings *
********************/
publishMavenStyle := true
releaseCrossBuild := true
licenses += ("Apache-2.0", url("http://www.apache.org/licenses/LICENSE-2.0"))
pomExtra :=
<url>https://delta.io/</url>
<scm>
<url>[email protected]:delta-io/delta.git</url>
<connection>scm:git:[email protected]:delta-io/delta.git</connection>
</scm>
<developers>
<developer>
<id>marmbrus</id>
<name>Michael Armbrust</name>
<url>https://github.com/marmbrus</url>
</developer>
<developer>
<id>brkyvz</id>
<name>Burak Yavuz</name>
<url>https://github.com/brkyvz</url>
</developer>
<developer>
<id>jose-torres</id>
<name>Jose Torres</name>
<url>https://github.com/jose-torres</url>
</developer>
<developer>
<id>liwensun</id>
<name>Liwen Sun</name>
<url>https://github.com/liwensun</url>
</developer>
<developer>
<id>mukulmurthy</id>
<name>Mukul Murthy</name>
<url>https://github.com/mukulmurthy</url>
</developer>
<developer>
<id>tdas</id>
<name>Tathagata Das</name>
<url>https://github.com/tdas</url>
</developer>
<developer>
<id>zsxwing</id>
<name>Shixiong Zhu</name>
<url>https://github.com/zsxwing</url>
</developer>
</developers>
bintrayOrganization := Some("delta-io")
bintrayRepository := "delta"
import ReleaseTransformations._
releaseProcess := Seq[ReleaseStep](
checkSnapshotDependencies,
inquireVersions,
runTest,
setReleaseVersion,
commitReleaseVersion,
tagRelease,
publishArtifacts,
setNextVersion,
commitNextVersion
)