-
Notifications
You must be signed in to change notification settings - Fork 161
/
build.sbt
57 lines (46 loc) · 1.45 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
lazy val `sbt-release` = project in file(".")
organization := "com.github.sbt"
name := "sbt-release"
homepage := Some(url("https://github.com/sbt/sbt-release"))
licenses := Seq("Apache-2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0"))
publishMavenStyle := true
scalacOptions ++= Seq("-deprecation", "-feature", "-language:implicitConversions")
val unusedWarnings = Def.setting(
scalaBinaryVersion.value match {
case "2.12" =>
Seq("-Ywarn-unused:imports")
case _ =>
Seq("-Wunused:imports")
}
)
scalacOptions ++= unusedWarnings.value
Seq(Compile, Test).flatMap(c =>
c / console / scalacOptions --= unusedWarnings.value
)
def hash(): String = sys.process.Process("git rev-parse HEAD").lineStream_!.head
Compile / doc / scalacOptions ++= {
Seq(
"-sourcepath", (LocalRootProject / baseDirectory).value.getAbsolutePath,
"-doc-source-url", s"https://github.com/sbt/sbt-release/tree/${hash()}€{FILE_PATH}.scala"
)
}
libraryDependencies ++= Seq("org.specs2" %% "specs2-core" % "4.20.9" % "test")
// Scripted
enablePlugins(SbtPlugin)
scriptedLaunchOpts := {
scriptedLaunchOpts.value ++ Seq("-Xmx1024M", "-Dplugin.version=" + version.value)
}
scriptedBufferLog := false
pomExtra := {
<developers>{
Seq(
("xuwei-k", "Kenji Yoshida"),
).map { case (id, name) =>
<developer>
<id>{id}</id>
<name>{name}</name>
<url>https://github.com/{id}</url>
</developer>
}
}</developers>
}