Repository navigation
Download jdk-mobile's runtimes, latest by default - #2
Merged
Merged
Conversation
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>
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.
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:latestby default, or a tag (jdk-mobile-27b35.3) to pin a release.latestis resolved through the redirect ofgithub.com/<repo>/releases/latest, so no API call and no rate limit, which matters in CI.nucleusJvm.jdkMobileRepository:NucleusFramework/openjdk-mobileby default.androidAbis) and its iOS targets. Each one is a task,njaJdkMobile<Target>..sha256published with the release and kept in Gradle's cache (~/.gradle/caches/nja/jdk-mobile). After aclean, they are re-extracted, not re-downloaded.build/nja/jdkMobile, and the tasks that read them depend on them:njaAndroidRuntime,njaAndroidLink,njaIosBundle*and the iOS links.jdkMobilestill uses them as they are, and nothing is downloaded.Verification
examples/calculator: the 2,008 tests pass on iOS (simulator) and Android (Android 11 emulator), withlatestresolved tojdk-mobile-27b35.3. Only the runtimes needed were downloaded.clean, a second build does nothing; after aclean, the runtime is re-extracted from the cache.0.3.0.Note
With
latest, a new jdk-mobile release reaches the next build without any change to the project. The README says so: pinjdkMobileReleasefor builds that must not move.