Java builds: Gradle wrapper version truncated to major, mise installs milestone previews
zoeyjones
PROOP

19 days ago

Heads-up for anyone deploying Java/Gradle apps on Railway:

Railpack v0.23.0's Java provider reads gradle-wrapper.properties, extracts the full version (e.g. 9.5.0), but then truncates to the major before asking mise to resolve. Mise picks the highest 9.x tag it knows, which today is 9.6.0-M1 (a milestone preview). The wrapper bootstrap on top still fetches your real pinned Gradle, so builds succeed, but every build log shows the milestone in the Packages panel and ~165 MB of unused Gradle is installed in the builder image.

Status of fixes:

  • Upstream jdx/mise-versions and jdx/mise both shipped fixes on 2026-05-01 (mise-versions#144, mise#9500) — milestones are now correctly classified as prereleases at the registry layer.
  • The Railpack-side fix (don't truncate to major) is filed as railpack#554, open since 2026-04-30 with no maintainer response yet.
  • Even just bumping the bundled mise binary in railpack-builder would need a new Railpack release; the latest is still v0.23.0 from 2026-03-30, which bakes mise-2026.3.17 (predates the upstream fix).

Evidence — trimmed Railway build log (2026-05-03):

2026-05-03T11:13:39.915  using build driver railpack-v0.23.0
2026-05-03T11:13:40.930    ╭─────────────────╮
2026-05-03T11:13:40.930    │ Railpack 0.23.0 │
2026-05-03T11:13:40.930    ╰─────────────────╯
2026-05-03T11:13:40.930      ↳ Detected Java
2026-05-03T11:13:40.930      ↳ Using Gradle
2026-05-03T11:13:40.930
2026-05-03T11:13:40.930      Packages
2026-05-03T11:13:40.930      ──────────
2026-05-03T11:13:40.930      gradle  │  9.6.0-M1  │  gradle-wrapper.properties (9)
2026-05-03T11:13:40.930      java    │  25.0.2    │  RAILPACK_JDK_VERSION (25)
2026-05-03T11:13:42.410  docker-image://ghcr.io/railwayapp/railpack-builder:mise-2026.3.17
2026-05-03T11:13:42.410  docker-image://ghcr.io/railwayapp/railpack-runtime:mise-2026.3.17
2026-05-03T11:13:43.026  install mise packages: gradle, java
...
2026-05-03T11:13:47.782  To honour the JVM settings for this build a single-use Daemon process will be forked. For more on this, please refer to https://docs.gradle.org/9.5.0/userguide/gradle_daemon.html
...
2026-05-03T11:14:54.580  For more on this, please refer to https://docs.gradle.org/9.5.0/
...
BUILD SUCCESSFUL in 1m 8s

The smoking gun is the gradle │ 9.6.0-M1 │ gradle-wrapper.properties (9) line — the (9) source annotation shows Railpack truncated 9.5.0 from the wrapper file down to just the major 9 before asking mise to resolve. The docs.gradle.org/9.5.0/... lines later in the log confirm the wrapper bootstrap actually runs Gradle 9.5.0 — so 9.6.0-M1 is installed but never used.

Workaround until Railpack ships a new release — pin the exact version in mise.toml at repo root:

[tools]
gradle = "9.5.0"

Note this puts gradle into /mise/installs for runtime stages too, so if you bulk-copy /mise/installs into your runtime image it'll grow. Scope the runtime copy if that matters.

Tracking issue: https://github.com/railwayapp/railpack/issues/554

0 Replies

Welcome!

Sign in to your Railway account to join the conversation.

Loading...