-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathbuild.sbt
95 lines (80 loc) · 2.86 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
lazy val commonSettings = Seq(
homepage := Some(url("https://github.com/NICTA/javallier")),
organization := "com.n1analytics",
organizationName := "N1 Analytics",
organizationHomepage := Some(url("https://n1analytics.com")),
licenses := Seq("Apache 2.0" -> url("https://www.apache.org/licenses/LICENSE-2.0")),
publishMavenStyle := true
)
lazy val root = project.in(file(".")).
settings(commonSettings: _*)
.settings(
name := "javallier",
version := "0.6.0",
description := "A Java library for Paillier partially homomorphic encryption.",
libraryDependencies ++= Seq(
"ch.qos.logback" % "logback-classic" % "1.0.13",
"commons-cli" % "commons-cli" % "1.3.1",
"commons-codec" % "commons-codec" % "1.10",
"com.squareup.jnagmp" % "jnagmp" % "2.0.0",
"com.fasterxml.jackson.core" % "jackson-databind" % "2.7.0",
"com.novocode" % "junit-interface" % "0.11" % Test
),
mainClass in Compile := Some("com.n1analytics.paillier.cli.Main")
).enablePlugins(JavaAppPackaging)
lazy val benchmark = project.in(file("benchmark")).
settings(commonSettings: _*).settings(
name := "javallier-benchmark",
libraryDependencies ++= Seq(
"com.squareup.jnagmp" % "jnagmp" % "2.0.0"
)
).dependsOn(root).
enablePlugins(JmhPlugin)
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")
}
pomExtra := (
<scm>
<url>[email protected]:n1analytics/javallier.git</url>
<connection>scm:git:[email protected]:n1analytics/javallier.git</connection>
</scm>
<developers>
<developer>
<id>mpnd</id>
<name>Mentari Djatmiko</name>
</developer>
<developer>
<id>maxott</id>
<name>Max Ott</name>
</developer>
<developer>
<id>hardbyte</id>
<name>Brian Thorne</name>
</developer>
<developer>
<id>wilko77</id>
<name>Wilko Henecka</name>
</developer>
<developer>
<id>gusmith</id>
<name>Guillaume Smith</name>
</developer>
</developers>)
// Solve issue where some loggers are initialised during configuration phase
testOptions in Test += Tests.Setup(classLoader =>
classLoader
.loadClass("org.slf4j.LoggerFactory")
.getMethod("getLogger", classLoader.loadClass("java.lang.String"))
.invoke(null, "ROOT"))
// Turn on verbose outputs for jUnit tests to get around the 10 min Travis timeout
testOptions += Tests.Argument(TestFrameworks.JUnit, "-v")
jacoco.settings
assemblyJarName in assembly := "javallier.jar"
test in assembly := {}
mainClass in assembly := Some("com.n1analytics.paillier.cli.Main")
import sbtassembly.AssemblyPlugin.defaultShellScript
assemblyOption in assembly := (assemblyOption in assembly).value.copy(prependShellScript = Some(defaultShellScript))