diff --git a/.scala-steward.conf b/.scala-steward.conf index f8c9828e..15ac2683 100644 --- a/.scala-steward.conf +++ b/.scala-steward.conf @@ -1,2 +1,8 @@ pullRequests.frequency = "@weekly" commits.message = "${artifactName} ${nextVersion} (was ${currentVersion})" + +updates.pin = [ + // See comment in build.sbt why we want to pin these two deps to 1.x + { groupId = "org.scala-lang.modules", artifactId = "scala-xml", version = "1." }, + { groupId = "org.scala-lang.modules", artifactId = "scala-parser-combinators", version = "1." } +] diff --git a/build.sbt b/build.sbt index 1e8fbce0..ba391ee7 100644 --- a/build.sbt +++ b/build.sbt @@ -5,12 +5,14 @@ import org.scalajs.jsenv.nodejs.NodeJSEnv // Binary compatibility is this version val previousVersion: Option[String] = Some("1.5.0") -val ScalaTestVersion = "3.2.9" -val ScalaParserCombinatorsVersion = "2.0.0" - -val ScalaXmlVersion = "2.0.1" -// Next line can be removed when dropping Scala 2.12? See https://github.com/playframework/twirl/pull/424 -ThisBuild / libraryDependencySchemes += "org.scala-lang.modules" %% "scala-xml" % VersionScheme.Always +val ScalaTestVersion = "3.2.9" + +// Do NOT upgrade these dependencies to 2.x or newer! twirl is a sbt-plugin +// and gets published with Scala 2.12, therefore we need to stay at the same major version +// like the 2.12.x Scala compiler, otherwise we run into conflicts when using sbt 1.5+ +// See https://github.com/scala/scala/pull/9743 +val ScalaParserCombinatorsVersion = "1.1.2" // Do not upgrade beyond 1.x +val ScalaXmlVersion = "1.3.0" // Do not upgrade beyond 1.x val mimaSettings = Seq( mimaPreviousArtifacts := previousVersion.map(organization.value %% name.value % _).toSet diff --git a/docs/project/plugins.sbt b/docs/project/plugins.sbt index ae08c519..4a6aa0ab 100644 --- a/docs/project/plugins.sbt +++ b/docs/project/plugins.sbt @@ -7,6 +7,3 @@ resolvers ++= DefaultOptions.resolvers(snapshot = true) addSbtPlugin("com.typesafe.play" % "play-docs-sbt-plugin" % sys.props.getOrElse("play.version", "2.8.0")) addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.6.0") addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.3") - -// Next line can be removed when dropping Scala 2.12? See https://github.com/playframework/twirl/pull/424 -ThisBuild / libraryDependencySchemes += "org.scala-lang.modules" %% "scala-xml" % VersionScheme.Always diff --git a/sbt-twirl/src/sbt-test/twirl/compile/project/plugins.sbt b/sbt-twirl/src/sbt-test/twirl/compile/project/plugins.sbt index e8aebbd8..631d5883 100644 --- a/sbt-twirl/src/sbt-test/twirl/compile/project/plugins.sbt +++ b/sbt-twirl/src/sbt-test/twirl/compile/project/plugins.sbt @@ -1,4 +1 @@ addSbtPlugin("com.typesafe.sbt" % "sbt-twirl" % sys.props("project.version")) - -// Next line can be removed when dropping Scala 2.12? See https://github.com/playframework/twirl/pull/424 -ThisBuild / libraryDependencySchemes += "org.scala-lang.modules" %% "scala-xml" % VersionScheme.Always diff --git a/sbt-twirl/src/sbt-test/twirl/scalajs-compile/project/plugins.sbt b/sbt-twirl/src/sbt-test/twirl/scalajs-compile/project/plugins.sbt index b376fa91..4d2f1032 100644 --- a/sbt-twirl/src/sbt-test/twirl/scalajs-compile/project/plugins.sbt +++ b/sbt-twirl/src/sbt-test/twirl/scalajs-compile/project/plugins.sbt @@ -1,6 +1,2 @@ addSbtPlugin("com.typesafe.sbt" % "sbt-twirl" % sys.props("project.version")) addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.7.0") - -// Next line can be removed when dropping Scala 2.12? See https://github.com/playframework/twirl/pull/424 -ThisBuild / libraryDependencySchemes += "org.scala-lang.modules" %% "scala-xml" % VersionScheme.Always -