2018-07-11 22:21:37 +08:00
|
|
|
name := """RepChain"""
|
|
|
|
|
2020-11-01 17:46:08 +08:00
|
|
|
version := "1.1.0"
|
2018-07-11 22:21:37 +08:00
|
|
|
|
2020-01-03 09:39:47 +08:00
|
|
|
scalaVersion := "2.12.10"
|
2018-07-11 22:21:37 +08:00
|
|
|
|
2019-12-20 09:48:33 +08:00
|
|
|
lazy val akkaVersion = "2.6.1"
|
|
|
|
val akkaHttpVersion = "10.1.11"
|
2018-07-11 22:21:37 +08:00
|
|
|
|
2020-01-03 09:39:47 +08:00
|
|
|
|
2019-04-18 21:31:41 +08:00
|
|
|
dependencyOverrides ++= Seq(
|
2020-01-03 09:39:47 +08:00
|
|
|
"org.json4s" % "json4s-jackson" % "3.6.7",
|
2019-04-18 21:31:41 +08:00
|
|
|
"com.google.guava" % "guava" % "21.0",
|
2020-01-03 09:39:47 +08:00
|
|
|
"com.thesamet.scalapb" % "scalapb-runtime" % "0.10.0-M2",
|
|
|
|
"org.scala-lang.modules" % "scala-xml" % "2.0.0-M1"
|
2019-04-18 21:31:41 +08:00
|
|
|
)
|
2018-07-11 22:21:37 +08:00
|
|
|
|
|
|
|
libraryDependencies ++= Seq(
|
|
|
|
"com.typesafe.akka" %% "akka-actor" % akkaVersion,
|
|
|
|
"com.typesafe.akka" %% "akka-cluster" % akkaVersion,
|
|
|
|
"com.typesafe.akka" %% "akka-cluster-tools" % akkaVersion,
|
|
|
|
"com.typesafe.akka" %% "akka-testkit" % akkaVersion % "test",
|
|
|
|
"com.typesafe.akka" %% "akka-slf4j" % akkaVersion,
|
|
|
|
"com.typesafe.akka" %% "akka-persistence" % akkaVersion,
|
|
|
|
"com.typesafe.akka" %% "akka-distributed-data" % akkaVersion
|
2020-01-03 09:39:47 +08:00
|
|
|
)
|
2018-07-11 22:21:37 +08:00
|
|
|
|
|
|
|
libraryDependencies += "com.typesafe.akka" %% "akka-http-xml" % akkaHttpVersion
|
|
|
|
libraryDependencies += "org.scala-lang" % "scala-reflect" % scalaVersion.value
|
|
|
|
libraryDependencies += "org.scala-lang" % "scala-compiler" % scalaVersion.value
|
|
|
|
|
2019-04-18 16:38:28 +08:00
|
|
|
libraryDependencies += "com.typesafe.scala-logging" %% "scala-logging" % "3.9.2"
|
2018-07-11 22:21:37 +08:00
|
|
|
|
2019-12-20 09:48:33 +08:00
|
|
|
libraryDependencies += "com.thesamet.scalapb" %% "scalapb-json4s" % "0.10.1-M1"
|
2019-04-19 09:27:13 +08:00
|
|
|
|
2018-07-11 22:21:37 +08:00
|
|
|
|
2019-12-20 09:48:33 +08:00
|
|
|
libraryDependencies += "org.iq80.leveldb" % "leveldb" % "0.12"
|
2018-07-11 22:21:37 +08:00
|
|
|
libraryDependencies += "org.fusesource.leveldbjni" % "leveldbjni-all" % "1.8"
|
|
|
|
|
2019-12-20 09:48:33 +08:00
|
|
|
libraryDependencies += "org.rocksdb" % "rocksdbjni" % "6.4.6"
|
|
|
|
|
2019-04-18 16:38:28 +08:00
|
|
|
libraryDependencies += "org.mapdb" % "mapdb" % "3.0.7"
|
2018-07-11 22:21:37 +08:00
|
|
|
|
2019-04-18 16:38:28 +08:00
|
|
|
libraryDependencies += "org.scalacheck" %% "scalacheck" % "1.14.0" % "test"
|
2018-07-11 22:21:37 +08:00
|
|
|
|
2019-12-20 09:48:33 +08:00
|
|
|
libraryDependencies += "org.scalactic" %% "scalactic" % "3.0.8"
|
|
|
|
libraryDependencies += "org.scalatest" %% "scalatest" % "3.0.8" % "test"
|
2018-07-11 22:21:37 +08:00
|
|
|
|
2019-12-20 09:48:33 +08:00
|
|
|
libraryDependencies += "org.javadelight" % "delight-nashorn-sandbox" % "0.1.27"
|
2018-07-11 22:21:37 +08:00
|
|
|
|
2019-04-18 16:38:28 +08:00
|
|
|
libraryDependencies += "io.spray" %% "spray-json" % "1.3.5"
|
2018-07-11 22:21:37 +08:00
|
|
|
|
2019-12-20 09:48:33 +08:00
|
|
|
//libraryDependencies += "com.gilt" %% "gfc-timeuuid" % "0.0.8"
|
2020-01-03 09:39:47 +08:00
|
|
|
libraryDependencies += "io.netty" % "netty" % "3.10.6.Final"
|
2018-07-11 22:21:37 +08:00
|
|
|
|
|
|
|
libraryDependencies += "ch.qos.logback" % "logback-classic" % "1.2.3"
|
|
|
|
|
2019-04-18 16:38:28 +08:00
|
|
|
libraryDependencies += "org.codehaus.janino" % "janino" % "3.0.12"
|
2018-07-11 22:21:37 +08:00
|
|
|
|
2019-04-18 16:38:28 +08:00
|
|
|
libraryDependencies += "org.bouncycastle" % "bcprov-jdk15on" % "1.61"
|
2020-01-03 09:39:47 +08:00
|
|
|
libraryDependencies += "javax.xml.bind" % "jaxb-api" % "2.3.1"
|
2018-07-11 22:21:37 +08:00
|
|
|
|
2021-03-23 18:09:43 +08:00
|
|
|
//add erasurecode for java
|
|
|
|
libraryDependencies += "org.apache.hadoop" % "hadoop-common" % "3.2.0"
|
2021-05-20 16:46:50 +08:00
|
|
|
//libraryDependencies += "org.python" % "jython" % "2.7.2"
|
|
|
|
libraryDependencies += "org.javatuples" % "javatuples" % "1.2"
|
2021-03-23 18:09:43 +08:00
|
|
|
|
2018-07-11 22:21:37 +08:00
|
|
|
libraryDependencies ++= Seq(
|
2021-01-26 09:28:58 +08:00
|
|
|
// "io.swagger" % "swagger-jaxrs" % "1.6.0",
|
|
|
|
// "com.github.swagger-akka-http" %% "swagger-akka-http" % "1.1.1",
|
|
|
|
// "io.swagger.core.v3" % "swagger-jaxrs2" % "2.1.5",
|
|
|
|
"javax.ws.rs" % "javax.ws.rs-api" % "2.0.1",
|
|
|
|
"com.github.swagger-akka-http" %% "swagger-akka-http" % "2.0.4",
|
|
|
|
// "io.swagger" % "swagger-jersey2-jaxrs" % "1.6.0",
|
2018-07-11 22:21:37 +08:00
|
|
|
"com.typesafe.akka" %% "akka-http" % akkaHttpVersion,
|
|
|
|
"com.typesafe.akka" %% "akka-http-spray-json" % akkaHttpVersion,
|
2019-12-20 09:48:33 +08:00
|
|
|
"org.json4s" %% "json4s-native" % "3.6.7",
|
|
|
|
"org.json4s" %% "json4s-jackson" % "3.6.7",
|
2018-07-27 14:58:41 +08:00
|
|
|
|
2020-01-03 09:39:47 +08:00
|
|
|
"ch.megard" %% "akka-http-cors" % "0.4.0",
|
|
|
|
"de.heikoseeberger" % "akka-http-json4s_2.12" % "1.26.0",
|
|
|
|
"com.twitter" %% "chill-akka" % "0.9.4",
|
|
|
|
"com.twitter" % "chill-bijection_2.12" % "0.9.4"
|
2019-12-20 09:48:33 +08:00
|
|
|
)
|
2018-07-11 22:21:37 +08:00
|
|
|
|
2020-01-03 09:39:47 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
2018-07-11 22:21:37 +08:00
|
|
|
javacOptions ++= Seq("-encoding", "UTF-8")
|
|
|
|
|
2019-04-19 09:27:13 +08:00
|
|
|
PB.targets in Compile := Seq(
|
|
|
|
scalapb.gen() -> (sourceManaged in Compile).value
|
|
|
|
)
|
2019-04-17 21:38:22 +08:00
|
|
|
libraryDependencies += "com.thesamet.scalapb" %% "scalapb-runtime" % scalapb.compiler.Version.scalapbVersion % "protobuf"
|
2019-12-20 09:48:33 +08:00
|
|
|
//addCompilerPlugin("org.psywerx.hairyfotr" %% "linter" % "0.1.17")
|
|
|
|
//scalacOptions += "-P:linter:disable:UseIfExpression+VariableAssignedUnusedValue+UseGetOrElseNotPatMatch"
|
|
|
|
//scapegoatVersion in ThisBuild := "1.3.3"
|
|
|
|
//scapegoatDisabledInspections := Seq("OptionGet", "AsInstanceOf","MethodReturningAny")
|
2019-04-17 21:38:22 +08:00
|
|
|
|
2019-05-09 09:04:54 +08:00
|
|
|
assemblyMergeStrategy in assembly := {
|
|
|
|
case PathList("org", "iq80", "leveldb", xs @ _*) => MergeStrategy.first
|
2021-06-15 09:12:00 +08:00
|
|
|
case PathList("javax", "ws", "rs", xs @ _*) => MergeStrategy.first
|
2020-09-02 10:08:59 +08:00
|
|
|
case PathList("module-info.class") => MergeStrategy.discard
|
|
|
|
case PathList("google", "protobuf", "field_mask.proto") => MergeStrategy.discard
|
2021-06-15 09:12:00 +08:00
|
|
|
|
|
|
|
case PathList("org", "slf4j", xs @ _*) => MergeStrategy.first
|
|
|
|
case PathList(ps @ _*) if ps.last endsWith "StaticLoggerBinder.class" => MergeStrategy.first
|
|
|
|
case PathList(ps @ _*) if ps.last endsWith "StaticMDCBinder.class" => MergeStrategy.first
|
|
|
|
case PathList(ps @ _*) if ps.last endsWith "StaticMarkerBinder.class" => MergeStrategy.first
|
|
|
|
|
2019-05-09 09:04:54 +08:00
|
|
|
case x =>
|
|
|
|
val oldStrategy = (assemblyMergeStrategy in assembly).value
|
|
|
|
oldStrategy(x)
|
|
|
|
}
|
|
|
|
|
2020-11-12 14:22:06 +08:00
|
|
|
fork in run := true
|
|
|
|
javaOptions in run ++= Seq("-Dlogback.configurationFile=conf/logback.xml")
|
|
|
|
|
|
|
|
mainClass in (Compile, run) := Some("rep.app.Repchain")
|
2020-11-17 17:22:25 +08:00
|
|
|
mainClass in (Compile, packageBin) := Some("rep.app.Repchain")
|