forked from GlasslabGames/nameBasedXml.scala
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
44 lines (36 loc) · 1.07 KB
/
build.sbt
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
name := "nameBasedXml"
ThisBuild / organization := "org.lrng.binding"
libraryDependencies += "com.thoughtworks.extractor" %% "extractor" % "2.1.3"
libraryDependencies += "com.thoughtworks.binding" %% "xmlextractor" % {
import Ordering.Implicits._
if (VersionNumber(scalaVersion.value).numbers >= Seq(2L, 13L)) {
"12.0.0"
} else {
"11.9.0"
}
}
libraryDependencies += "org.scala-lang.modules" %% "scala-xml" % "1.3.0"
// Enable macro annotation by scalac flags for Scala 2.13
scalacOptions ++= {
import Ordering.Implicits._
if (VersionNumber(scalaVersion.value).numbers >= Seq(2L, 13L)) {
Seq("-Ymacro-annotations")
} else {
Nil
}
}
// Enable macro annotation by compiler plugins for Scala 2.12
libraryDependencies ++= {
import Ordering.Implicits._
if (VersionNumber(scalaVersion.value).numbers >= Seq(2L, 13L)) {
Nil
} else {
Seq(
compilerPlugin(
"org.scalamacros" % "paradise" % "2.1.1" cross CrossVersion.full
)
)
}
}
enablePlugins(Example)
libraryDependencies += "org.scalatest" %% "scalatest" % "3.1.2" % Test