forked from opentargets/genetics-pipe
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
39 lines (35 loc) · 1.35 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
import Dependencies._
import scala.sys.process.Process
val buildResolvers = Seq(
"Maven repository" at "https://download.java.net/maven/2/",
"Typesafe Repo" at "https://repo.typesafe.com/typesafe/releases/",
"Sonatype Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots",
"Sonatype Releases" at "https://oss.sonatype.org/content/repositories/releases"
)
lazy val jarName = {
val commit = Process(s"git log --oneline").lineStream.head.take(7)
s"etl-genetics-$commit.jar"
}
lazy val root = (project in file("."))
.settings(
inThisBuild(
List(
organization := "io.opentargets",
scalaVersion := "2.12.12",
version := "1.0.0"
)),
name := "etl-genetics",
resolvers ++= buildResolvers,
// from Dependencies.scala
libraryDependencies ++= dependencies,
testFrameworks += new TestFramework("minitest.runner.Framework"),
assembly / assemblyMergeStrategy := {
case PathList("META-INF", "services", "org.apache.hadoop.fs.FileSystem") =>
MergeStrategy.filterDistinctLines
case PathList("META-INF", "services", "org.apache.spark.sql.sources.DataSourceRegister") =>
MergeStrategy.concat
case PathList("META-INF", _ @_*) => MergeStrategy.discard
case _ => MergeStrategy.first
},
assembly / assemblyJarName := jarName
)