Skip to content

Add JDK installation support (move from android-platform-support) #270

@rmarinho

Description

@rmarinho

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions