diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dbb89abb..f2f2bcc6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,6 +33,7 @@ jobs: case ${{ matrix.java }} in "8") sbt -v ++2.12.x "scalaxbPlugin/scripted" + sbt -v ++3.x "app/Test/compile" sbt -v +integration/test ;; "21") diff --git a/build.sbt b/build.sbt index e2ae3ef2..d01d3701 100644 --- a/build.sbt +++ b/build.sbt @@ -54,7 +54,7 @@ lazy val app = (project in file("cli")) .settings(codegenSettings) .settings(nocomma { name := "scalaxb" - crossScalaVersions := Seq(scala213, scala212, scala211, scala210) + crossScalaVersions := Seq(scala3, scala213, scala212, scala211, scala210) scalaVersion := scala212 resolvers += sbtResolver.value libraryDependencies ++= appDependencies(scalaVersion.value) diff --git a/project/dependencies.scala b/project/dependencies.scala index c65a9177..8531e246 100644 --- a/project/dependencies.scala +++ b/project/dependencies.scala @@ -1,13 +1,21 @@ import sbt._ object Dependencies { + val scala3 = "3.3.1" val scala213 = "2.13.12" val scala212 = "2.12.18" val scala211 = "2.11.12" val scala210 = "2.10.7" val jaxb = "javax.xml.bind" % "jaxb-api" % "2.3.1" - val scopt = "com.github.scopt" %% "scopt" % "3.7.1" + def scopt(sv: String) = { + CrossVersion.partialVersion(sv) match { + case Some((2, _)) => + "com.github.scopt" %% "scopt" % "3.7.1" + case _ => + "com.github.scopt" %% "scopt" % "4.1.0" + } + } val log4j = "log4j" % "log4j" % "1.2.17" val defaultDispatchVersion = "1.0.1" def dispatch(sv: String) = CrossVersion partialVersion sv match { @@ -63,13 +71,13 @@ object Dependencies { def appDependencies(sv: String) = Seq( launcherInterface % "provided", jaxb % "provided", - scopt, + scopt(sv), log4j ) ++ (sv match { case x if sv.startsWith("2.10.") => Nil case x if sv.startsWith("2.11.") => Seq(scalaXml1, scalaParserCombinators1) case x if sv.startsWith("2.12.") => Seq(scalaXml2, scalaParserCombinators1) - case x if sv.startsWith("2.13.") => Seq(scalaXml2, scalaParserCombinators2) + case x => Seq(scalaXml2, scalaParserCombinators2) }) def integrationDependencies(sv: String) = Seq( dispatch(sv) % "test",