Skip to content

馃敡 build(deps): provision JDKs with mise, lock and auto-update - #264

Merged
gaborbernat merged 1 commit into
tox-dev:mainfrom
gaborbernat:build/mise-provision-jdk
Oct 7, 2026
Merged

gaborbernat merged 1 commit into
tox-dev:mainfrom
gaborbernat:build/mise-provision-jdk

Conversation

@gaborbernat

Copy link
Copy Markdown
Member

Java setup was duplicated across every CI job, five steps in check.yaml and two in release.yaml, each repeating the same distribution and version. Locally it was undocumented: CONTRIBUTING.md said "you'll need JDK 21" with no mention of the JDK 17 that the Kotlin jvmToolchain also needs, which Gradle could only satisfy by auto-downloading or by whatever happened to already be on the machine.

mise.toml pins zulu-21 (runs Gradle) and zulu-17 (the toolchain target) for both contexts, and mise.lock records the resolved version and checksum per platform, so a local macOS checkout and the Linux CI runner install byte-identical JDKs. Gradle doesn't auto-detect mise-managed installations, so gradle.properties points it at a JDK17 environment variable that mise.toml's own [env] block exports, resolved through the zulu-17 alias symlink mise maintains so it keeps working across lockfile bumps without another gradle.properties edit. I verified this end to end in a shell carrying only mise's exports, no ambient JAVA_HOME or PATH.

Both workflows swap actions/setup-java for jdx/mise-action, which installs from the lockfile and exports the same JDK17 variable. Caching is off in release.yaml, since that workflow runs on a release-publish event and zizmor flags cache writes there as a poisoning risk.

A new weekly workflow runs mise lock --bump and opens a PR when the resolution changes, the update pattern mise's own docs describe for this. Dependabot has no mise/asdf ecosystem to do it instead.

Java setup was duplicated across every CI job (distribution/version
pairs in five check.yaml steps and two release.yaml steps) and
undocumented locally - CONTRIBUTING.md said "you'll need JDK 21" with
no mention of the JDK 17 the Kotlin jvmToolchain also needs, which
Gradle could only find by auto-downloading or by luck of what's
already on the machine.

mise.toml pins zulu-21 (runs Gradle) and zulu-17 (jvmToolchain target)
for both contexts, and mise.lock records resolved versions and
checksums per platform so a local macOS dev and the Linux CI runner
install byte-identical JDKs. Gradle doesn't auto-detect mise-managed
installations, so gradle.properties points it at the JDK17 env var
mise exports via mise.toml's own env block, resolved through the
"zulu-17" alias symlink mise maintains so it keeps working across
lockfile bumps without touching gradle.properties again. Verified
end to end with a clean environment carrying only mise's exports.

Both CI workflows swap actions/setup-java for jdx/mise-action, which
installs from the lockfile and exports the same JDK17 variable.
Caching is off in release.yaml, since that workflow runs on a
release-publish event and zizmor flags cache writes there as a
poisoning risk.

A new weekly workflow runs `mise lock --bump` and opens a PR when the
resolution changes, the pattern mise's own docs describe for this.
Dependabot has no mise/asdf ecosystem to do this instead.
@gaborbernat gaborbernat added the enhancement New feature or request label Oct 7, 2026
@gaborbernat
gaborbernat merged commit e5741c3 into tox-dev:main Oct 7, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant