Skip to content

Consolidate mappings for all known Android versions, code names, and API levels  #140

@pjcollins

Description

@pjcollins

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:

  1. Remove the duplication from xamarin-android, and have the xamarin-android build use Xamarin.Android.Tools.AndroidVersions.KnownVersions.
  2. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions