-
Notifications
You must be signed in to change notification settings - Fork 160
Expand file tree
/
Copy pathbuild.sbt
More file actions
86 lines (71 loc) · 1.97 KB
/
build.sbt
File metadata and controls
86 lines (71 loc) · 1.97 KB
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
lazy val `sbt-release` = project in file(".")
def sbt2 = "2.0.0-RC12"
organization := "com.github.sbt"
name := "sbt-release"
crossScalaVersions += scala_version_from_sbt_version.ScalaVersionFromSbtVersion(sbt2)
pluginCrossBuild / sbtVersion := {
scalaBinaryVersion.value match {
case "2.12" =>
(pluginCrossBuild / sbtVersion).value
case _ =>
sbt2
}
}
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")
scalacOptions ++= {
scalaBinaryVersion.value match {
case "3" =>
Nil
case _ =>
Seq("-release:8")
}
}
val unusedWarnings = Def.setting(
scalaBinaryVersion.value match {
case "2.12" =>
Seq("-Ywarn-unused:imports")
case _ =>
Seq(
"-Wunused:imports",
"-Wconf:msg=is no longer supported for vararg splices:error",
)
}
)
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.23.0" % "test")
// Scripted
enablePlugins(SbtPlugin)
scriptedLaunchOpts := {
scriptedLaunchOpts.value ++ Seq(
"-Xmx1024M",
"-Dsbt.build.onchange=warn",
"-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>
)