forked from jparkie/Spark2Cassandra
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.sbt
104 lines (88 loc) · 3.31 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
import com.typesafe.sbt.SbtScalariform
import com.typesafe.sbt.SbtScalariform._
import scalariform.formatter.preferences._
/**
* Organization:
*/
organization := "com.github.leoromanovsky"
organizationName := "leoromanovsky"
/**
* Library Meta:
*/
name := "Spark2Cassandra"
licenses := Seq(("Apache License, Version 2.0", url("http://www.apache.org/licenses/LICENSE-2.0")))
/**
* Scala:
*/
scalaVersion := "2.11.8"
crossScalaVersions := Seq("2.11.8")
/**
* Library Dependencies:
*/
// Versions:
val SparkVersion = "2.2.0"
val SparkTestVersion = "2.2.0_0.7.2"
val ScalaTestVersion = "3.0.4"
val LogVersion = "1.3.0"
val SparkCassandraConnectorVersion = "2.0.5"
val CassandraAllVersion = "3.9"
val CassandraUnitVersion = "3.1.1.0"
// Dependencies:
val sparkCore = "org.apache.spark" %% "spark-core" % SparkVersion % "provided"
val sparkSql = "org.apache.spark" %% "spark-sql" % SparkVersion % "provided"
val sparkTest = "com.holdenkarau" %% "spark-testing-base" % SparkTestVersion % "test"
val scalaTest = "org.scalatest" %% "scalatest" % ScalaTestVersion % "test"
val logger = "org.clapper" %% "grizzled-slf4j" % LogVersion
val ssc = "com.datastax.spark" %% "spark-cassandra-connector" % SparkCassandraConnectorVersion
val cassandraAll = "org.apache.cassandra" % "cassandra-all" % CassandraAllVersion
val cassandraClient = "org.apache.cassandra" % "cassandra-clientutil" % CassandraAllVersion
val cassandraUnit = "org.cassandraunit" % "cassandra-unit" % CassandraUnitVersion % "test"
libraryDependencies ++= Seq(sparkCore, sparkSql, sparkTest, scalaTest, logger, ssc, cassandraAll, cassandraUnit)
excludeDependencies += "org.slf4j" % "slf4j-log4j12"
// Force cassandraUnit and ssc to utilize cassandraAll, cassandraClient.
dependencyOverrides ++= Set(cassandraAll, cassandraClient)
/**
* Tests:
*/
parallelExecution in Test := false
/**
* Scalariform:
*/
SbtScalariform.scalariformSettings
ScalariformKeys.preferences := FormattingPreferences()
.setPreference(RewriteArrowSymbols, false)
.setPreference(AlignParameters, true)
.setPreference(AlignSingleLineCaseStatements, true)
.setPreference(SpacesAroundMultiImports, true)
/**
* Scoverage:
*/
coverageEnabled in Test := true
/**
* Assembly: some upgrades may be problematic
*/
assemblyShadeRules in assembly := Seq(
ShadeRule.rename("io.netty.**" -> "s2c.netty.@1").inAll,
ShadeRule.rename("com.google.common.**" -> "s2c.google.common.@1").inAll,
ShadeRule.rename("com.google.thirdparty.publicsuffix.**" -> s"s2c.google.thirdparty.publicsuffix.@1").inAll
)
/**
* Release:
* https://github.com/xerial/sbt-sonatype
*/
import ReleaseTransformations._
releasePublishArtifactsAction := PgpKeys.publishSigned.value
releaseProcess := Seq[ReleaseStep](
checkSnapshotDependencies,
inquireVersions,
runClean,
runTest,
setReleaseVersion,
commitReleaseVersion,
tagRelease,
releaseStepCommand("publishSigned"),
setNextVersion,
commitNextVersion,
releaseStepCommand("sonatypeReleaseAll"),
pushChanges
)