We want to use an updated version of generator that has @RestrictTo support. This will allow consumers to be warned if they attempt to use API that Google has marked as internal using a @RestrictTo annotation.
Begin building net7.0-android with an updated version of generator. This is accomplished by downloading the generator that ships in the .NET Android 8.0 RTM NuGet package. (Microsoft.Android.Sdk.Windows34.0.43) Note it is okay to use the "Windows" package on all platforms because we only use managed cross-platform binaries from the package. We then set $(_BindingsToolsLocation) to point to this package.
There are some transforms and additions changes that only affect this newer version of generator, so we also need a way to apply different transform files based on the framework that is building. The can now be done by naming the transform files with the target framework, ex: Metadata.MonoAndroid12.0.xml or Metadata.net6.0-android.xml.
Xamarin.Kotlin.StdLib needed new additions/transforms that only apply to net7.0-android.
tink-android had transforms that should not be run on net7.0-android, so they were moved to MonoAndroid12.0 and net6.0-android specific transform files.
api-diff reports that the changes we are looking for are present:
## Xamarin.AndroidX.Activity.dll
### Namespace AndroidX.Activity
#### Type Changed: AndroidX.Activity.FullyDrawnReporter
Obsoleted methods:
```diff
[Obsolete ("While this member is 'public', Google considers it internal API and reserves the right to modify or delete it in the future. Use at your own risk.")]
public void FullyDrawnReported ();
```
We want to use an updated version of
generator
that has@RestrictTo
support. This will allow consumers to be warned if they attempt to use API that Google has marked asinternal
using a@RestrictTo
annotation.Begin building
net7.0-android
with an updated version ofgenerator
. This is accomplished by downloading thegenerator
that ships in the .NET Android 8.0 RTM NuGet package. (Microsoft.Android.Sdk.Windows
34.0.43
) Note it is okay to use the "Windows" package on all platforms because we only use managed cross-platform binaries from the package. We then set$(_BindingsToolsLocation)
to point to this package.There are some transforms and additions changes that only affect this newer version of
generator
, so we also need a way to apply different transform files based on the framework that is building. The can now be done by naming the transform files with the target framework, ex:Metadata.MonoAndroid12.0.xml
orMetadata.net6.0-android.xml
.Xamarin.Kotlin.StdLib
needed new additions/transforms that only apply tonet7.0-android
.tink-android
had transforms that should not be run onnet7.0-android
, so they were moved toMonoAndroid12.0
andnet6.0-android
specific transform files.api-diff
reports that the changes we are looking for are present: