Expose --all-versions flag in SdkManager.ListAsync for full revision enumeration
- Dominant language
- C#
- Stars
- 2.1k
- Forks
- 579
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 257
Description
## Summary
Expose the ability to list all available revisions of each SDK package, not just the latest. This maps to `sdkmanager --list --show_all_versions` (or the equivalent output parsing).
## Background
Google's [`android` CLI](https://developer.android.com/tools/agents/android-cli#sdk-list) provides:
```bash
android sdk list --all-versions # Show every revision of each package
```
Our `SdkManager.ListAsync()` currently returns one entry per package (the latest/installed version). There is no way for consumers to discover that `platforms;android-34` has revisions 1, 2, and 3 available.
## Use Cases
1. **Version selection UI**: The MAUI CLI needs to present all available versions when a user wants to pin a specific revision (see companion issue for version pinning).
2. **Audit & compliance**: Teams auditing their SDK installations need to see what revisions exist.
3. **Downgrade discovery**: Before forcing a downgrade, users need to know which older versions are available.
## Proposed API
```csharp
Task<(List Installed, List Available)> ListAsync(
bool allVersions = false, // NEW: pass --show_all_versions
SdkChannel channel = SdkChannel.Stable,
CancellationToken cancellationToken = default);
```
When `allVersions=true`, parse the extended sdkmanager output that includes revision numbers for each package.
## References
- [Android CLI `sdk list` docs](https://developer.android.com/tools/agents/android-cli#sdk-list) — `--all-versions` flag
- Downstream consumer: `dotnet/maui-labs` CLI (`maui android sdk list --all-versions`)
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.