Skip to content

Update sbt version and java workflow to newer versions - #24465

Merged
wing328 merged 2 commits into
masterfrom
sbt-java
Jul 26, 2026
Merged

Update sbt version and java workflow to newer versions#24465
wing328 merged 2 commits into
masterfrom
sbt-java

Conversation

@wing328

@wing328 wing328 commented Jul 26, 2026

Copy link
Copy Markdown
Member

PR checklist

  • Read the contribution guidelines.
  • Run the following to build the project and update samples:
    ./mvnw clean package || exit
    ./bin/generate-samples.sh ./bin/configs/*.yaml || exit
    ./bin/utils/export_docs_generators.sh || exit
    
    (For Windows users, please run the script in WSL)
    Commit all changed files.
    This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master.
    These must match the expectations made by your contribution.
    You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example ./bin/generate-samples.sh bin/configs/java*.
    IMPORTANT: Do NOT purge/delete any folders/files (e.g. tests) when regenerating the samples as manually written tests may be removed.
  • If your PR is targeting a particular programming language, @mention the technical committee members, so they are more likely to review the pull request.

Summary by cubic

Update the sbt Java samples CI to run on JDK 17. Also bump Scala to 2.13.6 for okhttp-gson template and all related samples, and normalize the .openapi-generator-ignore in samples/client/petstore/java/okhttp-gson.

Written for commit 44b90d1. Summary will update on new commits.

Review in cubic

@wing328
wing328 marked this pull request as ready for review July 26, 2026 07:32
@wing328 wing328 changed the title Update sbt java workflow Update sbt java workflow to test with JDK17 Jul 26, 2026
@wing328 wing328 added this to the 7.25.0 milestone Jul 26, 2026

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 2 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name=".github/workflows/samples-java-sbt.yaml">

<violation number="1" location=".github/workflows/samples-java-sbt.yaml:25">
P1: This CI workflow sets Java 17, but the sbt sample it builds (`samples/client/petstore/java/okhttp-gson`) configures `scalaVersion := "2.11.12"` in its `build.sbt`. Scala 2.11.12 does **not** support JDK 17 — the minimum Scala versions for JDK 17 are 2.12.15 and 2.13.6, per the official [Scala JDK Compatibility documentation](https://docs.scala-lang.org/overviews/jdk-compatibility/overview.html). The sbt build will likely fail at compile time when the Scala compiler bridge initializes under JDK 17. Update the `scalaVersion` in `samples/client/petstore/java/okhttp-gson/build.sbt` to at least `2.12.15` (or `2.13.6`) alongside this JDK upgrade.</violation>
</file>

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

with:
distribution: 'temurin'
java-version: 11
java-version: 17

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1: This CI workflow sets Java 17, but the sbt sample it builds (samples/client/petstore/java/okhttp-gson) configures scalaVersion := "2.11.12" in its build.sbt. Scala 2.11.12 does not support JDK 17 — the minimum Scala versions for JDK 17 are 2.12.15 and 2.13.6, per the official Scala JDK Compatibility documentation. The sbt build will likely fail at compile time when the Scala compiler bridge initializes under JDK 17. Update the scalaVersion in samples/client/petstore/java/okhttp-gson/build.sbt to at least 2.12.15 (or 2.13.6) alongside this JDK upgrade.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .github/workflows/samples-java-sbt.yaml, line 25:

<comment>This CI workflow sets Java 17, but the sbt sample it builds (`samples/client/petstore/java/okhttp-gson`) configures `scalaVersion := "2.11.12"` in its `build.sbt`. Scala 2.11.12 does **not** support JDK 17 — the minimum Scala versions for JDK 17 are 2.12.15 and 2.13.6, per the official [Scala JDK Compatibility documentation](https://docs.scala-lang.org/overviews/jdk-compatibility/overview.html). The sbt build will likely fail at compile time when the Scala compiler bridge initializes under JDK 17. Update the `scalaVersion` in `samples/client/petstore/java/okhttp-gson/build.sbt` to at least `2.12.15` (or `2.13.6`) alongside this JDK upgrade.</comment>

<file context>
@@ -22,7 +22,7 @@ jobs:
         with:
           distribution: 'temurin'
-          java-version: 11
+          java-version: 17
       - name: Setup sbt launcher
         uses: sbt/setup-sbt@v1
</file context>

@wing328 wing328 changed the title Update sbt java workflow to test with JDK17 Update sbt version and java workflow to newer versions Jul 26, 2026
@wing328
wing328 merged commit b60ce4c into master Jul 26, 2026
53 of 200 checks passed
@wing328
wing328 deleted the sbt-java branch July 26, 2026 07:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant