Skip to content

Commit 68dfe36

Browse files
author
Michał Mrożek
authored
[CHORE] Refactor dependencies, update scalacheck (#676)
* Refactor dependencies, update scalacheck * Update nix dependencies * [Fix] Update rocksDB version
1 parent 57b23ac commit 68dfe36

File tree

69 files changed

+2725
-1819
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+2725
-1819
lines changed

.scalafmt.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
version = "2.3.0"
1+
version = "2.7.1"
22
align = none
33
maxColumn = 120

build.sbt

Lines changed: 33 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -13,58 +13,34 @@ val commonSettings = Seq(
1313
.Argument(TestFrameworks.ScalaTest, "-l", "EthashMinerSpec") // miner tests disabled by default
1414
)
1515

16-
val dep = {
17-
val akkaVersion = "2.6.9"
18-
val akkaHttpVersion = "10.2.0"
19-
val circeVersion = "0.9.3"
20-
val rocksDb = "6.11.4"
16+
val malletDeps = Seq(
17+
Dependencies.scopt
18+
).flatten ++ Seq(
19+
"org.jline" % "jline" % "3.1.2",
20+
"net.java.dev.jna" % "jna" % "4.5.1"
21+
)
2122

23+
val dep = {
2224
Seq(
23-
"com.typesafe.akka" %% "akka-actor" % akkaVersion,
24-
"com.typesafe.akka" %% "akka-slf4j" % akkaVersion,
25-
"com.typesafe.akka" %% "akka-testkit" % akkaVersion,
26-
"com.typesafe.akka" %% "akka-stream" % akkaVersion,
27-
"com.typesafe.akka" %% "akka-http" % akkaHttpVersion,
28-
"ch.megard" %% "akka-http-cors" % "1.1.0",
29-
"org.json4s" %% "json4s-native" % "3.5.4",
30-
"de.heikoseeberger" %% "akka-http-json4s" % "1.34.0",
31-
"io.suzaku" %% "boopickle" % "1.3.0",
32-
"org.rocksdb" % "rocksdbjni" % rocksDb,
33-
"io.circe" %% "circe-core" % circeVersion,
34-
"io.circe" %% "circe-generic" % circeVersion,
35-
"io.circe" %% "circe-parser" % circeVersion,
36-
"io.circe" %% "circe-generic-extras" % circeVersion,
37-
"commons-io" % "commons-io" % "2.6",
38-
"org.scala-sbt.ipcsocket" % "ipcsocket" % "1.0.0",
39-
"org.bouncycastle" % "bcprov-jdk15on" % "1.59",
40-
"org.typelevel" %% "mouse" % "0.23",
41-
"org.typelevel" %% "cats-core" % "2.0.0",
42-
"org.typelevel" %% "cats-effect" % "2.0.0",
43-
"com.twitter" %% "util-collection" % "18.5.0",
44-
"com.google.guava" % "guava" % "28.0-jre",
45-
"io.monix" %% "monix" % "3.1.0",
46-
"com.beachape" %% "enumeratum" % "1.5.13",
47-
"com.beachape" %% "enumeratum-cats" % "1.5.15",
48-
"com.beachape" %% "enumeratum-scalacheck" % "1.5.16" % Test,
49-
// mallet deps
50-
"org.jline" % "jline" % "3.1.2",
51-
"net.java.dev.jna" % "jna" % "4.5.1",
52-
"org.scala-lang.modules" %% "scala-parser-combinators" % "1.1.0",
53-
"com.github.scopt" %% "scopt" % "3.7.0",
54-
"org.xerial.snappy" % "snappy-java" % "1.1.7.2",
55-
// Logging
56-
"ch.qos.logback" % "logback-classic" % "1.2.3",
57-
"com.typesafe.scala-logging" %% "scala-logging" % "3.9.0",
58-
"net.logstash.logback" % "logstash-logback-encoder" % "6.4",
59-
"org.codehaus.janino" % "janino" % "3.0.6",
60-
// Test utils
61-
"org.web3j" % "core" % "3.4.0" % "test",
62-
"org.scalatest" %% "scalatest" % "3.0.5" % "it,test",
63-
"com.miguno.akka" %% "akka-mock-scheduler" % "0.5.5" % "it,test",
64-
"com.typesafe.akka" %% "akka-http-testkit" % akkaHttpVersion % "it,test",
65-
"org.scalamock" %% "scalamock-scalatest-support" % "3.6.0" % "test",
66-
"org.scalacheck" %% "scalacheck" % "1.14.0" % "it,test"
67-
)
25+
Dependencies.akka,
26+
Dependencies.akkaHttp,
27+
Dependencies.json4s,
28+
Dependencies.circe,
29+
Dependencies.boopickle,
30+
Dependencies.rocksDb,
31+
Dependencies.enumeratum,
32+
Dependencies.testing,
33+
Dependencies.cats,
34+
Dependencies.monix,
35+
Dependencies.twitterUtilCollection,
36+
Dependencies.crypto,
37+
Dependencies.scopt,
38+
Dependencies.logging,
39+
Dependencies.apacheCommons,
40+
Dependencies.micrometer,
41+
Dependencies.prometheus,
42+
Dependencies.dependencies
43+
).flatten ++ malletDeps
6844
}
6945

7046
val Integration = config("it") extend Test
@@ -85,19 +61,15 @@ val root = {
8561
.configs(Integration, Benchmark, Evm, Ets, Snappy, Rpc)
8662
.settings(commonSettings: _*)
8763
.settings(
88-
libraryDependencies ++= Seq(
89-
dep,
90-
Dependencies.micrometer,
91-
Dependencies.prometheus
92-
).flatten
64+
libraryDependencies ++= dep
9365
)
9466
.settings(executableScriptName := name.value)
95-
.settings(inConfig(Integration)(Defaults.testSettings) : _*)
96-
.settings(inConfig(Benchmark)(Defaults.testSettings) : _*)
97-
.settings(inConfig(Evm)(Defaults.testSettings) : _*)
98-
.settings(inConfig(Ets)(Defaults.testSettings) : _*)
99-
.settings(inConfig(Snappy)(Defaults.testSettings) : _*)
100-
.settings(inConfig(Rpc)(Defaults.testSettings) : _*)
67+
.settings(inConfig(Integration)(Defaults.testSettings): _*)
68+
.settings(inConfig(Benchmark)(Defaults.testSettings): _*)
69+
.settings(inConfig(Evm)(Defaults.testSettings): _*)
70+
.settings(inConfig(Ets)(Defaults.testSettings): _*)
71+
.settings(inConfig(Snappy)(Defaults.testSettings): _*)
72+
.settings(inConfig(Rpc)(Defaults.testSettings): _*)
10173

10274
if (!nixBuild)
10375
root

project/Dependencies.scala

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,99 @@ import sbt._
22

33
object Dependencies {
44

5+
val akka: Seq[ModuleID] = {
6+
val akkaVersion = "2.6.9"
7+
8+
Seq(
9+
"com.typesafe.akka" %% "akka-actor" % akkaVersion,
10+
"com.typesafe.akka" %% "akka-slf4j" % akkaVersion,
11+
"com.typesafe.akka" %% "akka-testkit" % akkaVersion,
12+
"com.typesafe.akka" %% "akka-stream" % akkaVersion,
13+
"com.miguno.akka" %% "akka-mock-scheduler" % "0.5.5" % "it,test"
14+
)
15+
}
16+
17+
val akkaHttp: Seq[ModuleID] = {
18+
val akkaHttpVersion = "10.2.0"
19+
20+
Seq(
21+
"com.typesafe.akka" %% "akka-http" % akkaHttpVersion,
22+
"ch.megard" %% "akka-http-cors" % "1.1.0",
23+
"de.heikoseeberger" %% "akka-http-json4s" % "1.34.0",
24+
"com.typesafe.akka" %% "akka-http-testkit" % akkaHttpVersion % "it,test"
25+
)
26+
}
27+
28+
val json4s = Seq("org.json4s" %% "json4s-native" % "3.5.4")
29+
30+
val circe: Seq[ModuleID] = {
31+
val circeVersion = "0.12.1" //0.9.3
32+
33+
Seq(
34+
"io.circe" %% "circe-core" % circeVersion,
35+
"io.circe" %% "circe-generic" % circeVersion,
36+
"io.circe" %% "circe-parser" % circeVersion,
37+
"io.circe" %% "circe-generic-extras" % circeVersion
38+
)
39+
}
40+
41+
val boopickle = Seq("io.suzaku" %% "boopickle" % "1.3.0")
42+
43+
val rocksDb = Seq(
44+
"org.rocksdb" % "rocksdbjni" % "6.11.4"
45+
)
46+
47+
val enumeratum: Seq[ModuleID] = Seq(
48+
"com.beachape" %% "enumeratum" % "1.5.13",
49+
"com.beachape" %% "enumeratum-cats" % "1.5.15",
50+
"com.beachape" %% "enumeratum-scalacheck" % "1.5.16" % Test
51+
)
52+
53+
val testing: Seq[ModuleID] = Seq(
54+
"org.scalatest" %% "scalatest" % "3.0.8" % "it,test",
55+
"org.scalamock" %% "scalamock-scalatest-support" % "3.6.0" % "test",
56+
"org.scalacheck" %% "scalacheck" % "1.14.1" % "it,test"
57+
)
58+
59+
val cats: Seq[ModuleID] = {
60+
val catsVersion = "2.0.0"
61+
Seq(
62+
"org.typelevel" %% "mouse" % "0.23",
63+
"org.typelevel" %% "cats-core" % catsVersion,
64+
"org.typelevel" %% "cats-effect" % catsVersion
65+
)
66+
}
67+
68+
val monix = Seq(
69+
"io.monix" %% "monix" % "3.1.0"
70+
)
71+
72+
val logging = Seq(
73+
"ch.qos.logback" % "logback-classic" % "1.2.3",
74+
"com.typesafe.scala-logging" %% "scala-logging" % "3.9.0",
75+
"net.logstash.logback" % "logstash-logback-encoder" % "6.4",
76+
"org.codehaus.janino" % "janino" % "3.0.6"
77+
)
78+
79+
val twitterUtilCollection = Seq("com.twitter" %% "util-collection" % "18.5.0")
80+
81+
val crypto = Seq("org.bouncycastle" % "bcprov-jdk15on" % "1.59")
82+
83+
val scopt = Seq("com.github.scopt" % "scopt_2.12" % "3.7.0")
84+
85+
val apacheCommons = Seq(
86+
"commons-io" % "commons-io" % "2.6"
87+
)
88+
89+
val dependencies = Seq(
90+
"org.jline" % "jline" % "3.1.2",
91+
"org.scala-lang.modules" %% "scala-parser-combinators" % "1.1.0",
92+
"org.scala-sbt.ipcsocket" % "ipcsocket" % "1.0.0",
93+
"com.google.guava" % "guava" % "28.0-jre",
94+
"org.xerial.snappy" % "snappy-java" % "1.1.7.2",
95+
"org.web3j" % "core" % "3.4.0" % "test"
96+
)
97+
598
val prometheus: Seq[ModuleID] = {
699
val provider = "io.prometheus"
7100
val version = "0.8.0"

0 commit comments

Comments
 (0)