Skip to content

Commit 45c856c

Browse files
authored
Merge pull request #8 from sjrd/scala-3
Add cross-compilation for Scala 3.
2 parents 9d1402c + 5c54d7f commit 45c856c

File tree

4 files changed

+20
-7
lines changed

4 files changed

+20
-7
lines changed

.github/workflows/ci.yml

+5-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
strategy:
1313
fail-fast: false
1414
matrix:
15-
scalaversion: ["2.10.7", "2.11.12", "2.12.8", "2.13.0"]
15+
scalaversion: ["2.10.7", "2.11.12", "2.12.8", "2.13.0", "3.0.0"]
1616
steps:
1717
- uses: actions/checkout@v2
1818
- uses: olafurpg/setup-scala@v10
@@ -21,5 +21,9 @@ jobs:
2121
- uses: coursier/cache-action@v5
2222
- name: Build
2323
run: sbt "++${{ matrix.scalaversion }}" scalajs-stubs/publishLocal
24+
25+
# MiMa is not run for the Scala 2.10.x artifact because there is no
26+
# version of sbt-mima that works with sbt 1.5.x and for Scala 2.10.x.
2427
- name: MiMa
28+
if: matrix.scalaversion != '2.10.7'
2529
run: sbt "++${{ matrix.scalaversion }}" scalajs-stubs/mimaReportBinaryIssues

build.sbt

+13-4
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
val previousVersion = "1.0.0"
22

33
inThisBuild(Def.settings(
4-
version := "1.0.1-SNAPSHOT",
4+
version := "1.1.0-SNAPSHOT",
55
organization := "org.scala-js",
66

7-
crossScalaVersions := Seq("2.12.8", "2.10.7", "2.11.12", "2.13.0"),
7+
crossScalaVersions := Seq("2.12.8", "2.10.7", "2.11.12", "2.13.0", "3.0.0"),
88
scalaVersion := crossScalaVersions.value.head,
99
scalacOptions ++= Seq("-deprecation", "-feature", "-Xfatal-warnings"),
1010

11+
versionScheme := Some("semver-spec"),
12+
1113
homepage := Some(url("https://www.scala-js.org/")),
1214
licenses += ("BSD New",
1315
url("https://github.com/scala-js/scala-js-stubs/blob/master/LICENSE")),
@@ -19,8 +21,15 @@ inThisBuild(Def.settings(
1921

2022
lazy val `scalajs-stubs`: Project = project.in(file("."))
2123
.settings(
22-
mimaPreviousArtifacts +=
23-
organization.value %% moduleName.value % previousVersion,
24+
mimaPreviousArtifacts ++= {
25+
if (scalaBinaryVersion.value == "3") Set.empty // new in this release
26+
else Set(organization.value %% moduleName.value % previousVersion)
27+
},
28+
29+
/* Do not fail mimaReportBinaryIssues when mimaPreviousArtifacts is empty.
30+
* We specifically set it to empty above when binary compat is irrelevant.
31+
*/
32+
mimaFailOnNoPrevious := false,
2433

2534
publishMavenStyle := true,
2635
publishTo := {

project/build.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
sbt.version=1.2.8
1+
sbt.version=1.5.5

project/plugins.sbt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "0.2.0")
1+
addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "0.8.1")

0 commit comments

Comments
 (0)