-
Notifications
You must be signed in to change notification settings - Fork 12
/
build.sbt
178 lines (136 loc) · 5.09 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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
name := "scorex-core"
lazy val commonSettings = Seq(
wartremoverErrors ++= Seq(
Wart.Recursion,
Wart.TraversableOps,
Wart.Null,
//Wart.Product,
Wart.PublicInference,
Wart.FinalVal,
//Wart.IsInstanceOf,
Wart.JavaConversions,
Wart.JavaSerializable
//Wart.Serializable
),
scalaVersion := "2.12.3",
organization := "org.scorexfoundation",
licenses := Seq("CC0" -> url("https://creativecommons.org/publicdomain/zero/1.0/legalcode")),
homepage := Some(url("https://github.com/ScorexFoundation/Scorex")),
pomExtra := (
<scm>
<url>[email protected]:ScorexFoundation/Scorex.git</url>
<connection>scm:git:[email protected]:ScorexFoundation/Scorex.git</connection>
</scm>
<developers>
<developer>
<id>kushti</id>
<name>Alexander Chepurnoy</name>
<url>http://chepurnoy.org/</url>
</developer>
</developers>)
)
enablePlugins(GitVersioning)
version in ThisBuild := {
if (git.gitCurrentTags.value.nonEmpty) {
git.gitDescribedVersion.value.get
} else {
if (git.gitHeadCommit.value.contains(git.gitCurrentBranch.value)) {
git.gitHeadCommit.value.get.take(8) + "-SNAPSHOT"
} else {
git.gitCurrentBranch.value + "-" + git.gitHeadCommit.value.get.take(8) + "-SNAPSHOT"
}
}
}
git.gitUncommittedChanges in ThisBuild := true
scalaVersion := "2.12.3"
organization := "org.scorexfoundation"
resolvers += "Sonatype Releases" at "https://oss.sonatype.org/content/repositories/releases/"
val circeVersion = "0.8.0"
val networkDependencies = Seq(
"com.typesafe.akka" %% "akka-actor" % "2.5.+",
"com.typesafe.akka" %% "akka-stream" % "2.5.+",
"org.bitlet" % "weupnp" % "0.1.+",
"commons-net" % "commons-net" % "3.+"
)
val apiDependencies = Seq(
"io.circe" %% "circe-core" % circeVersion,
"io.circe" %% "circe-generic" % circeVersion,
"io.circe" %% "circe-parser" % circeVersion,
"com.typesafe.akka" %% "akka-http" % "10.+",
"de.heikoseeberger" %% "akka-http-circe" % "1.19.0"
)
val loggingDependencies = Seq(
"com.typesafe.scala-logging" %% "scala-logging" % "3.+",
"ch.qos.logback" % "logback-classic" % "1.+"
)
val testingDependencies = Seq(
"com.typesafe.akka" %% "akka-testkit" % "2.5.+" % "test",
"com.typesafe.akka" %% "akka-http-testkit" % "10.+" % "test",
"org.scalactic" %% "scalactic" % "3.0.3" % "test",
"org.scalatest" %% "scalatest" % "3.0.3" % "test",
"org.scalacheck" %% "scalacheck" % "1.13.+",
"net.databinder.dispatch" %% "dispatch-core" % "+" % "test"
)
libraryDependencies ++= Seq(
"com.iheart" %% "ficus" % "1.4.2",
"org.scorexfoundation" %% "scrypto" % "2.0.5"
) ++ networkDependencies ++ apiDependencies ++ loggingDependencies ++ testingDependencies
scalacOptions ++= Seq("-feature", "-deprecation")
javaOptions ++= Seq(
"-server"
)
testOptions in Test += Tests.Argument("-oD", "-u", "target/test-reports")
//publishing settings
publishMavenStyle := true
publishArtifact in Test := false
fork := true
pomIncludeRepository := { _ => false }
credentials += Credentials(Path.userHome / ".ivy2" / ".credentials")
lazy val treasurycrypto = RootProject(uri("ssh://[email protected]/input-output-hk/treasury-crypto.git"))
lazy val testkit = Project(id = "testkit", base = file(s"testkit"))
.dependsOn(basics)
.settings(commonSettings: _*)
lazy val examples = Project(id = "examples", base = file(s"examples"))
.dependsOn(basics, testkit, treasurycrypto)
.settings(commonSettings: _*)
lazy val basics = Project(id = "scorex", base = file("."))
.settings(commonSettings: _*)
//publishing settings
licenses in ThisBuild := Seq("CC0" -> url("https://creativecommons.org/publicdomain/zero/1.0/legalcode"))
homepage in ThisBuild := Some(url("https://github.com/ScorexFoundation/Scorex"))
publishMavenStyle in ThisBuild := true
publishArtifact in Test := false
publishTo in ThisBuild := {
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")
}
credentials ++= (for {
username <- Option(System.getenv().get("SONATYPE_USERNAME"))
password <- Option(System.getenv().get("SONATYPE_PASSWORD"))
} yield Credentials("Sonatype Nexus Repository Manager", "oss.sonatype.org", username, password)).toSeq
fork in ThisBuild := true
pomIncludeRepository in ThisBuild := { _ => false }
licenses in ThisBuild := Seq("CC0" -> url("https://creativecommons.org/publicdomain/zero/1.0/legalcode"))
homepage in ThisBuild := Some(url("https://github.com/ScorexFoundation/Scorex"))
pomExtra in ThisBuild :=
<scm>
<url>[email protected]:ScorexFoundation/Scorex.git</url>
<connection>scm:[email protected]:ScorexFoundation/Scorex.git</connection>
</scm>
<developers>
<developer>
<id>kushti</id>
<name>Alexander Chepurnoy</name>
<url>http://chepurnoy.org/</url>
</developer>
<developer>
<id>catena2w</id>
<name>catena</name>
<url>https://github.com/catena2w</url>
</developer>
</developers>
//FindBugs settings
findbugsReportType := Some(FindbugsReport.PlainHtml)