forked from rallyhealth/sbt-git-versioning
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sbt
57 lines (43 loc) · 1.72 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
import sbt.plugins.SbtPlugin
name := "sbt-git-versioning"
organizationName := "Rally Health"
organization := "com.rallyhealth.sbt"
// enable after SemVerPlugin supports sbt-plugins
//enablePlugins(SemVerPlugin)
semVerLimit := "1.0.999"
licenses := Seq("MIT" -> url("http://opensource.org/licenses/MIT"))
bintrayOrganization := Some("upstartcommerce")
bintrayRepository := "generic"
// SbtPlugin requires sbt 1.2.0+
// See: https://developer.lightbend.com/blog/2018-07-02-sbt-1-2-0/#sbtplugin-for-plugin-development
enablePlugins(SbtPlugin)
scalacOptions ++= {
val linting = CrossVersion.partialVersion(scalaVersion.value) match {
// some imports are necessary for compat with 2.10.
// 2.12 needs to chill out with the unused imports warnings.
case Some((2, 12)) => "-Xlint:-unused,_"
case _ => "-Xlint"
}
Seq("-Xfatal-warnings", linting)
}
// to default to sbt 1.0
// sbtVersion in pluginCrossBuild := "1.1.6"
// scalaVersion := "2.12.6"
crossSbtVersions := List("0.13.17", "1.2.1")
publishMavenStyle := false
resolvers += Resolver.bintrayRepo("typesafe", "sbt-plugins")
libraryDependencies ++= Seq(
"org.scalatest" %% "scalatest" % "3.0.5" % Test,
"se.sawano.java" % "alphanumeric-comparator" % "1.4.1"
)
resolvers in Global += Resolver.url(
"upstartcommerce",
url("https://upstartcommerce.bintray.com/nochannel")
)(Resolver.ivyStylePatterns)
// you need to enable the plugin HERE to depend on code in the plugin JAR. you can't add it as part of
// libraryDependencies nor put it in plugins.sbt
addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "0.3.0")
addSbtPlugin("com.dwijnand" % "sbt-compat" % "1.2.6")
// disable scaladoc generation
sources in(Compile, doc) := Seq.empty
publishArtifact in packageDoc := false