-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathbuild.sbt
109 lines (82 loc) · 2.72 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
name := "spark-select"
organization := "io.minio"
scalaVersion := "2.11.12"
crossScalaVersions := Seq("2.11.12")
spName := "minio/spark-select"
spAppendScalaVersion := true
spIncludeMaven := true
spIgnoreProvided := true
sparkVersion := "2.3.1"
val testSparkVersion = settingKey[String]("The version of Spark to test against.")
testSparkVersion := sys.props.get("spark.testVersion").getOrElse(sparkVersion.value)
// used spark components
sparkComponents := Seq("sql")
assemblyMergeStrategy in assembly := {
case "META-INF/io.netty.versions.properties" => MergeStrategy.concat
case x =>
val oldStrategy = (assemblyMergeStrategy in assembly).value
oldStrategy(x)
}
// Dependent libraries
libraryDependencies ++= Seq(
"com.amazonaws" % "aws-java-sdk" % "1.11.434" exclude("com.fasterxml.jackson.core", "jackson-databind"),
"org.apache.commons" % "commons-csv" % "1.7",
"org.slf4j" % "slf4j-api" % "1.7.5" % "provided",
"org.mockito" % "mockito-core" % "2.0.31-beta"
)
libraryDependencies ++= Seq(
"org.apache.spark" %% "spark-core" % testSparkVersion.value % "test" force(),
"org.apache.spark" %% "spark-sql" % testSparkVersion.value % "test" force(),
"org.scala-lang" % "scala-library" % scalaVersion.value % "compile"
)
/**
* release settings
*/
publishMavenStyle := true
releaseCrossBuild := true
licenses += ("Apache-2.0", url("http://www.apache.org/licenses/LICENSE-2.0"))
releasePublishArtifactsAction := PgpKeys.publishSigned.value
publishArtifact in Test := false
pomIncludeRepository := { _ => false }
publishTo := {
val nexus = "https://oss.sonatype.org/"
if (version.value.endsWith("SNAPSHOT"))
Some("snapshots" at nexus + "content/repositories/snapshots")
else
Some("releases" at nexus + "service/local/staging/deploy/maven2")
}
pomExtra := (
<url>https://github.com/minio/spark-select</url>
<scm>
<connection>scm:git:github.com/minio/spark-select</connection>
<developerConnection>scm:git:[email protected]:minio/spark-select</developerConnection>
<url>github.com/minio/spark-select</url>
</scm>
<developers>
<developer>
<id>minio</id>
<name>MinIO</name>
<url>http://www.minio.io</url>
</developer>
</developers>)
// Skip tests during assembly
test in assembly := {}
ScoverageSbtPlugin.ScoverageKeys.coverageHighlighting := {
if (scalaBinaryVersion.value == "2.10") false
else true
}
import ReleaseTransformations._
// Add publishing to spark packages as another step.
releaseProcess := Seq[ReleaseStep](
checkSnapshotDependencies,
inquireVersions,
runTest,
setReleaseVersion,
commitReleaseVersion,
tagRelease,
publishArtifacts,
setNextVersion,
commitNextVersion,
pushChanges,
releaseStepTask(spPublish)
)