-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathDependencies.scala
85 lines (67 loc) · 3.57 KB
/
Dependencies.scala
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
/* BSD 2-Clause License - see OPAL/LICENSE for details. */
import sbt._
/**
* Manages the library dependencies of the subprojects of OPAL.
*
* @author Simon Leischnig
*/
object Dependencies {
object version {
val junit = "4.13.2"
val scalatest = "3.2.12"
val scalatestjunit = "3.2.5.0"
val scalacheck = "3.2.12.0"
val scalaxml = "2.2.0"
val scalaparsercombinators = "1.1.2"
val scalaparallelcollections = "1.0.4"
val playjson = "2.9.2"
val ficus = "1.5.0"
val commonstext = "1.9"
val txtmark = "0.16"
val jacksonDF = "2.12.2"
val fastutil = "8.5.4"
val apkparser = "2.6.10"
val openjfx = "16"
val javacpp = "1.5.8"
val javacpp_llvm = "15.0.3"
}
object library {
// --- general dependencies
private[this] val osName = System.getProperty("os.name") match {
case n if n.startsWith("Linux") => "linux"
case n if n.startsWith("Mac") => "mac"
case n if n.startsWith("Windows") => "win"
case _ => throw new Exception("Unknown platform!")
}
def reflect(scalaVersion: String): ModuleID = "org.scala-lang" % "scala-reflect" % scalaVersion
val scalaxml = "org.scala-lang.modules" %% "scala-xml" % version.scalaxml
val scalaparallelcollections = "org.scala-lang.modules" %% "scala-parallel-collections" % version.scalaparallelcollections
val playjson = "com.typesafe.play" %% "play-json" % version.playjson
val ficus = "com.iheart" %% "ficus" % version.ficus
val commonstext = "org.apache.commons" % "commons-text" % version.commonstext
val scalaparsercombinators = "org.scala-lang.modules" %% "scala-parser-combinators" % version.scalaparsercombinators
val txtmark = "es.nitaur.markdown" % "txtmark" % version.txtmark withSources () withJavadoc ()
val jacksonDF = "com.fasterxml.jackson.dataformat" % "jackson-dataformat-csv" % version.jacksonDF withSources () withJavadoc ()
val fastutil = "it.unimi.dsi" % "fastutil" % version.fastutil withSources () withJavadoc ()
val javafxBase = "org.openjfx" % "javafx-base" % version.openjfx classifier osName
val apkparser = "net.dongliu" % "apk-parser" % version.apkparser
val javacpp = "org.bytedeco" % "javacpp" % version.javacpp
val javacpp_llvm = "org.bytedeco" % "llvm-platform" % (version.javacpp_llvm + "-" + version.javacpp)
// --- test related dependencies
val junit = "junit" % "junit" % version.junit % "test,it"
val scalatest = "org.scalatest" %% "scalatest" % version.scalatest % "test,it"
val scalatestjunit = "org.scalatestplus" %% "junit-4-13" % version.scalatestjunit % "test,it"
val scalacheck = "org.scalatestplus" %% "scalacheck-1-16" % version.scalacheck % "test,it"
}
import library._
val testlibs: Seq[ModuleID] = Seq(junit, scalatest, scalatestjunit, scalacheck)
def common(scalaVersion: String) = Seq(reflect(scalaVersion), scalaparallelcollections, scalaxml, playjson, ficus, fastutil)
val si = Seq()
val bi = Seq(commonstext)
val br = Seq(scalaparsercombinators, scalaxml)
val ifds = Seq()
val tools = Seq(txtmark, jacksonDF)
val hermes = Seq(txtmark, jacksonDF, javafxBase)
val apk = Seq(apkparser, scalaxml)
val llvm = Seq(javacpp, javacpp_llvm)
}