Summary
Add JDK installation support to Xamarin.Android.Tools.AndroidSdk so that consumers (MAUI DevTools CLI, IDE extensions, build tasks) can auto-install missing JDKs instead of just reporting errors.
Background
The android-platform-support (internal) repository already has a working JavaDependencyInstaller implementation that:
- Discovers available JDK versions from the Xamarin Android Manifest Feed
- Downloads Microsoft OpenJDK archives (per-platform/architecture)
- Verifies downloads via SHA-1 checksums from the manifest
- Extracts and validates the JDK installation
This capability should be moved to the public Xamarin.Android.Tools.AndroidSdk package.
Proposed API Surface
JdkInstaller.DiscoverAsync() — find available JDK versions from the manifest feed
JdkInstaller.InstallAsync(version, targetPath) — download, verify checksum, extract JDK
JdkInstaller.IsValid(jdkPath) — validate an existing JDK installation
Manifest Feed
JDK archives are listed in the Xamarin Android Manifest Feed (https://aka.ms/AndroidManifestFeed/d{version}), which includes:
- Per-platform URLs (Windows, macOS, Linux)
- Per-architecture variants (x64, aarch64)
- SHA-1 checksums for download verification
Consumer
Related
- MAUI DevTools spec §6.8: Shared Libraries & Code Reuse
Summary
Add JDK installation support to
Xamarin.Android.Tools.AndroidSdkso that consumers (MAUI DevTools CLI, IDE extensions, build tasks) can auto-install missing JDKs instead of just reporting errors.Background
The
android-platform-support(internal) repository already has a workingJavaDependencyInstallerimplementation that:This capability should be moved to the public
Xamarin.Android.Tools.AndroidSdkpackage.Proposed API Surface
JdkInstaller.DiscoverAsync()— find available JDK versions from the manifest feedJdkInstaller.InstallAsync(version, targetPath)— download, verify checksum, extract JDKJdkInstaller.IsValid(jdkPath)— validate an existing JDK installationManifest Feed
JDK archives are listed in the Xamarin Android Manifest Feed (
https://aka.ms/AndroidManifestFeed/d{version}), which includes:Consumer
maui android install,maui android jdk install) — see MAUI DevTools Spec PRRelated