sbt/project/Dependencies.scala

63 lines
2.4 KiB
Scala
Raw Normal View History

2015-08-20 06:18:02 +02:00
import sbt._
import Keys._
2017-07-01 13:47:19 +02:00
import sbt.contraband.ContrabandPlugin.autoImport._
2015-08-20 06:18:02 +02:00
object Dependencies {
2019-02-23 20:21:07 +01:00
val scala212 = "2.12.8"
2015-08-20 06:18:02 +02:00
def nightlyVersion: Option[String] = sys.props.get("sbt.build.version")
2019-06-25 04:17:26 +02:00
private val ioVersion = nightlyVersion.getOrElse("1.3.0-M11")
private val sbtIO = "org.scala-sbt" %% "io" % ioVersion
def getSbtModulePath(key: String, name: String) = {
val localProps = new java.util.Properties()
IO.load(localProps, file("project/local.properties"))
val path = Option(localProps getProperty key) orElse (sys.props get key)
path foreach (f => println(s"Using $name from $f"))
path
}
lazy val sbtIoPath = getSbtModulePath("sbtio.path", "sbt/io")
2017-06-14 07:30:26 +02:00
def addSbtModule(p: Project,
path: Option[String],
projectName: String,
m: ModuleID,
c: Option[Configuration] = None) =
path match {
2017-06-14 07:30:26 +02:00
case Some(f) =>
p dependsOn c.fold[ClasspathDep[ProjectReference]](ProjectRef(file(f), projectName))(
ProjectRef(file(f), projectName) % _)
case None => p settings (libraryDependencies += c.fold(m)(m % _))
}
def addSbtIO(p: Project): Project = addSbtModule(p, sbtIoPath, "io", sbtIO)
2018-11-26 05:22:22 +01:00
val jline = "jline" % "jline" % "2.14.6"
2015-08-31 01:51:03 +02:00
2016-11-29 11:53:22 +01:00
val scalaCompiler = Def.setting { "org.scala-lang" % "scala-compiler" % scalaVersion.value }
val scalaReflect = Def.setting { "org.scala-lang" % "scala-reflect" % scalaVersion.value }
2015-08-31 01:51:03 +02:00
val scalaCheck = "org.scalacheck" %% "scalacheck" % "1.14.0" % Test
2019-06-25 04:17:26 +02:00
val scalaTest = "org.scalatest" %% "scalatest" % "3.0.8" % Test
val parserCombinator = "org.scala-lang.modules" %% "scala-parser-combinators" % "1.1.2"
2016-06-27 15:27:42 +02:00
2017-08-10 12:24:29 +02:00
val sjsonnew = Def.setting {
"com.eed3si9n" %% "sjson-new-core" % contrabandSjsonNewVersion.value
}
val sjsonnewScalaJson = Def.setting {
"com.eed3si9n" %% "sjson-new-scalajson" % contrabandSjsonNewVersion.value
}
val sjsonnewMurmurhash = Def.setting {
"com.eed3si9n" %% "sjson-new-murmurhash" % contrabandSjsonNewVersion.value
}
2019-02-23 20:21:07 +01:00
def log4jVersion = "2.11.2"
val log4jApi = "org.apache.logging.log4j" % "log4j-api" % log4jVersion
val log4jCore = "org.apache.logging.log4j" % "log4j-core" % log4jVersion
2018-11-26 05:22:22 +01:00
val disruptor = "com.lmax" % "disruptor" % "3.4.2"
2019-06-25 04:17:26 +02:00
val silencerPlugin = "com.github.ghik" %% "silencer-plugin" % "1.4.1"
val silencerLib = "com.github.ghik" %% "silencer-lib" % "1.4.1" % Provided
2015-08-20 06:18:02 +02:00
}