-
Notifications
You must be signed in to change notification settings - Fork 31
Open
Labels
Description
Summary
Add SDK license acceptance support to Xamarin.Android.Tools.AndroidSdk for unattended/CI scenarios across all .NET Android tooling.
Background
The android-platform-support (internal) repository has AndroidLicensesStorage with battle-tested license acceptance that:
- Orchestrates
sdkmanager --licensesas a subprocess - Handles interactive Y/N prompts and sends acceptance answers
- Writes license hashes to
\/licenses/directory - Supports both Google and VS license formats
- Handles platform differences (
sdkmanager.baton Windows vssdkmanageron macOS/Linux) - Validates that Android SDK, Java SDK, and cmdline-tools paths exist before proceeding
This capability should be moved to the public Xamarin.Android.Tools.AndroidSdk package.
Proposed API Surface
LicenseManager.AcceptAllAsync(sdkPath)— accept all pending SDK licenses viasdkmanager --licensesLicenseManager.IsAccepted(sdkPath, licenseId)— check if a specific license is acceptedLicenseManager.GetPendingAsync(sdkPath)— list licenses that need acceptance
Consumer
- MAUI DevTools CLI (
maui android sdk accept-licenses,maui android install --accept-licenses) — see MAUI DevTools Spec PR - CI/CD pipelines — unattended builds that need to accept licenses without user interaction
Related
- MAUI DevTools spec §6.8: Shared Libraries & Code Reuse
Reactions are currently unavailable