Skip to content

Commit 3078602

Browse files
authored
Merge pull request #33 from ohze/cross
2 parents 8de8ec7 + 0467954 commit 3078602

File tree

5 files changed

+13
-3
lines changed

5 files changed

+13
-3
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ env: ADOPTOPENJDK=8
66
scala:
77
- 2.12
88
- 2.12.next
9+
- 2.13
910
script: sbt test
1011

1112
notifications:

build.sbt

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,21 @@
11
import _root_.scalafix.sbt.BuildInfo._
22
import sbt.librarymanagement.Configurations.CompilerPlugin
33

4-
def scala213 = "2.13.3"
54
def scalametaVersion = "4.3.17"
65

76
inThisBuild(List(
87
organization := "org.scala-lang",
98
licenses := List("Apache-2.0" -> url("https://www.apache.org/licenses/LICENSE-2.0")),
109
developers := List(Developer("", "", "", url("https://github.com/scala/scala-rewrites/graphs/contributors"))),
1110
homepage := Some(url("https://github.com/scala/scala-rewrites")),
12-
scalaVersion := scala212,
11+
scalaVersion := (sys.env.get("TRAVIS_SCALA_VERSION") match {
12+
case Some("2.13") => scala213
13+
case Some("2.12") => scala212
14+
case Some("2.12.next") => scala212 // and then overriden by ScalaNightlyPlugin
15+
case None => scala212
16+
case tsv => sys.error(s"Unknown TRAVIS_SCALA_VERSION $tsv")
17+
}),
18+
crossScalaVersions := Seq(scala212, scala213),
1319
publish / skip := true,
1420
))
1521

@@ -24,10 +30,13 @@ val input = project.enablePlugins(ScalaNightlyPlugin).settings(
2430
libraryDependencies += "org.scalameta" % "semanticdb-scalac" % scalametaVersion % CompilerPlugin cross CrossVersion.patch,
2531
)
2632

27-
val output = project
33+
val output = project
34+
35+
// This project is used to verify that the output code actually compiles with scala 2.13
2836
val output213 = output.withId("output213").settings(
2937
target := file(s"${target.value.getPath}-2.13"),
3038
scalaVersion := scala213,
39+
crossScalaVersions := Seq(scalaVersion.value),
3140
)
3241

3342
val tests = project.dependsOn(rewrites).enablePlugins(ScalaNightlyPlugin, ScalafixTestkitPlugin).settings(

0 commit comments

Comments
 (0)