Skip to content

Commit

Permalink
update scala 3 build settings
Browse files Browse the repository at this point in the history
  • Loading branch information
xuwei-k committed Apr 30, 2023
1 parent 2bfdca6 commit d576bbf
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- name: Run tests
run: sbt scalafmtSbtCheck scalafmtCheckAll test
- name: Scala 3
run: sbt '++ 3.2.2!' update # TODO
run: sbt '++ 3.x' test
- name: Build executable
run: sbt executable
- name: Upload artifacts
Expand Down
21 changes: 16 additions & 5 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,17 @@ name := Name
version := GitBucketVersion
scalaVersion := "2.13.10"

crossScalaVersions += "3.2.2"

conflictWarning := {
if (scalaBinaryVersion.value == "3") {
// TODO remove this workaround
ConflictWarning("warn", Level.Warn, false)
} else {
conflictWarning.value
}
}

// scalafmtOnCompile := true

coverageExcludedPackages := ".*\\.html\\..*"
Expand All @@ -30,10 +41,10 @@ resolvers ++= Seq(
libraryDependencies ++= Seq(
"org.eclipse.jgit" % "org.eclipse.jgit.http.server" % JgitVersion,
"org.eclipse.jgit" % "org.eclipse.jgit.archive" % JgitVersion,
"org.scalatra" %% "scalatra" % ScalatraVersion cross CrossVersion.for3Use2_13,
"org.scalatra" %% "scalatra-json" % ScalatraVersion cross CrossVersion.for3Use2_13,
"org.scalatra" %% "scalatra-forms" % ScalatraVersion cross CrossVersion.for3Use2_13,
"org.json4s" %% "json4s-jackson" % "4.0.6" cross CrossVersion.for3Use2_13,
"org.scalatra" %% "scalatra" % ScalatraVersion,
"org.scalatra" %% "scalatra-json" % ScalatraVersion,
"org.scalatra" %% "scalatra-forms" % ScalatraVersion,
"org.json4s" %% "json4s-jackson" % "4.0.6",
"commons-io" % "commons-io" % "2.11.0",
"io.github.gitbucket" % "solidbase" % "1.0.5",
"io.github.gitbucket" % "markedj" % "1.0.17",
Expand All @@ -60,7 +71,7 @@ libraryDependencies ++= Seq(
"org.eclipse.jetty" % "jetty-webapp" % JettyVersion % "provided",
"javax.servlet" % "javax.servlet-api" % "3.1.0" % "provided",
"junit" % "junit" % "4.13.2" % "test",
"org.scalatra" %% "scalatra-scalatest" % ScalatraVersion % "test" cross CrossVersion.for3Use2_13,
"org.scalatra" %% "scalatra-scalatest" % ScalatraVersion % "test",
"org.mockito" % "mockito-core" % "4.11.0" % "test",
"com.dimafeng" %% "testcontainers-scala" % "0.40.15" % "test",
"org.testcontainers" % "mysql" % "1.18.0" % "test",
Expand Down

0 comments on commit d576bbf

Please sign in to comment.