Skip to content

Don't do a fully binary cross of runtime, only the compiler plugin #309

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 21 additions & 13 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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
Expand All @@ -93,13 +100,14 @@ 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",
"org.scalatest" %% "scalatest" % ScalatestVersion % Test
)
)
.settings(
unmanagedSourceDirectories in Test += (sourceDirectory in Test).value / "scala-2.12+"
Test / unmanagedSourceDirectories += (Test / sourceDirectory).value / "scala-2.12+"
)

2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.4.4
sbt.version=1.5.1
4 changes: 2 additions & 2 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -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")

Expand Down
2 changes: 1 addition & 1 deletion version.sbt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version in ThisBuild := "1.4.2-SNAPSHOT"
version in ThisBuild := "1.4.3-SNAPSHOT"