-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathbuild.sbt
87 lines (63 loc) · 2.53 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
scalaVersion := "2.11.8"
crossScalaVersions := Seq("2.10.4", "2.11.8")
parallelExecution in Test := false
val nscalaVersion = "2.12.0"
val scalatestVersion = "2.2.4"
val sparkVersion = "2.0.0"
val coreDependencies = Seq(
"com.github.nscala-time" %% "nscala-time" % nscalaVersion,
"org.apache.spark" %% "spark-core" % sparkVersion % "provided",
"org.apache.spark" %% "spark-sql" % sparkVersion % "provided"
)
val coreTestDependencies = Seq(
"org.scalatest" %% "scalatest" % scalatestVersion % "test"
)
lazy val commonSettings = Seq(
organization := "com.sparklinedata",
version := "0.0.3",
javaOptions := Seq("-Xms512m", "-Xmx512m", "-XX:MaxPermSize=256M"),
// Target Java 7
scalacOptions += "-target:jvm-1.8",
javacOptions in compile ++= Seq("-source", "1.8", "-target", "1.8"),
scalacOptions := Seq("-feature", "-deprecation"),
licenses := Seq("Apache License, Version 2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0")),
homepage := Some(url("https://github.com/SparklineData/spark-datetime")),
publishMavenStyle := true,
publishTo := Some("releases" at "https://oss.sonatype.org/service/local/staging/deploy/maven2/"),
publishArtifact in Test := false,
pomIncludeRepository := { _ => false },
test in assembly := {},
useGpg := true,
usePgpKeyHex("C922EB45"),
pomExtra := (
<scm>
<url>https://github.com/SparklineData/spark-datetime.git</url>
<connection>scm:git:[email protected]:SparklineData/spark-datetime.git</connection>
</scm>
<developers>
<developer>
<name>Harish Butani</name>
<organization>SparklineData</organization>
<organizationUrl>http://sparklinedata.com/</organizationUrl>
</developer>
</developers>),
fork in Test := true
) ++ releaseSettings ++ net.virtualvoid.sbt.graph.Plugin.graphSettings ++ Seq(
ReleaseKeys.publishArtifactsAction := PgpKeys.publishSigned.value
)
lazy val root = project.in(file("."))
.settings(commonSettings: _*)
.settings(name := "spark-datetime")
.settings(libraryDependencies ++= (coreDependencies ++ coreTestDependencies))
.settings(assemblyOption in assembly := (assemblyOption in assembly).value.copy(includeScala = false))
.settings(
artifact in (Compile, assembly) ~= { art =>
art.copy(`classifier` = Some("assembly"))
},
assemblyExcludedJars in assembly := {
val cp = (fullClasspath in assembly).value
println(cp)
cp filter {_.data.getName startsWith "joda"}
}
)
.settings(addArtifact(artifact in (Compile, assembly), assembly).settings: _*)