-
Notifications
You must be signed in to change notification settings - Fork 12
/
build.sbt
133 lines (124 loc) · 4.32 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
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
import sbt.Keys._
import Dependencies._
ThisBuild / Test / fork := true
lazy val isScala213 = settingKey[Boolean]("Is the scala version 2.13.")
lazy val commonSettings = Seq(
organization := "org.scalawiki",
version := "0.7.0-SNAPSHOT",
crossScalaVersions := Seq(Scala213V),
scalaVersion := crossScalaVersions.value.last,
isScala213 := scalaVersion.value.startsWith("2.13."),
Global / excludeLintKeys += isScala213,
scalacOptions := Seq("-target:jvm-1.8"),
// conflictManager := ConflictManager.strict,
licenses += ("Apache-2.0", url("http://opensource.org/licenses/Apache-2.0")),
Keys.resolvers ++= Dependencies.resolvers,
libraryDependencies ++= Seq(
Library.Specs2.core % Test,
Library.Specs2.matcherExtra % Test,
Library.Specs2.mock % Test,
"com.google.jimfs" % "jimfs" % JimFsV % Test,
"org.mock-server" % "mockserver-netty" % MockServerV % Test
),
dependencyOverrides ++= Dependencies.overrides,
initialize := {
val _ = initialize.value
val required = VersionNumber("1.8")
val curr = VersionNumber(sys.props("java.specification.version"))
assert(
CompatibleJavaVersion(curr, required),
s"Java $required or above required"
)
},
assembly / assemblyJarName := {
s"${name.value}-${version.value}.jar"
},
assembly / test := {},
assembly / assemblyMergeStrategy := {
case PathList("org", "xmlpull", "v1", xs @ _*) => MergeStrategy.first
case x =>
val oldStrategy = (assembly / assemblyMergeStrategy).value
oldStrategy(x)
}
)
lazy val scalawiki = (project in file("."))
.settings(commonSettings)
.dependsOn(core, bots, dumps, wlx, `http-extensions`)
.aggregate(core, bots, dumps, wlx, `http-extensions`)
lazy val core = Project("scalawiki-core", file("scalawiki-core"))
.settings(commonSettings: _*)
.settings(libraryDependencies ++= {
Seq(
Library.Akka.actor,
Library.Akka.stream,
Library.Akka.http,
Library.Akka.httpCaching,
Library.Play.json(isScala213.value),
"com.typesafe" % "config" % TypesafeConfigV,
"com.iheart" %% "ficus" % FicusV,
"jp.ne.opt" %% "chronoscala" % ChronoScalaV,
"ch.qos.logback" % "logback-classic" % LogbackClassicV,
"org.sweble.wikitext" % "swc-engine" % SwcEngineV exclude (
"org.jsoup",
"jsoup"
),
"javax.xml.bind" % "jaxb-api" % "2.3.1",
"de.fau.cs.osr.ptk" % "ptk-common" % "3.0.8",
Library.Commons.codec,
"org.jsoup" % "jsoup" % JSoupV,
"com.softwaremill.retry" %% "retry" % RetryV,
"net.openhft" % "chronicle-map" % ChronicleMapV,
"org.rogach" %% "scallop" % ScallopV
)
})
.dependsOn(`http-extensions`)
lazy val bots = Project("scalawiki-bots", file("scalawiki-bots"))
.dependsOn(core % "compile->compile;test->test", wlx)
.settings(commonSettings: _*)
.settings(
libraryDependencies ++= Seq(
"com.github.pathikrit" %% "better-files" % BetterFilesV,
"org.rogach" %% "scallop" % ScallopV,
"org.xwiki.commons" % "xwiki-commons-blame-api" % BlameApiV,
Library.Commons.io,
Library.Poi.scratchpad,
Library.Poi.ooxml,
Library.Poi.ooxmlFull,
Library.Poi.poi,
Library.Poi.converter,
Library.Play.twirlApi(isScala213.value),
"com.github.tototoshi" %% "scala-csv" % ScalaCsvV
)
)
.enablePlugins(SbtTwirl)
lazy val dumps = Project("scalawiki-dumps", file("scalawiki-dumps"))
.dependsOn(core % "compile->compile;test->test")
.settings(commonSettings: _*)
.settings(
libraryDependencies ++=
Seq(
"com.fasterxml" % "aalto-xml" % AaltoXmlV,
Library.Commons.compress,
"org.glassfish.jaxb" % "txw2" % "3.0.2" // scala-steward:off
)
)
lazy val wlx = Project("scalawiki-wlx", file("scalawiki-wlx"))
.dependsOn(core % "compile->compile;test->test")
.settings(commonSettings: _*)
.settings(
libraryDependencies ++= Seq(
"de.sciss" %% "scala-chart" % ScalaChartV,
"com.github.tototoshi" %% "scala-csv" % ScalaCsvV
),
assembly / mainClass := Some("org.scalawiki.wlx.stat.Statistics")
)
lazy val `http-extensions` = (project in file("http-extensions"))
.settings(commonSettings: _*)
.settings(
libraryDependencies ++= Seq(
Library.Akka.actor,
Library.Akka.stream,
Library.Akka.http,
"org.scalacheck" %% "scalacheck" % ScalaCheckV % Test
)
)