-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.sbt
62 lines (55 loc) · 1.87 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
inThisBuild(
Seq(
version in ThisBuild := "0.0.4",
organization in ThisBuild := "com.sohoffice"
)
)
lazy val bintrayCommonSettings = Seq(
publishMavenStyle := false,
licenses += ("MIT", url("https://opensource.org/licenses/MIT")),
bintrayVcsUrl := Some("[email protected]:sohoffice/docExtract.git"),
bintrayRepository := "sbt-plugins",
bintrayOrganization in bintray := None
)
resolvers += Resolver.bintrayRepo("scalaz", "releases")
resolvers += Resolver.typesafeRepo("releases")
lazy val noPublishSettings = Seq(
publish := (),
publishLocal := (),
publishArtifact := false
)
lazy val docExtract = project.in(file("."))
.aggregate(core, plugin)
.settings(sourcesInBase := false)
.settings(noPublishSettings: _*)
lazy val core = project.in(file("core"))
.settings(
bintrayCommonSettings,
name := "doc-extract",
scalaVersion := "2.12.4",
crossScalaVersions := Seq("2.11.11", "2.12.4"),
// scalaVersion := "2.11.11",
libraryDependencies += {
CrossVersion.partialVersion(scalaVersion.value) match {
case Some((major, 11)) =>
"org.scala-lang" % s"scala-compiler" % s"$major.11.11"
case Some((major, 12)) =>
"org.scala-lang" % s"scala-compiler" % s"$major.12.4"
case x =>
throw new IllegalArgumentException(s"Please improve the cross build setting, $x is unexpected.")
}
},
libraryDependencies += "org.scalatest" %% "scalatest" % "3.0.5" % "test"
)
lazy val plugin = project.in(file("sbtPlugin"))
.enablePlugins(BuildInfoPlugin)
.settings(
buildInfoKeys := Seq[BuildInfoKey](name, version, scalaVersion, sbtVersion),
buildInfoPackage := "com.sohoffice.doc.extract"
)
.settings(
bintrayCommonSettings,
name := "sbt-doc-extract",
description := "Extract case class and properties description from scaladoc as a resource bundle.",
sbtPlugin := true
)