@@ -33,6 +33,7 @@ ThisBuild / homepage := Some(
3333val scala211 = " 2.11.12"
3434val scala212 = " 2.12.13"
3535val scala213 = " 2.13.5"
36+ val scala3 = " 3.0.0-RC1"
3637
3738scalaVersion := scala213
3839
@@ -52,6 +53,7 @@ lazy val commonSettings = Seq(
5253 case Some ((2 , 11 )) => ScalacOptions .scalacOptions211
5354 case Some ((2 , 12 )) => ScalacOptions .scalacOptions212
5455 case Some ((2 , 13 )) => ScalacOptions .scalacOptions213
56+ case Some ((3 , 0 )) => ScalacOptions .scalacOptions3
5557 case _ => Seq ()
5658 }
5759 }
@@ -75,23 +77,44 @@ lazy val cucumberScala = (projectMatrix in file("cucumber-scala"))
7577 libraryDependencies ++= Seq (
7678 " io.cucumber" % " cucumber-core" % cucumberVersion,
7779 // Users have to provide it (for JacksonDefaultDataTableTransformer)
78- " com.fasterxml.jackson.module" %% " jackson-module-scala" % jacksonVersion % Provided ,
80+ (" com.fasterxml.jackson.module" %% " jackson-module-scala" % jacksonVersion % Provided )
81+ .withDottyCompat(scalaVersion.value),
7982 " junit" % " junit" % junitVersion % Test ,
8083 " io.cucumber" % " cucumber-junit" % cucumberVersion % Test ,
81- " org.mockito" %% " mockito-scala" % mockitoScalaVersion % Test
84+ (" org.mockito" %% " mockito-scala" % mockitoScalaVersion % Test )
85+ .withDottyCompat(scalaVersion.value)
8286 ),
8387 libraryDependencies ++= {
8488 CrossVersion .partialVersion(scalaVersion.value) match {
8589 case Some ((2 , n)) if n <= 12 =>
8690 List (" org.scala-lang.modules" %% " scala-collection-compat" % " 2.4.2" )
91+ case Some ((3 , 0 )) =>
92+ List (" io.github.gaeljw" %% " typetrees" % " 0.2.0" )
8793 case _ => Nil
8894 }
8995 },
9096 unmanagedSourceDirectories in Compile ++= {
9197 val sourceDir = (sourceDirectory in Compile ).value
9298 CrossVersion .partialVersion(scalaVersion.value) match {
93- case Some ((2 , n)) if n <= 11 => Seq (sourceDir / " scala-2.11" )
94- case _ => Seq ()
99+ case Some ((2 , n)) if n <= 11 =>
100+ Seq (sourceDir / " scala-2" , sourceDir / " scala-2.11" )
101+ case Some ((2 , n)) if n > 11 =>
102+ Seq (sourceDir / " scala-2" )
103+ case Some ((3 , 0 )) =>
104+ Seq (sourceDir / " scala-3" )
105+ case _ =>
106+ Seq ()
107+ }
108+ },
109+ unmanagedSourceDirectories in Test ++= {
110+ val testSourceDir = (sourceDirectory in Test ).value
111+ CrossVersion .partialVersion(scalaVersion.value) match {
112+ case Some ((2 , _)) =>
113+ Seq (testSourceDir / " scala-2" )
114+ case Some ((3 , 0 )) =>
115+ Seq (testSourceDir / " scala-3" )
116+ case _ =>
117+ Seq ()
95118 }
96119 },
97120 // Generate I18n traits
@@ -102,7 +125,7 @@ lazy val cucumberScala = (projectMatrix in file("cucumber-scala"))
102125 Seq (file)
103126 }.taskValue
104127 )
105- .jvmPlatform(scalaVersions = Seq (scala213, scala212, scala211))
128+ .jvmPlatform(scalaVersions = Seq (scala3, scala213, scala212, scala211))
106129
107130// Examples project
108131lazy val examples = (projectMatrix in file(" examples" ))
@@ -116,7 +139,7 @@ lazy val examples = (projectMatrix in file("examples"))
116139 publishArtifact := false
117140 )
118141 .dependsOn(cucumberScala % Test )
119- .jvmPlatform(scalaVersions = Seq (scala213, scala212))
142+ .jvmPlatform(scalaVersions = Seq (scala3, scala213, scala212))
120143
121144// Version policy check
122145
0 commit comments