From be018a918c52cc8136a689b4242ae900393e7599 Mon Sep 17 00:00:00 2001 From: ckipp01 Date: Mon, 26 Apr 2021 16:22:30 +0200 Subject: [PATCH 1/2] Setting version to 1.4.2 --- version.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.sbt b/version.sbt index c79d9b29..d6584afd 100644 --- a/version.sbt +++ b/version.sbt @@ -1 +1 @@ -version in ThisBuild := "1.4.2-SNAPSHOT" +version in ThisBuild := "1.4.2" From dbd277e708530573a5e07ab61fd68e1b0338ad7a Mon Sep 17 00:00:00 2001 From: ckipp01 Date: Mon, 26 Apr 2021 16:31:41 +0200 Subject: [PATCH 2/2] Don't do a full binary cross of the runtime. Looking back at https://github.com/scoverage/scalac-scoverage-plugin/commit/ac3db322c54dee18c967764d95f9904ff6d7e89f, I'm not actually 100% sure this was accurate. While we do need to do a fully binary publish of the actual compiler plugin, doing a full cross of the runtime artifact causes some issues. Mainly I just don't believe it's needed, but also then when publishing for other platforms, there is odd behavior where you no longer get the sjs prefix that you'd want in your artifacts published for JS. This change updates a few of the sbt dependencies, moves to the unified slash syntax, and only applies the full cross settings to the actual compiler plugin, not the runtime artifact. --- build.sbt | 34 +++++++++++++++++++++------------- project/build.properties | 2 +- project/plugins.sbt | 4 ++-- version.sbt | 2 +- 4 files changed, 25 insertions(+), 17 deletions(-) diff --git a/build.sbt b/build.sbt index b33989bf..035d565e 100644 --- a/build.sbt +++ b/build.sbt @@ -7,21 +7,28 @@ import sbtcrossproject.CrossType val Org = "org.scoverage" val ScalatestVersion = "3.1.1" -val bin212 = Seq("2.12.13", "2.12.12", "2.12.11", "2.12.10") -val bin213 = Seq("2.13.4", "2.13.3", "2.13.2", "2.13.1", "2.13.0") +lazy val Scala212 = "2.12.13" +lazy val Scala213 = "2.13.4" + +lazy val CurrentVersions = Seq(Scala213, Scala212) +val Legacy212 = Seq("2.12.12", "2.12.11", "2.12.10") +val Legacy213 = Seq("2.13.3", "2.13.2", "2.13.1", "2.13.0") + +lazy val fullCrossVersionSettings = Seq( + crossVersion := CrossVersion.full, + crossScalaVersions := CurrentVersions ++ Legacy213 ++ Legacy212, + crossTarget := target.value / s"scala-${scalaVersion.value}", +) val appSettings = Seq( organization := Org, - scalaVersion := "2.12.13", - crossScalaVersions := bin212 ++ bin213, - crossVersion := CrossVersion.full, - crossTarget := target.value / s"scala-${scalaVersion.value}", - fork in Test := false, + scalaVersion := Scala212, + Test / fork := false, publishMavenStyle := true, - publishArtifact in Test := false, - parallelExecution in Test := false, + Test / publishArtifact := false, + Test / parallelExecution := false, scalacOptions := Seq("-unchecked", "-deprecation", "-feature", "-encoding", "utf8"), - concurrentRestrictions in Global += Tags.limit(Tags.Test, 1), + Global / concurrentRestrictions += Tags.limit(Tags.Test, 1), publishTo := { if (isSnapshot.value) Some("snapshots" at "https://oss.sonatype.org/content/repositories/snapshots") @@ -73,14 +80,14 @@ lazy val root = Project("scalac-scoverage", file(".")) .aggregate(plugin, runtime.jvm, runtime.js) lazy val runtime = CrossProject("scalac-scoverage-runtime", file("scalac-scoverage-runtime"))(JVMPlatform, JSPlatform) - .crossType(CrossType.Full) .settings(name := "scalac-scoverage-runtime") .settings(appSettings: _*) .settings( + crossScalaVersions := CurrentVersions, libraryDependencies += "org.scalatest" %%% "scalatest" % ScalatestVersion % Test ) .jvmSettings( - fork in Test := true + Test / fork := true ) .jsSettings( scalaJSStage := FastOptStage @@ -93,6 +100,7 @@ lazy val plugin = Project("scalac-scoverage-plugin", file("scalac-scoverage-plug .dependsOn(`scalac-scoverage-runtimeJVM` % Test) .settings(name := "scalac-scoverage-plugin") .settings(appSettings: _*) + .settings(fullCrossVersionSettings: _*) .settings( libraryDependencies ++= Seq( "org.scala-lang.modules" %% "scala-xml" % "1.2.0", @@ -100,6 +108,6 @@ lazy val plugin = Project("scalac-scoverage-plugin", file("scalac-scoverage-plug ) ) .settings( - unmanagedSourceDirectories in Test += (sourceDirectory in Test).value / "scala-2.12+" + Test / unmanagedSourceDirectories += (Test / sourceDirectory).value / "scala-2.12+" ) diff --git a/project/build.properties b/project/build.properties index 7de0a938..f0be67b9 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.4.4 +sbt.version=1.5.1 diff --git a/project/plugins.sbt b/project/plugins.sbt index 15a82faa..59115ad9 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,6 +1,6 @@ -addSbtPlugin("com.jsuereth" % "sbt-pgp" % "2.0.1") +addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.1.2") -addSbtPlugin("com.github.gseitz" % "sbt-release" % "1.0.13") +addSbtPlugin("com.github.sbt" % "sbt-release" % "1.0.15") addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.0.0") diff --git a/version.sbt b/version.sbt index d6584afd..86a12748 100644 --- a/version.sbt +++ b/version.sbt @@ -1 +1 @@ -version in ThisBuild := "1.4.2" +version in ThisBuild := "1.4.3-SNAPSHOT"