Skip to content

Commit 8fa5f75

Browse files
authored
Merge pull request #6 from mblink/scala-3.7
Upgrade to Scala 3.7.1
2 parents 1fe4d49 + 278ee6c commit 8fa5f75

File tree

2 files changed

+20
-15
lines changed

2 files changed

+20
-15
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
fail-fast: false
3030
matrix:
3131
os: [ubuntu-latest]
32-
scala: [2.12.20, 3.6.4]
32+
scala: [2.12.20, 3.6.4, 3.7.1]
3333
java: [temurin@11, temurin@17, temurin@21]
3434
runs-on: ${{ matrix.os }}
3535
steps:
@@ -72,25 +72,25 @@ jobs:
7272
run: sbt '++ ${{ matrix.scala }}' test scripted
7373

7474
- name: Build CLI
75-
if: matrix.java == 'temurin@21' && matrix.scala == '3.6.4' && github.event_name == 'push'
75+
if: matrix.java == 'temurin@21' && matrix.scala == '3.7.1' && github.event_name == 'push'
7676
env:
7777
FIND_UNUSED_CLI_ASSEMBLY_JAR_NAME: ${{ format('find-unused-{0}.jar', startsWith(github.ref, 'refs/tags/v') && github.ref_name || github.sha) }}
7878
run: sbt '++ ${{ matrix.scala }}' cli/assembly
7979

8080
- name: Copy CLI
81-
if: matrix.java == 'temurin@21' && matrix.scala == '3.6.4' && github.event_name == 'push'
81+
if: matrix.java == 'temurin@21' && matrix.scala == '3.7.1' && github.event_name == 'push'
8282
run: |
8383
mkdir -p cli/artifacts/
8484
cp cli/target/scala-${{ matrix.scala }}/${{ format('find-unused-{0}.jar', startsWith(github.ref, 'refs/tags/v') && github.ref_name || github.sha) }} cli/artifacts/${{ format('find-unused-{0}.jar', startsWith(github.ref, 'refs/tags/v') && github.ref_name || github.sha) }}
8585
8686
- name: Attest CLI
87-
if: matrix.java == 'temurin@21' && matrix.scala == '3.6.4' && github.event_name == 'push'
87+
if: matrix.java == 'temurin@21' && matrix.scala == '3.7.1' && github.event_name == 'push'
8888
uses: actions/attest-build-provenance@v2
8989
with:
9090
subject-path: cli/artifacts/${{ format('find-unused-{0}.jar', startsWith(github.ref, 'refs/tags/v') && github.ref_name || github.sha) }}
9191

9292
- name: Upload CLI
93-
if: matrix.java == 'temurin@21' && matrix.scala == '3.6.4' && github.event_name == 'push'
93+
if: matrix.java == 'temurin@21' && matrix.scala == '3.7.1' && github.event_name == 'push'
9494
uses: actions/upload-artifact@v4
9595
with:
9696
name: ${{ format('find-unused-{0}.jar', startsWith(github.ref, 'refs/tags/v') && github.ref_name || github.sha) }}
@@ -105,7 +105,7 @@ jobs:
105105
strategy:
106106
matrix:
107107
os: [ubuntu-latest]
108-
scala: [3.6.4]
108+
scala: [3.7.1]
109109
java: [temurin@21]
110110
runs-on: ${{ matrix.os }}
111111
steps:

build.sbt

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@ lazy val tastyQueryDev = sys.env.get("TASTY_QUERY_DEVELOPMENT").exists(_ == "1")
66

77
lazy val scala2 = "2.12.20"
88
lazy val scala36 = "3.6.4"
9+
lazy val scala37 = "3.7.1"
910

10-
ThisBuild / crossScalaVersions := Seq(scala2, scala36)
11+
ThisBuild / crossScalaVersions := Seq(scala2, scala36, scala37)
1112

1213
val java21 = JavaSpec.temurin("21")
1314
val javaVersions = Seq(JavaSpec.temurin("11"), JavaSpec.temurin("17"), java21)
@@ -39,7 +40,7 @@ ThisBuild / githubWorkflowPublishTargetBranches := Seq()
3940
def isJava(v: Int) = s"matrix.java == '${javaVersions.find(_.version == v.toString).get.render}'"
4041
def isScala(v: String) = s"matrix.scala == '$v'"
4142

42-
val shouldBuildCLI = isJava(21) ++ " && " ++ isScala(scala36) ++ " && github.event_name == 'push'"
43+
val shouldBuildCLI = isJava(21) ++ " && " ++ isScala(scala37) ++ " && github.event_name == 'push'"
4344

4445
ThisBuild / githubWorkflowBuild := Seq(
4546
WorkflowStep.Sbt(List("test", "scripted"), name = Some("Test")),
@@ -81,7 +82,7 @@ ThisBuild / githubWorkflowAddedJobs += WorkflowJob(
8182
name = "Release",
8283
oses = List("ubuntu-latest"),
8384
javas = List(java21),
84-
scalas = List(scala36),
85+
scalas = List(scala37),
8586
cond = Some(isTag ++ " && github.event_name == 'push'"),
8687
needs = List("build"),
8788
steps = List(
@@ -109,8 +110,8 @@ ThisBuild / githubWorkflowAddedJobs += WorkflowJob(
109110

110111
lazy val commonSettings = Seq(
111112
organization := "bondlink",
112-
scalaVersion := scala36,
113-
crossScalaVersions := Seq(scala36),
113+
scalaVersion := scala37,
114+
crossScalaVersions := Seq(scala37),
114115
licenses += License.Apache2,
115116
publish / skip := true,
116117
)
@@ -125,12 +126,16 @@ lazy val publishSettings = Seq(
125126
lazy val core = project.in(file("core"))
126127
.settings(commonSettings)
127128
.settings(publishSettings)
129+
.settings(
130+
if (tastyQueryDev) Seq()
131+
else Seq(
132+
resolvers += "bondlink-maven-repo" at "https://maven.bondlink-cdn.com",
133+
libraryDependencies += "bondlink" %% "tasty-query" % "1.6.0",
134+
)
135+
)
128136
.settings(
129137
name := "find-unused-core",
130-
libraryDependencies ++= (
131-
if (tastyQueryDev) Seq()
132-
else Seq("ch.epfl.scala" %% "tasty-query" % "1.5.0")
133-
) ++ Seq(
138+
libraryDependencies ++= Seq(
134139
"com.lihaoyi" %% "pprint" % "0.9.0",
135140
"org.typelevel" %% "cats-core" % "2.13.0",
136141
),

0 commit comments

Comments
 (0)