diff --git a/build.sbt b/build.sbt index 48b13da..40cafe8 100644 --- a/build.sbt +++ b/build.sbt @@ -22,6 +22,8 @@ lazy val mima = project lazy val `skip-duplicate-java-publish` = project +lazy val `version-scheme` = project + dependsOn( `scalac-options`, `detect-license`, @@ -31,7 +33,8 @@ dependsOn( `publish-unidoc`, `detect-scala-organization`, `subdirectory-organization`, - `skip-duplicate-java-publish` + `skip-duplicate-java-publish`, + `version-scheme` ) libraryDependencies += "com.lihaoyi" %% "sourcecode" % "0.2.7" diff --git a/version-scheme/src/main/scala/com/thoughtworks/sbtBestPractice/versionScheme/DefaultVersionScheme.scala b/version-scheme/src/main/scala/com/thoughtworks/sbtBestPractice/versionScheme/DefaultVersionScheme.scala new file mode 100644 index 0000000..f6e6a19 --- /dev/null +++ b/version-scheme/src/main/scala/com/thoughtworks/sbtBestPractice/versionScheme/DefaultVersionScheme.scala @@ -0,0 +1,9 @@ +package com.thoughtworks.sbtBestPractice.versionScheme + +import sbt.AutoPlugin +import sbt._, Keys._ + +object DefaultVersionScheme extends AutoPlugin { + override def trigger = allRequirements + override def buildSettings = Seq(ThisBuild / versionScheme := Some(VersionScheme.SemVerSpec)) +}