diff --git a/build.sbt b/build.sbt index 154b9995..fb972af2 100644 --- a/build.sbt +++ b/build.sbt @@ -93,7 +93,7 @@ lazy val scalaxbPlugin = (project in file("sbt-scalaxb")) description := """sbt plugin to run scalaxb""" pluginCrossBuild / sbtVersion := { scalaBinaryVersion.value match { - case "2.12" => "1.2.8" // set minimum sbt version + case "2.12" => "1.5.8" // set minimum sbt version } } scriptedLaunchOpts := { scriptedLaunchOpts.value ++ diff --git a/sbt-scalaxb/src/sbt-test/sbt-scalaxb/address/build.sbt b/sbt-scalaxb/src/sbt-test/sbt-scalaxb/address/build.sbt index 2bc95e4e..84c1ec00 100644 --- a/sbt-scalaxb/src/sbt-test/sbt-scalaxb/address/build.sbt +++ b/sbt-scalaxb/src/sbt-test/sbt-scalaxb/address/build.sbt @@ -1,13 +1,39 @@ -val scalaXml = "org.scala-lang.modules" %% "scala-xml" % "1.1.1" -val scalaParser = "org.scala-lang.modules" %% "scala-parser-combinators" % "1.1.1" +val scalaXml = Def.setting( + scalaBinaryVersion.value match { + case "2.10" => + Nil + case "2.11" | "2.12" => + Seq("org.scala-lang.modules" %% "scala-xml" % "1.1.1") + case _ => + Seq("org.scala-lang.modules" %% "scala-xml" % "2.2.0") + } +) +val scalaParser = Def.setting( + scalaBinaryVersion.value match { + case "2.10" => + Nil + case "2.11" | "2.12" => + Seq("org.scala-lang.modules" %% "scala-parser-combinators" % "1.1.1") + case _ => + Seq("org.scala-lang.modules" %% "scala-parser-combinators" % "2.3.0") + } +) val jaxbApi = "javax.xml.bind" % "jaxb-api" % "2.3.1" lazy val root = (project in file(".")). enablePlugins(ScalaxbPlugin). settings( - scalaVersion := "2.12.18", + crossScalaVersions := Seq( + "2.10.7", + "2.11.12", + "2.12.18", + "2.13.12", + "3.3.1", + ), name := "mavenxsd", scalaxbAutoPackages in (Compile, scalaxb) := true, scalaxbGenerateMutable in (Compile, scalaxb) := true, - libraryDependencies ++= Seq(scalaXml, scalaParser, jaxbApi) + libraryDependencies ++= scalaXml.value, + libraryDependencies ++= scalaParser.value, + libraryDependencies += jaxbApi ) diff --git a/sbt-scalaxb/src/sbt-test/sbt-scalaxb/address/test b/sbt-scalaxb/src/sbt-test/sbt-scalaxb/address/test index 1cf3700a..5aadb81c 100644 --- a/sbt-scalaxb/src/sbt-test/sbt-scalaxb/address/test +++ b/sbt-scalaxb/src/sbt-test/sbt-scalaxb/address/test @@ -1 +1 @@ ->compile +> +compile