forked from potix2/spark-google-spreadsheets
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
103 lines (77 loc) · 2.65 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
name := "spark-google-spreadsheets"
organization := "com.github.potix2"
scalaVersion := "2.11.12"
crossScalaVersions := Seq("2.11.12")
version := "0.6.2-SNAPSHOT"
spName := "potix2/spark-google-spreadsheets"
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)
sparkComponents := Seq("sql")
libraryDependencies ++= Seq(
"org.slf4j" % "slf4j-api" % "1.7.5" % "provided",
"org.scalatest" %% "scalatest" % "2.2.1" % "test",
("com.google.api-client" % "google-api-client" % "1.22.0").
exclude("com.google.guava", "guava-jdk5"),
"com.google.oauth-client" % "google-oauth-client-jetty" % "1.22.0",
"com.google.apis" % "google-api-services-sheets" % "v4-rev18-1.22.0"
)
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",
"javax.servlet" % "javax.servlet-api" % "3.1.0" % "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/potix2/spark-google-spreadsheets</url>
<scm>
<url>[email protected]:potix2/spark-google-spreadsheets.git</url>
<connection>scm:git:[email protected]:potix2/spark-google-spreadsheets.git</connection>
</scm>
<developers>
<developer>
<id>potix2</id>
<name>Katsunori Kanda</name>
<url>https://github.com/potix2/</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)
)