Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add Scala 3 buid setting #623

Merged
merged 1 commit into from
Oct 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
14 changes: 11 additions & 3 deletions project/dependencies.scala
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down Expand Up @@ -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",
Expand Down