Context
PR #12466 adds a one-time compatibility fix for parsing the current sdkmanager --list and Android CLI text formats. Scraping human-readable table output is fragile and should not remain the long-term package-discovery strategy.
Investigation
Evaluate the maintainable approach for .NET 12:
- Java wrapper around the SDK manager libraries — Create a small Java project using the SDK manager artifacts from Maven. Reuse
SdkManagerCliSettings, load the typed RepositoryPackages model, and serialize local, remote, new, and updated packages as JSON. This preserves channels, custom sources, obsolete filtering, proxies, and repository parsing, but depends on internal APIs that may change between command-line-tools releases.
- Android CLI integration — Determine whether the new
android CLI provides, or plans to provide, stable machine-readable package discovery that can replace sdkmanager --list parsing.
- Compare fallback options such as installed-package
package.xml parsing and document why direct remote repository XML parsing or continued CLI table scraping should or should not be used.
Deliverables
- Document the required package-discovery behaviors and compatibility constraints.
- Prototype the viable options and compare reliability, maintenance cost, distribution size, startup cost, and command-line-tools version compatibility.
- Select the .NET 12 implementation direction and file implementation work as needed.
- Define a fallback/error strategy when the selected integration is unavailable or incompatible.
References
Context
PR #12466 adds a one-time compatibility fix for parsing the current
sdkmanager --listand Android CLI text formats. Scraping human-readable table output is fragile and should not remain the long-term package-discovery strategy.Investigation
Evaluate the maintainable approach for .NET 12:
SdkManagerCliSettings, load the typedRepositoryPackagesmodel, and serialize local, remote, new, and updated packages as JSON. This preserves channels, custom sources, obsolete filtering, proxies, and repository parsing, but depends on internal APIs that may change between command-line-tools releases.androidCLI provides, or plans to provide, stable machine-readable package discovery that can replacesdkmanager --listparsing.package.xmlparsing and document why direct remote repository XML parsing or continued CLI table scraping should or should not be used.Deliverables
References
sdkmanager --listformat #12466 (review)sdkmanager --listformat #12466 (comment)sdkmanager --listformat #12466