Skip to content

Commit

Permalink
Merge pull request #447 from Philippus/issue-444
Browse files Browse the repository at this point in the history
Don't check for scala versions anymore for scala native
  • Loading branch information
Philippus authored Feb 3, 2022
2 parents c287698 + 063ebb3 commit b097700
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
fail-fast: false
matrix:
java: [8, 11, 17]
scala: [2.11.12, 2.12.15, 2.13.8, 3.0.2]
scala: [2.11.12, 2.12.15, 2.13.8, 3.1.1]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand Down
20 changes: 11 additions & 9 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@ ThisBuild / startYear := Some(2004)
// I thought we could declare these in `ThisBuild` scope but no :-/
val commonSettings = Seq(
versionScheme := Some("early-semver"),
versionPolicyIntention := Compatibility.BinaryAndSourceCompatible,
versionPolicyIntention := {
if (scalaVersion.value.startsWith("3"))
Compatibility.None
else
Compatibility.BinaryAndSourceCompatible
}
)

lazy val root = project.in(file("."))
Expand All @@ -22,7 +27,7 @@ lazy val parserCombinators = crossProject(JVMPlatform, JSPlatform, NativePlatfor
name := "scala-parser-combinators",
scalaModuleAutomaticModuleName := Some("scala.util.parsing"),

crossScalaVersions := Seq("2.13.8", "2.12.15", "2.11.12", "3.0.2"),
crossScalaVersions := Seq("2.13.8", "2.12.15", "2.11.12", "3.1.1"),
scalaVersion := crossScalaVersions.value.head,

libraryDependencies += "junit" % "junit" % "4.13.2" % Test,
Expand Down Expand Up @@ -99,13 +104,10 @@ lazy val parserCombinators = crossProject(JVMPlatform, JSPlatform, NativePlatfor
.nativeSettings(
versionPolicyCheck / skip := true,
versionCheck / skip := true,
compile / skip := System.getProperty("java.version").startsWith("1.6") || !scalaVersion.value.startsWith("2"),
test := {},
libraryDependencies := {
if (!scalaVersion.value.startsWith("2"))
libraryDependencies.value.filterNot(_.organization == "org.scala-native")
else libraryDependencies.value
}
Test / fork := false,
libraryDependencies :=
libraryDependencies.value.filterNot(_.organization == "junit") :+ "org.scala-native" %%% "junit-runtime" % "0.4.3",
addCompilerPlugin("org.scala-native" % "junit-plugin" % "0.4.3" cross CrossVersion.full)
)

lazy val parserCombinatorsJVM = parserCombinators.jvm
Expand Down

0 comments on commit b097700

Please sign in to comment.