Xamarin.Android is currently responsible for generating and installing AndroidApiInfo.xml files alongside Mono.Android.dll to help provide a full mapping of Android version information. For reference, these files look like this:
<AndroidApiInfo>
<Id>30</Id>
<Level>30</Level>
<Name>R</Name>
<Version>v11.0</Version>
<Stable>True</Stable>
</AndroidApiInfo>
While these files are great at providing context around the Android versions that a current installation of Xamarin.Android supports, they do not provide a full story with respect to all known Android versions. As a fall back, we have this hardcoded mapping:
https://github.com/xamarin/xamarin-android-tools/blob/f2af06f2a2c1966011b6b04a113560de37041cbc/src/Xamarin.Android.Tools.AndroidSdk/AndroidVersions.cs#L142
However we often forget to update this list, and it is duplicated in:
https://github.com/xamarin/xamarin-android/blob/f361d997807504a69c29163811f362da701410b6/build-tools/xaprepare/xaprepare/ConfigAndData/BuildAndroidPlatforms.cs#L11
I can see a couple of options to improve this:
- Remove the duplication from xamarin-android, and have the xamarin-android build use
Xamarin.Android.Tools.AndroidVersions.KnownVersions.
- Remove the duplication from xamarin-android-tools, and have the XA build generate and install a KnownAndroidApiInfo.xml file which contains a full set of known version information.
Xamarin.Android is currently responsible for generating and installing
AndroidApiInfo.xmlfiles alongsideMono.Android.dllto help provide a full mapping of Android version information. For reference, these files look like this:While these files are great at providing context around the Android versions that a current installation of Xamarin.Android supports, they do not provide a full story with respect to all known Android versions. As a fall back, we have this hardcoded mapping:
https://github.com/xamarin/xamarin-android-tools/blob/f2af06f2a2c1966011b6b04a113560de37041cbc/src/Xamarin.Android.Tools.AndroidSdk/AndroidVersions.cs#L142
However we often forget to update this list, and it is duplicated in:
https://github.com/xamarin/xamarin-android/blob/f361d997807504a69c29163811f362da701410b6/build-tools/xaprepare/xaprepare/ConfigAndData/BuildAndroidPlatforms.cs#L11
I can see a couple of options to improve this:
Xamarin.Android.Tools.AndroidVersions.KnownVersions.