Repository navigation
ci: pin JDK 17 in the publish job - #119
Merged
Merged
Conversation
joker23
approved these changes
Nov 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The 6.0.0 release failed at the Sonatype publish step (failed run):
The
build-and-publishjob never sets up a JDK, so./gradlewruns on the runner image's default Java. Theubuntu-latestimage default recently moved to Java 25 (class file major 69), which Gradle 7.6.3 cannot run on (it supports JVM ≤ 19). The CI matrix legs in this same workflow are unaffected because the shared CI action pins temurin 8/11/17 — the publish job was the only Gradle invocation relying on the image default. The 6.0.0 tag and GitHub release were created, but the artifact never reached Maven Central, and the javadoc publish was skipped.What
Adds
actions/setup-java(temurin 17) tobuild-and-publish, covering both the Sonatype publish and the./gradlew javadocstep in the same job. This matches how the publish paths in java-core and android-client-sdk get their JDK (the shared CI composite withactions/setup-java@v4+ temurin; android publishes with 17). Java 17 is the highest LTS in this repo's CI matrix and is what prior releases effectively built with, back when the image default was 17.The commit is
ci:typed so release-please does not propose a 6.0.1 — 6.0.0 itself still needs to go out.Recovery after merge
Manually dispatch Publish Package on
mainwithrun_tests=true,dry_run=false,prerelease=false.gradle.propertiesonmainalready reads 6.0.0, so that publishes the existing release. (Re-running the failed release run would not pick up this fix — re-runs pin workflow files to the original commit.)A Gradle upgrade was considered and deferred: running on Java 25 requires Gradle 9.1.0, which exceeds the max Gradle supported by the Kotlin plugin this build relies on for the
okhttp-jvmPOM mapping — and the publish toolchain should stay pinned regardless of Gradle version.Note
Overview
Fixes failed Maven Central publishes when
build-and-publishruns Gradle onubuntu-latest’s default JDK (Java 25), which Gradle 7.6.3 cannot use.The workflow now runs
actions/setup-javawith Temurin 17 right after checkout in that job, so Sonatype publish and./gradlew javadocuse a supported JVM—aligned with the repo’s CI matrix and other LaunchDarkly Java publish flows that already pin a JDK.Reviewed by Cursor Bugbot for commit 8545022. Bugbot is set up for automated code reviews on this repo. Configure here.