-
Notifications
You must be signed in to change notification settings - Fork 82
/
Copy pathbuild.sbt
109 lines (103 loc) · 3.05 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
inThisBuild(
List(
scalaVersion := "2.12.6",
organization := "com.geirsson",
licenses := Seq(
"Apache-2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0")
),
homepage := Some(url("https://github.com/olafurpg/mdoc")),
developers := List(
Developer(
"jvican",
"Jorge Vicente Cantero",
"jorgevc@fastmail.es",
url("https://jvican.github.io/")
),
Developer(
"olafurpg",
"Ólafur Páll Geirsson",
"olafurpg@gmail.com",
url("https://geirsson.com")
)
)
)
)
name := "mdocRoot"
skip in publish := true
val V = new {
val scalameta = "4.0.0-M8"
val scalafix = "0.6.0-M14"
}
lazy val runtime = project
.settings(
moduleName := "mdoc-runtime",
libraryDependencies ++= List(
"org.scala-lang" % "scala-reflect" % scalaVersion.value % Provided,
"com.lihaoyi" %% "pprint" % "0.5.2"
)
)
lazy val mdoc = project
.settings(
moduleName := "mdoc",
crossVersion := CrossVersion.full,
mainClass in assembly := Some("mdoc.Main"),
assemblyJarName in assembly := "mdoc.jar",
test in assembly := {},
assemblyMergeStrategy.in(assembly) ~= { old =>
{
case PathList("META-INF", "CHANGES") => MergeStrategy.discard
case x => old(x)
}
},
fork in run := true,
buildInfoPackage := "mdoc.internal",
buildInfoKeys := Seq[BuildInfoKey](
version,
"stableVersion" -> "0.4.0"
),
libraryDependencies ++= List(
"com.googlecode.java-diff-utils" % "diffutils" % "1.3.0",
"org.scala-lang" % "scala-compiler" % scalaVersion.value,
"org.scalameta" %% "scalameta" % V.scalameta,
"com.geirsson" %% "metaconfig-typesafe-config" % "0.8.3",
"com.vladsch.flexmark" % "flexmark-all" % "0.26.4",
"com.lihaoyi" %% "fansi" % "0.2.5",
"io.methvin" % "directory-watcher" % "0.7.0",
"me.xdrop" % "fuzzywuzzy" % "1.1.9", // for link hygiene "did you mean?"
"ch.epfl.scala" %% "scalafix-core" % V.scalafix
)
)
.dependsOn(runtime)
.enablePlugins(BuildInfoPlugin)
lazy val testsInput = project
.in(file("tests/input"))
.settings(
skip in publish := true
)
lazy val unit = project
.in(file("tests/unit"))
.settings(
skip in publish := true,
libraryDependencies ++= List(
"org.scalacheck" %% "scalacheck" % "1.13.5" % Test,
"org.scalatest" %% "scalatest" % "3.2.0-SNAP10" % Test,
"org.scalameta" %% "testkit" % V.scalameta % Test
),
// forking causes https://github.com/scalatest/scalatest/issues/556
// fork := true,
buildInfoPackage := "tests",
buildInfoKeys := Seq[BuildInfoKey](
"testsInputClassDirectory" -> classDirectory.in(testsInput, Compile).value
)
)
.dependsOn(mdoc, testsInput)
.enablePlugins(BuildInfoPlugin)
lazy val docs = project
.in(file("mdoc-docs"))
.settings(
skip in publish := true,
test := run.in(Compile).toTask(" --test").value,
watchSources += baseDirectory.in(ThisBuild).value / "docs",
cancelable in Global := true,
)
.dependsOn(mdoc)