forked from rallyhealth/sbt-git-versioning
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.sbt
40 lines (30 loc) · 1.21 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
import sbt.plugins.SbtPlugin
name := "sbt-git-versioning"
organization := "com.hiya"
ThisBuild / versionScheme := Some("early-semver")
ThisBuild / githubOwner := "hiyainc-oss"
ThisBuild / githubRepository := "sbt-git-versioning"
ThisBuild / githubWorkflowTargetTags ++= Seq("v*")
ThisBuild / githubWorkflowPublishTargetBranches := Seq(RefPredicate.StartsWith(Ref.Tag("v")))
licenses := Seq("MIT" -> url("http://opensource.org/licenses/MIT"))
// 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)
}
crossSbtVersions := List("1.2.8")
publishMavenStyle := true
libraryDependencies ++= Seq(
"org.scalatest" %% "scalatest" % "3.0.5" % Test,
"se.sawano.java" % "alphanumeric-comparator" % "1.4.1"
)
// disable scaladoc generation
Compile / doc / sources := Seq.empty
packageDoc / publishArtifact := false