From ba30ac6439c0de58a1109c1b99a90ec449f63830 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Tue, 3 Aug 2021 23:24:11 +0200 Subject: [PATCH 1/4] Update sbt-scala-module to 2.4.0 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index 9f7ba7a2..e591fd3d 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -4,7 +4,7 @@ val scalaJSVersion = val scalaNativeVersion = Option(System.getenv("SCALANATIVE_VERSION")).filter(_.nonEmpty).getOrElse("0.4.0") -addSbtPlugin("org.scala-lang.modules" % "sbt-scala-module" % "2.3.1") +addSbtPlugin("org.scala-lang.modules" % "sbt-scala-module" % "2.4.0") addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.1.0") addSbtPlugin("org.portable-scala" % "sbt-scala-native-crossproject" % "1.1.0") addSbtPlugin("org.scala-js" % "sbt-scalajs" % scalaJSVersion) From f34cca230c3d4e81c30d18b5f5d582c111487f71 Mon Sep 17 00:00:00 2001 From: Julien Richard-Foy Date: Wed, 4 Aug 2021 10:04:35 +0200 Subject: [PATCH 2/4] Adjust build definition and CI process - remove `versionScheme` (already set by sbt-version-policy) - scope `versionPolicyIntention` to projects, instead of to `ThisBuild` - replace `versionPolicyDependencySchemes` with `libraryDependencySchemes` - remove `scalaModuleMimaPreviousVersion` (already set by sbt-version-policy) - remove invocation of `versionPolicyCheck` from CI (already invoked by `test`) - add invocation of `versionCheck` before publishing a release --- build.sbt | 6 ++---- build.sh | 3 ++- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/build.sbt b/build.sbt index b560cdaa..6c1e3e93 100644 --- a/build.sbt +++ b/build.sbt @@ -3,10 +3,8 @@ import sbtcrossproject.CrossPlugin.autoImport.{crossProject, CrossType} ThisBuild / startYear := Some(2002) ThisBuild / licenses += (("Apache-2.0", url("https://www.apache.org/licenses/LICENSE-2.0"))) -ThisBuild / versionScheme := Some("early-semver") -ThisBuild / versionPolicyIntention := Compatibility.BinaryCompatible // because it doesn't declare it itself -ThisBuild / versionPolicyDependencySchemes += "org.scala-js" %% "scalajs-library" % "semver-spec" +ThisBuild / libraryDependencySchemes += "org.scala-js" %% "scalajs-library" % "semver-spec" lazy val configSettings: Seq[Setting[_]] = Seq( unmanagedSourceDirectories ++= { @@ -59,7 +57,7 @@ lazy val xml = crossProject(JSPlatform, JVMPlatform, NativePlatform) |""".stripMargin)), // Note: See discussion on non-JVM Mima in https://github.com/scala/scala-xml/pull/517 - scalaModuleMimaPreviousVersion := Some("2.0.0"), + versionPolicyIntention := Compatibility.BinaryAndSourceCompatible, mimaReportSignatureProblems := true, mimaBinaryIssueFilters ++= { import com.typesafe.tools.mima.core._ diff --git a/build.sh b/build.sh index 373cc1ec..ab4af696 100755 --- a/build.sh +++ b/build.sh @@ -37,6 +37,7 @@ verPat="[0-9]+\.[0-9]+\.[0-9]+(-[A-Za-z0-9-]+)?" tagPat="^v$verPat(#.*)?$" if [[ "$TRAVIS_TAG" =~ $tagPat ]]; then + versionCheckTask="versionCheck" releaseTask="ci-release" if ! isReleaseJob; then echo "Not releasing on Java $ADOPTOPENJDK with Scala $TRAVIS_SCALA_VERSION" @@ -53,4 +54,4 @@ export CI_SNAPSHOT_RELEASE="${projectPrefix}publish" # for now, until we're confident in the new release scripts, just close the staging repo. export CI_SONATYPE_RELEASE="; sonatypePrepare; sonatypeBundleUpload; sonatypeClose" -sbt clean ${projectPrefix}test ${projectPrefix}versionPolicyCheck ${projectPrefix}publishLocal $releaseTask +sbt clean ${projectPrefix}test ${projectPrefix}publishLocal $versionCheckTask $releaseTask From 9f46905eeb4e0e901ac697bdaa9718062f52192a Mon Sep 17 00:00:00 2001 From: Julien Richard-Foy Date: Wed, 4 Aug 2021 10:11:47 +0200 Subject: [PATCH 3/4] Adjust CI process - remove invocation of `versionPolicyCheck` from CI (already invoked by `test`) - add invocation of `versionCheck` before publishing a release --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 51dfb564..157191e7 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -52,7 +52,7 @@ jobs: - run: java -version - sbt_cmd: scala_version: << parameters.scala_version >> - sbt_tasks: xml/update xml/compile xml/Test/compile xml/test xml/doc xml/package xml/osgiBundle xml/versionPolicyCheck + sbt_tasks: xml/update xml/compile xml/Test/compile xml/test xml/doc xml/package xml/osgiBundle scalajs_job: executor: scala_jdk8_executor parameters: From 5c746cb6a7dd986dbd08c06aa05eb35351f2f650 Mon Sep 17 00:00:00 2001 From: Julien Richard-Foy Date: Wed, 4 Aug 2021 10:13:51 +0200 Subject: [PATCH 4/4] Remove sbt-version-policy --- project/plugins.sbt | 1 - 1 file changed, 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index e591fd3d..1df3b784 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -10,4 +10,3 @@ addSbtPlugin("org.portable-scala" % "sbt-scala-native-crossproject" % "1.1.0") addSbtPlugin("org.scala-js" % "sbt-scalajs" % scalaJSVersion) addSbtPlugin("org.scala-native" % "sbt-scala-native" % scalaNativeVersion) addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.6.0") -addSbtPlugin("ch.epfl.scala" % "sbt-version-policy" % "1.2.1")