From 820848aef5a5a10e687e40848418aad8368adc7b Mon Sep 17 00:00:00 2001 From: Naftoli Gugenheim <98384+nafg@users.noreply.github.com> Date: Sun, 29 Sep 2024 07:32:36 -0400 Subject: [PATCH] Build on Java 11 --- .github/workflows/ci.yml | 8 ++++---- .mergify.yml | 2 +- build.sbt | 23 +++++++++++++---------- 3 files changed, 18 insertions(+), 15 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 72e4c46..a17bfd4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,7 +23,7 @@ jobs: matrix: os: [ubuntu-latest] scala: [2.12.19] - java: [zulu@8] + java: [zulu@11] runs-on: ${{ matrix.os }} steps: - name: Checkout current branch (full) @@ -31,12 +31,12 @@ jobs: with: fetch-depth: 0 - - name: Setup Java (zulu@8) - if: matrix.java == 'zulu@8' + - name: Setup Java (zulu@11) + if: matrix.java == 'zulu@11' uses: actions/setup-java@v4 with: distribution: zulu - java-version: 8 + java-version: 11 cache: sbt - name: Setup sbt diff --git a/.mergify.yml b/.mergify.yml index 3fc318d..c775ff5 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -9,7 +9,7 @@ pull_request_rules: - author=scala-steward - author=slick-scala-steward[bot] - author=renovate[bot] - - check-success=Build and Test (ubuntu-latest, 2.12.19, zulu@8) + - check-success=Build and Test (ubuntu-latest, 2.12.19, zulu@11) actions: queue: name: default diff --git a/build.sbt b/build.sbt index 91ebc82..2a51505 100644 --- a/build.sbt +++ b/build.sbt @@ -1,4 +1,4 @@ -import _root_.io.github.nafg.mergify.dsl._ +import _root_.io.github.nafg.mergify.dsl.* libraryDependencies ++= List( "org.slf4j" % "slf4j-nop" % "2.0.16", @@ -20,13 +20,13 @@ mergifyExtraConditions := Seq( lazy val runAll = taskKey[Unit]("Run all main classes") def runAllIn(config: Configuration) = Def.task { - val s = streams.value - val cp = (config / fullClasspath).value - val r = (config / run / runner).value - val classes = (config / discoveredMainClasses).value - classes.foreach { className => - r.run(className, cp.files, Seq(), s.log).get - } + val s = streams.value + val cp = (config / fullClasspath).value + val r = (config / run / runner).value + val classes = (config / discoveredMainClasses).value + classes.foreach { className => + r.run(className, cp.files, Seq(), s.log).get + } } runAll := { @@ -34,6 +34,9 @@ runAll := { runAllIn(Test).value } -ThisBuild / githubWorkflowBuild += WorkflowStep.Sbt(List("runAll"), name = Some(s"Run all main classes")) - ThisBuild / githubWorkflowPublishTargetBranches := Seq() +ThisBuild / githubWorkflowJavaVersions := Seq(JavaSpec.zulu("11")) +ThisBuild / githubWorkflowBuild += WorkflowStep.Sbt( + List("runAll"), + name = Some(s"Run all main classes") +)