11import _root_ .scalafix .sbt .BuildInfo ._
22import sbt .librarymanagement .Configurations .CompilerPlugin
33
4- def scala213 = " 2.13.3"
54def scalametaVersion = " 4.3.17"
65
76inThisBuild(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
2836val output213 = output.withId(" output213" ).settings(
2937 target := file(s " ${target.value.getPath}-2.13 " ),
3038 scalaVersion := scala213,
39+ crossScalaVersions := Seq (scalaVersion.value),
3140)
3241
3342val tests = project.dependsOn(rewrites).enablePlugins(ScalaNightlyPlugin , ScalafixTestkitPlugin ).settings(
0 commit comments