From f10aca7e4214eb2ca89037e45cb0de3a84318d9a Mon Sep 17 00:00:00 2001 From: Grzegorz Bielski Date: Mon, 19 Aug 2024 13:38:23 +0200 Subject: [PATCH] add sbt-version-policy plugin (#261) --- .github/workflows/ci.yml | 4 ++-- build.sbt | 3 +++ project/plugins.sbt | 4 +++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index de733f2..52a7364 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,7 +25,7 @@ jobs: java-version: openjdk@1.11 - name: build ${{ matrix.scala }} - run: sbt ++${{ matrix.scala }} clean coverage test + run: sbt ++${{ matrix.scala }} clean coverage test versionPolicyCheck - name: test coverage if: success() @@ -40,4 +40,4 @@ jobs: with: type: ${{ job.status }} job_name: Build - url: ${{ secrets.SLACK_WEBHOOK }} \ No newline at end of file + url: ${{ secrets.SLACK_WEBHOOK }} diff --git a/build.sbt b/build.sbt index ad11850..c06d749 100644 --- a/build.sbt +++ b/build.sbt @@ -1,5 +1,8 @@ import Dependencies._ +ThisBuild / versionScheme := Some("early-semver") +ThisBuild / versionPolicyIntention := Compatibility.BinaryCompatible + def crossSettings[T](scalaVersion: String, if3: List[T], if2: List[T]) = CrossVersion.partialVersion(scalaVersion) match { case Some((3, _)) => if3 diff --git a/project/plugins.sbt b/project/plugins.sbt index 5601feb..49f3784 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -6,4 +6,6 @@ addSbtPlugin("com.github.sbt" % "sbt-release" % "1.1.0") addSbtPlugin("com.evolution" % "sbt-scalac-opts-plugin" % "0.0.9") -addSbtPlugin("com.evolution" % "sbt-artifactory-plugin" % "0.0.2") \ No newline at end of file +addSbtPlugin("com.evolution" % "sbt-artifactory-plugin" % "0.0.2") + +addSbtPlugin("ch.epfl.scala" % "sbt-version-policy" % "3.2.1")