Skip to content

Commit

Permalink
Support scala 3.3.x
Browse files Browse the repository at this point in the history
  • Loading branch information
Philippus committed Nov 9, 2024
1 parent 63756c7 commit 23a409d
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
scala-version: [2.13.x]
scala-version: [2.13.x, 3.3.x]
java-version: [8, 11, 17, 21]
steps:
- uses: actions/checkout@v4
Expand All @@ -18,6 +18,6 @@ jobs:
distribution: temurin
java-version: ${{ matrix.java-version }}
- name: Run tests
run: sbt ++${{ matrix.scala-version }} clean versionPolicyCheck coverage test coverageReport
run: sbt ++${{ matrix.scala-version }} clean coverage test coverageReport
- name: Upload coverage report
run: bash <(curl -s https://codecov.io/bash)
2 changes: 1 addition & 1 deletion .scalafmt.conf
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ rewriteTokens = {
"→": "->"
"←": "<-"
}
runner.dialect = scala213
runner.dialect = scala213source3
6 changes: 4 additions & 2 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@ developers := List(
)
)

crossScalaVersions := List("2.13.15")
scalaVersion := crossScalaVersions.value.last
scalaVersion := "2.13.15"
crossScalaVersions += "3.3.4"

scalacOptions += "-Xsource:3"

ThisBuild / versionScheme := Some("semver-spec")
ThisBuild / versionPolicyIntention := Compatibility.BinaryCompatible
Expand Down
3 changes: 3 additions & 0 deletions src/main/scala/nl/gn0s1s/isbn/Isbn.scala
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
package nl.gn0s1s.isbn

import scala.annotation.nowarn

@nowarn
final case class Isbn private (value: String) {
lazy val Array(prefixElement, registrationGroupElement, registrantElement, publicationElement, checkDigit) =
toHyphenatedIsbn13.split('-')
Expand Down
2 changes: 1 addition & 1 deletion src/test/scala/nl/gn0s1s/isbn/HyphenationSuite.scala
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package nl.gn0s1s.isbn

import munit.ScalaCheckSuite
import org.scalacheck.Prop._
import org.scalacheck.Prop.*

class HyphenationSuite extends ScalaCheckSuite {
property("can convert to a hyphenated isbn-13") {
Expand Down
2 changes: 1 addition & 1 deletion src/test/scala/nl/gn0s1s/isbn/IsbnSuite.scala
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package nl.gn0s1s.isbn

import munit.ScalaCheckSuite
import org.scalacheck.Prop._
import org.scalacheck.Prop.*

class IsbnSuite extends ScalaCheckSuite {
property("accepts isbn-13s") {
Expand Down

0 comments on commit 23a409d

Please sign in to comment.