Skip to content

Download jdk-mobile's runtimes, latest by default - #2

Merged
kdroidFilter merged 1 commit into
mainfrom
feat/jdk-mobile-download
Oct 17, 2026
Merged

kdroidFilter merged 1 commit into
mainfrom
feat/jdk-mobile-download

Conversation

@kdroidFilter

Copy link
Copy Markdown
Contributor

Summary

The plugin now gets jdk-mobile's runtimes itself. Until now, every project had to stage them by hand (scripts/stage-jdk-mobile.sh, or its own download tasks) and add the task dependencies, otherwise the iOS link failed.

  • nucleusJvm.jdkMobileRelease: latest by default, or a tag (jdk-mobile-27b35.3) to pin a release.
    • latest is resolved through the redirect of github.com/<repo>/releases/latest, so no API call and no rate limit, which matters in CI.
    • The resolution is kept for a day. Offline, the last one resolved is used.
  • nucleusJvm.jdkMobileRepository: NucleusFramework/openjdk-mobile by default.
  • Only what the module needs is downloaded: the Android ABIs it ships (androidAbis) and its iOS targets. Each one is a task, njaJdkMobile<Target>.
  • Checked and cached: the archives are checked against the .sha256 published with the release and kept in Gradle's cache (~/.gradle/caches/nja/jdk-mobile). After a clean, they are re-extracted, not re-downloaded.
  • Wired by the plugin: they are extracted into build/nja/jdkMobile, and the tasks that read them depend on them: njaAndroidRuntime, njaAndroidLink, njaIosBundle* and the iOS links.
  • Runtimes of one's own: setting jdkMobile still uses them as they are, and nothing is downloaded.
  • Examples: they use the default.

Verification

Note

With latest, a new jdk-mobile release reaches the next build without any change to the project. The README says so: pin jdkMobileRelease for builds that must not move.

The plugin downloads the runtimes a module needs (its Android ABIs, its iOS targets) from jdk-mobile's
releases (nucleusJvm.jdkMobileRelease: latest by default, or a tag; jdkMobileRepository), checks them against
the .sha256 published with them, keeps them in Gradle's cache and extracts them into build/nja/jdkMobile, the
tasks reading them depending on it. latest is resolved through the release page's redirect (no API rate
limit), once a day, and offline the last one resolved. Setting jdkMobile still uses runtimes of one's own as
they are. The examples use the default.

Signed-off-by: Elie Gambache <elyahou.hadass@gmail.com>
@kdroidFilter
kdroidFilter marked this pull request as ready for review October 17, 2026 17:50
@kdroidFilter
kdroidFilter merged commit c808948 into main Oct 17, 2026
@kdroidFilter
kdroidFilter deleted the feat/jdk-mobile-download branch October 17, 2026 21:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant