-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathbuild.sbt
134 lines (125 loc) · 4.52 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
import sbt.Keys._
val libVersion = sys.env.get("TRAVIS_TAG") orElse sys.env.get("BUILD_LABEL") getOrElse s"1.0.0-${System.currentTimeMillis / 1000}-SNAPSHOT"
lazy val commonSettings = Seq(
version := libVersion,
autoAPIMappings := true,
organization := "com.indix",
organizationName := "Indix",
organizationHomepage := Some(url("http://www.indix.com")),
scalaVersion := "2.12.11",
scalacOptions ++= Seq("-encoding", "UTF-8", "-deprecation", "-unchecked"),
javacOptions in (Compile, compile) ++= Seq("-Xlint:deprecation", "-source", "1.8"),
javacOptions in (Compile, doc) ++= Seq("-source", "1.8"),
resolvers ++= Seq(
"Clojars" at "https://clojars.org/repo",
"Concurrent Maven Repo" at "https://conjars.org/repo",
"Twttr Maven Repo" at "https://maven.twttr.com/"
)
)
lazy val publishSettings = Seq(
publishMavenStyle := true,
pgpSecretRing := file("local.secring.gpg"),
pgpPublicRing := file("local.pubring.gpg"),
pgpPassphrase := Some(sys.env.getOrElse("GPG_PASSPHRASE", "").toCharArray),
credentials += Credentials("Sonatype Nexus Repository Manager",
"oss.sonatype.org",
System.getenv("SONATYPE_USERNAME"),
System.getenv("SONATYPE_PASSWORD")),
publishTo := {
val nexus = "https://oss.sonatype.org/"
if (isSnapshot.value)
Some("snapshots" at nexus + "content/repositories/snapshots")
else
Some("releases" at nexus + "service/local/staging/deploy/maven2")
},
publishArtifact in Test := false,
pomIncludeRepository := { _ => false },
pomExtra :=
<url>https://github.com/indix/utils</url>
<licenses>
<license>
<name>Apache License</name>
<url>https://raw.githubusercontent.com/indix/utils/master/LICENSE</url>
<distribution>repo</distribution>
</license>
</licenses>
<scm>
<url>[email protected]:indix/utils.git</url>
<connection>scm:git:[email protected]:indix/utils.git</connection>
</scm>
<developers>
<developer>
<id>indix</id>
<name>Indix</name>
<url>http://www.indix.com</url>
</developer>
</developers>
)
lazy val utils = (project in file(".")).
settings(commonSettings: _*).
settings(
name := "utils",
publish := {}
).
aggregate(coreUtils, storeUtils, sparkUtils, gocdUtils)
lazy val coreUtils = (project in file("util-core")).
settings(commonSettings: _*).
settings(publishSettings: _*).
settings(
name := "util-core",
crossScalaVersions := Seq("2.11.11", "2.12.11"),
libraryDependencies ++= Seq(
"org.scalatest" %% "scalatest" % "3.0.3" % Test,
"org.apache.commons" % "commons-lang3" % "3.5",
"com.netaporter" %% "scala-uri" % "0.4.16"
)
)
lazy val storeUtils = (project in file("util-store")).
settings(commonSettings: _*).
settings(publishSettings: _*).
settings(
name := "util-store",
crossScalaVersions := Seq("2.11.11", "2.12.11"),
libraryDependencies ++= Seq(
"org.scalatest" %% "scalatest" % "3.0.3" % Test,
"commons-io" % "commons-io" % "2.5",
"com.twitter" %% "chill" % "0.9.5",
"org.rocksdb" % "rocksdbjni" % "4.11.2"
)
)
lazy val sparkUtils = (project in file("util-spark")).
settings(commonSettings: _*).
settings(publishSettings: _*).
settings(
name := "util-spark",
crossScalaVersions := Seq("2.11.11", "2.12.11"),
libraryDependencies ++= Seq(
"org.scalatest" %% "scalatest" % "3.0.3" % Test,
"org.apache.spark" %% "spark-core" % "2.4.4",
"org.apache.spark" %% "spark-sql" % "2.4.4",
"org.apache.spark" %% "spark-avro" % "2.4.4",
"org.apache.hadoop" % "hadoop-aws" % "2.6.0" % Test,
"com.indix" % "dfs-datastores" % "2.0.21" excludeAll(
ExclusionRule(organization = "org.apache.hadoop"),
ExclusionRule(organization = "org.eclipse.jetty")
),
"org.apache.parquet" % "parquet-avro" % "1.10.1",
"org.bdgenomics.utils" %% "utils-misc-spark2" % "0.2.16"
)
)
lazy val gocdUtils = (project in file("util-gocd")).
settings(commonSettings: _*).
settings(publishSettings: _*).
settings(
name := "util-gocd",
libraryDependencies ++= Seq(
"org.apache.commons" % "commons-lang3" % "3.1",
"commons-io" % "commons-io" % "1.3.2",
"com.amazonaws" % "aws-java-sdk-s3" % "1.11.127",
"cd.go.plugin" % "go-plugin-api" % "17.2.0" % Provided,
"com.google.code.gson" % "gson" % "2.2.3",
"junit" % "junit" % "4.12" % Test,
"com.novocode" % "junit-interface" % "0.11" % Test,
"org.mockito" % "mockito-all" % "1.10.19" % Test
)
)