Skip to content

Commit

Permalink
[CHORE] Refactor dependencies, update scalacheck
Browse files Browse the repository at this point in the history
  • Loading branch information
Michal Mrozek committed Sep 16, 2020
1 parent 63283cc commit 35495d1
Show file tree
Hide file tree
Showing 64 changed files with 2,449 additions and 1,569 deletions.
2 changes: 1 addition & 1 deletion .scalafmt.conf
@@ -1,3 +1,3 @@
version = "2.3.0"
version = "2.7.1"
align = none
maxColumn = 120
76 changes: 25 additions & 51 deletions build.sbt
Expand Up @@ -11,58 +11,33 @@ val commonSettings = Seq(
// Resolver for rocksDb
resolvers += "rocksDb" at "https://dl.bintray.com/ethereum/maven/"

val dep = {
val akkaVersion = "2.6.9"
val akkaHttpVersion = "10.2.0"
val circeVersion = "0.9.3"
val rocksDb = "5.9.2"
val malletDeps = Seq(
Dependencies.scopt
).flatten ++ Seq(
"org.jline" % "jline" % "3.1.2",
"net.java.dev.jna" % "jna" % "4.5.1"
)

val dep = {
Seq(
"com.typesafe.akka" %% "akka-actor" % akkaVersion,
"com.typesafe.akka" %% "akka-slf4j" % akkaVersion,
"com.typesafe.akka" %% "akka-testkit" % akkaVersion,
"com.typesafe.akka" %% "akka-stream" % akkaVersion,
"com.typesafe.akka" %% "akka-http" % akkaHttpVersion,
"ch.megard" %% "akka-http-cors" % "1.1.0",
"org.json4s" %% "json4s-native" % "3.5.4",
"de.heikoseeberger" %% "akka-http-json4s" % "1.34.0",
"com.typesafe.akka" %% "akka-http-testkit" % akkaHttpVersion % "it,test",
"io.suzaku" %% "boopickle" % "1.3.0",
"org.ethereum" % "rocksdbjni" % rocksDb,
"org.scalatest" %% "scalatest" % "3.0.5" % "it,test",
"org.scalamock" %% "scalamock-scalatest-support" % "3.6.0" % "test",
"org.scalacheck" %% "scalacheck" % "1.14.0" % "it,test",
"ch.qos.logback" % "logback-classic" % "1.2.3",
"org.jline" % "jline" % "3.1.2",
"org.scala-lang.modules" %% "scala-parser-combinators" % "1.1.0",
"io.circe" %% "circe-core" % circeVersion,
"io.circe" %% "circe-generic" % circeVersion,
"io.circe" %% "circe-parser" % circeVersion,
"io.circe" %% "circe-generic-extras" % circeVersion,
"com.miguno.akka" %% "akka-mock-scheduler" % "0.5.5" % "it,test",
"commons-io" % "commons-io" % "2.6",
"org.scala-sbt.ipcsocket" % "ipcsocket" % "1.0.0",
"org.bouncycastle" % "bcprov-jdk15on" % "1.59",
"com.typesafe.scala-logging" %% "scala-logging" % "3.9.0",
"org.typelevel" %% "mouse" % "0.23",
"org.typelevel" %% "cats-core" % "2.0.0",
"org.typelevel" %% "cats-effect" % "2.0.0",
"com.twitter" %% "util-collection" % "18.5.0",
"com.google.guava" % "guava" % "28.0-jre",
"io.monix" %% "monix" % "3.1.0",
"com.beachape" %% "enumeratum" % "1.5.13",
"com.beachape" %% "enumeratum-cats" % "1.5.15",
"com.beachape" %% "enumeratum-scalacheck" % "1.5.16" % Test,
// mallet deps
"org.jline" % "jline" % "3.1.2",
"net.java.dev.jna" % "jna" % "4.5.1",
"org.scala-lang.modules" %% "scala-parser-combinators" % "1.0.5",
"com.github.scopt" %% "scopt" % "3.7.0",
// Metrics (https://github.com/DataDog/java-dogstatsd-client)
"com.datadoghq" % "java-dogstatsd-client" % "2.5",
"org.xerial.snappy" % "snappy-java" % "1.1.7.2",
"org.web3j" % "core" % "3.4.0" % "test"
)
Dependencies.akka,
Dependencies.akkaHttp,
Dependencies.json4s,
Dependencies.circe,
Dependencies.boopickle,
Dependencies.rocksDb,
Dependencies.enumeratum,
Dependencies.testing,
Dependencies.cats,
Dependencies.monix,
Dependencies.twitterUtilCollection,
Dependencies.crypto,
Dependencies.scopt,
Dependencies.logging,
Dependencies.apacheCommons,
Dependencies.metrics,
Dependencies.dependencies
).flatten ++ malletDeps
}

val Integration = config("it") extend Test
Expand Down Expand Up @@ -144,7 +119,6 @@ jdkPackagerJVMArgs := Seq(

coverageExcludedPackages := "io\\.iohk\\.ethereum\\.extvm\\.msg.*"


addCommandAlias(
"compile-all",
""";compile
Expand Down
101 changes: 101 additions & 0 deletions project/Dependencies.scala
@@ -0,0 +1,101 @@
import sbt._

object Dependencies {

val akka: Seq[ModuleID] = {
val akkaVersion = "2.6.9"

Seq(
"com.typesafe.akka" %% "akka-actor" % akkaVersion,
"com.typesafe.akka" %% "akka-slf4j" % akkaVersion,
"com.typesafe.akka" %% "akka-testkit" % akkaVersion,
"com.typesafe.akka" %% "akka-stream" % akkaVersion,
"com.miguno.akka" %% "akka-mock-scheduler" % "0.5.5" % "it,test"
)
}

val akkaHttp: Seq[ModuleID] = {
val akkaHttpVersion = "10.2.0"

Seq(
"com.typesafe.akka" %% "akka-http" % akkaHttpVersion,
"ch.megard" %% "akka-http-cors" % "1.1.0",
"de.heikoseeberger" %% "akka-http-json4s" % "1.34.0",
"com.typesafe.akka" %% "akka-http-testkit" % akkaHttpVersion % "it,test"
)
}

val json4s = Seq("org.json4s" %% "json4s-native" % "3.5.4")

val circe: Seq[ModuleID] = {
val circeVersion = "0.12.1" //0.9.3

Seq(
"io.circe" %% "circe-core" % circeVersion,
"io.circe" %% "circe-generic" % circeVersion,
"io.circe" %% "circe-parser" % circeVersion,
"io.circe" %% "circe-generic-extras" % circeVersion
)
}

val boopickle = Seq("io.suzaku" %% "boopickle" % "1.3.0")

val rocksDb = Seq(
"org.ethereum" % "rocksdbjni" % "5.9.2"
)

val enumeratum: Seq[ModuleID] = Seq(
"com.beachape" %% "enumeratum" % "1.5.13",
"com.beachape" %% "enumeratum-cats" % "1.5.15",
"com.beachape" %% "enumeratum-scalacheck" % "1.5.16" % Test
)

val testing: Seq[ModuleID] = Seq(
"org.scalatest" %% "scalatest" % "3.0.8" % "it,test",
"org.scalamock" %% "scalamock-scalatest-support" % "3.6.0" % "test",
"org.scalacheck" %% "scalacheck" % "1.14.1" % "it,test"
)

val cats: Seq[ModuleID] = {
val catsVersion = "2.0.0"
Seq(
"org.typelevel" %% "mouse" % "0.23",
"org.typelevel" %% "cats-core" % catsVersion,
"org.typelevel" %% "cats-effect" % catsVersion
)
}

val monix = Seq(
"io.monix" %% "monix" % "3.1.0"
)

val logging = Seq(
"ch.qos.logback" % "logback-classic" % "1.2.3",
"com.typesafe.scala-logging" %% "scala-logging" % "3.9.0"
)

val twitterUtilCollection = Seq("com.twitter" %% "util-collection" % "18.5.0")

val crypto = Seq("org.bouncycastle" % "bcprov-jdk15on" % "1.59")

val scopt = Seq("com.github.scopt" % "scopt_2.12" % "3.7.0")

val metrics = Seq(
// Metrics (https://github.com/DataDog/java-dogstatsd-client)
"com.datadoghq" % "java-dogstatsd-client" % "2.5",
"org.xerial.snappy" % "snappy-java" % "1.1.7.2",
"org.web3j" % "core" % "3.4.0" % "test"
)

val apacheCommons = Seq(
"commons-io" % "commons-io" % "2.6"
)

val dependencies = Seq(
"org.jline" % "jline" % "3.1.2",
"org.scala-lang.modules" %% "scala-parser-combinators" % "1.1.0",
"org.scala-sbt.ipcsocket" % "ipcsocket" % "1.0.0",
"com.google.guava" % "guava" % "28.0-jre"
)

}
2 changes: 2 additions & 0 deletions src/main/resources/application.conf
Expand Up @@ -229,6 +229,8 @@ mantis {
# Declaring the protocol here means that a more protocol-specific configuration
# is pulled from the corresponding consensus implementation.
# For example, in case of ethash, a section named `ethash` is used.
# Available protocols: ethash, mocked
# In case of mocked, remember to enable qa api
protocol = ethash

# If true then the consensus protocol uses this node for mining.
Expand Down

0 comments on commit 35495d1

Please sign in to comment.