Skip to content

Commit 7b1739c

Browse files
committed
add sbt-version-policy and declare a version scheme
fixes #434
1 parent 4e6cf96 commit 7b1739c

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

build.sbt

+5
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ lazy val compat = MultiScalaCrossProject(JSPlatform, JVMPlatform, NativePlatform
7070
if (scalaVersion.value.startsWith("2.13.") || isDotty.value) sharedSourceDir / "scala-2.13"
7171
else sharedSourceDir / "scala-2.11_2.12"
7272
},
73+
versionScheme := Some("early-semver"),
74+
versionPolicyIntention := Compatibility.BinaryCompatible,
7375
)
7476
.jvmSettings(
7577
Test / unmanagedSourceDirectories += (ThisBuild / baseDirectory).value / "compat/src/test/scala-jvm",
@@ -144,6 +146,7 @@ lazy val `binary-compat` = project
144146
scalaVersion := scala212,
145147
libraryDependencies += "com.typesafe" %% "mima-core" % "0.8.0" % Test,
146148
junit,
149+
versionPolicyIntention := Compatibility.None,
147150
buildInfoPackage := "build",
148151
buildInfoKeys := Seq[BuildInfoKey](
149152
"oldClasses" -> (`binary-compat-old` / Compile / classDirectory).value.toString,
@@ -166,6 +169,7 @@ lazy val `scalafix-rules` = project
166169
.settings(
167170
organization := (compat212JVM / organization).value,
168171
publishTo := (compat212JVM / publishTo).value,
172+
versionPolicyIntention := Compatibility.None,
169173
name := "scala-collection-migrations",
170174
scalaVersion := scalafixScala212,
171175
libraryDependencies += "ch.epfl.scala" %% "scalafix-core" % scalafixVersion
@@ -361,6 +365,7 @@ inThisBuild(
361365
List(s"""++${sys.env.get("TRAVIS_SCALA_VERSION").get}!"""),
362366
List(s"$projectPrefix/clean"),
363367
List(s"$testProjectPrefix/test"),
368+
List(s"$projectPrefix/versionPolicyCheck"),
364369
List(s"$projectPrefix/publishLocal"),
365370
publishTask
366371
).flatten

project/plugins.sbt

+1
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@ addSbtPlugin("org.portable-scala" % "sbt-scala-native-crossproject" % crossV
1212
addSbtPlugin("org.scala-lang.modules" % "sbt-scala-module" % "2.2.4")
1313
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.9.26")
1414
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.10.0")
15+
addSbtPlugin("ch.epfl.scala" % "sbt-version-policy" % "1.0.0-RC5")

0 commit comments

Comments
 (0)