xamarin / AndroidX

AndroidX bindings for .NET for Android
MIT License
173 stars 42 forks source link

Begin building `net7.0-android` TF. #809

Closed jpobst closed 7 months ago

jpobst commented 8 months ago

Today, we only build these packages with net6.0-android. One consequence of how .NET Android is distributed is that no matter which .NET SDK we use (like .NET 7), net6.0-android projects download and are built with the .NET 6 Android SDK. This means we are using an old generator that does not have improvements we made in the .NET 7 or .NET 8 timeframe.

One particular generator improvement we want in this repo is @RestrictTo support, which will help users avoid API that Google considers "internal" and thus may change without warning.

We updated the .NET Android 7 targets files to allow a custom generator to be specified using an MSBuild property. However this only works with net7.0-android. (We could not backport it to .NET Android 6 because it is EOL and we are no longer shipping updates for it.)

In preparation for using an updated generator, let's begin building net7.0-android now. This will allow us to have api-diff against a net7.0-android baseline when we update generator.

Unfortunately, this does increase build times temporarily until we are able to stop supporting Classic XA next year and are able to remove the MonoAndroid12.0 and net6.0-android frameworks.