This repository has been archived by the owner on Jun 9, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 21
/
build.sbt
89 lines (75 loc) · 2.56 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
name := "iroha-scala"
version := "1.0.0"
val PROJECT_SCALA_VERSION = "2.11.8"
scalaVersion := PROJECT_SCALA_VERSION
useGpg in GlobalScope := true
lazy val libraries = Seq(
"org.scala-lang" % "scala-library" % "2.11.8",
"org.scala-lang" % "scala-reflect" % "2.11.8",
"org.scala-lang.modules" %% "scala-xml" % "1.0.4",
"io.grpc" % "grpc-netty" % "1.0.1",
"com.trueaccord.scalapb" %% "scalapb-runtime-grpc" % com.trueaccord.scalapb.compiler.Version.scalapbVersion,
"com.trueaccord.scalapb" %% "scalapb-runtime" % com.trueaccord.scalapb.compiler.Version.scalapbVersion % "protobuf",
"org.bouncycastle" % "bcpg-jdk15on" % "1.51",
"net.i2p.crypto" % "eddsa" % "0.1.0",
"org.scalatest" %% "scalatest" % "2.2.1" % "test"
)
lazy val settings = Seq(
organization := "org.hyperledger",
scalaVersion := PROJECT_SCALA_VERSION,
javacOptions ++= Seq("-source", "1.8", "-target", "1.7", "-encoding", "UTF-8"),
javaOptions ++= Seq("-Xmx1G"),
scalacOptions ++= Seq(
"-target:jvm-1.8",
"-encoding", "UTF-8",
"-unchecked",
"-deprecation",
"-Xfuture",
"-Yno-adapted-args",
"-Ywarn-dead-code",
"-Ywarn-numeric-widen",
"-Ywarn-value-discard",
"-Ywarn-unused"
),
libraryDependencies ++= libraries,
fork in Test := true,
publishMavenStyle := true,
publishArtifact in Test := false,
pomIncludeRepository := { _ => false },
publishTo <<= version { (v: String) =>
val nexus = "https://oss.sonatype.org/"
if (v.trim.endsWith("SNAPSHOT"))
Some("snapshots" at nexus + "content/repositories/snapshots")
else
Some("releases" at nexus + "service/local/staging/deploy/maven2")
},
pomExtra := <url>https://github.com/hyperledger/iroha-scala</url>
<licenses>
<license>
<name>The Apache License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0</url>
<distribution>repo</distribution>
</license>
</licenses>
<scm>
<url>[email protected]:hyperledger/iroha-scala.git</url>
<connection>scm:git:[email protected]:hyperledger/iroha-scala.git</connection>
</scm>
<developers>
<developer>
<id>hyperledger</id>
<name>iroha-scala</name>
<url>https://github.com/hyperledger/iroha-scala</url>
</developer>
</developers>
)
lazy val irohaScala = (project in file("."))
.settings(settings: _*)
.settings(name := "iroha-scala")
.enablePlugins(ProtocPlugin)
.settings(
PB.targets in Compile := Seq(
scalapb.gen() -> (sourceManaged in Compile).value
),
PB.protoSources in Compile := Seq(file("protos"))
)