In order to ensure we are testing the packages built during CI/local build we need to remove the wildcard from `nuget.org`.
With the `nuget.org` wildcard it means that anything that cannot be found locally will be pulled from published packages. We will never know if we are accidentally pulling a published package instead of the intended local one.
With Classic gone, we can clean up our template a little bit by removing settings that only affected Classic. Additionally, we can remove some things that aren't getting used due to incorrect `Condition` statements.
This PR should not change our packages in any way. This is verified by ensuring there are no changes to the `api-diff` or `nuget-diff` files.
---
The `<AndroidJavaSource>` include was already a no-op because `Exists` does not expand wildcards, so the `Condition` was always `false`:
```xml
Condition="Exists('..\..\source\@(Model.MavenGroupId)\@(Model.Name)\java\*.java')"
```
Removing just the `Condition` caused `javac` errors because it was now including `.java` files that were not being included previously.
---
Most everything else was also a no-op because the `Exists` and the `Include` pointed to different locations. (`..\..\external` vs `..\..\..\external`)
```xml
<JavaSourceJar
Include="..\..\externals\@(art.MavenGroupId)\@(art.MavenArtifactId)-sources.jar"
Condition="Exists('..\..\..\externals\@(art.MavenGroupId)\@(art.MavenArtifactId)-sources.jar')" />
```
With support for Classic Xamarin.Android [ended May 1st, 2024](https://dotnet.microsoft.com/en-us/platform/support/policy/xamarin), we can start removing all the hacks needed to support both Classic and .NET for Android.
- No longer build EOL frameworks: `MonoAndroid12.0;net6.0-android;`
- No longer need to install classic XA
- No longer need to have classic XA or XF sample builds
- No longer need to use `Xamarin.Legacy.Sdk`
For this PR, we'll only build `net7.0-android`. A future PR should enable `net8.0-android`.
The best news: with this our CI build time drops from ~80 minutes to ~35 minutes. 🎉
We have missed several new versions of `com.google.guava.guava` because they name their release packages like `33.1.0-android`. Traditionally, adding any sort of label after a hyphen indicates that the package is a pre-release version so we ignore it. Thus we have been ignoring their new versions.
Fix our update script to allow a pre-release tag of `-android` to count as a stable release version so we will process `guava` updates.
Additionally, go ahead and bump `guava` to the latest version available. Note we remove the `-android` from the NuGet version, as it is not a pre-release package.
Update the version of `generator` used to build the `net7.0-android` version of our packages.
This should contain https://github.com/xamarin/java.interop/pull/1202, which is needed for binding AndroidX Media3.
Fixes https://github.com/xamarin/AndroidX/issues/873
The method `CustomTabsActivityManager.From (Activity parentActivity, string? servicePackageName = null)` caches the passed in `parentActivity` forever, which can cause a memory leak.
Additionally, only the first `parentActivity` passed in supported. Subsequent `parentActivity` arguments are ignored and the first one is always reused.
Mark this helper method as `[Obsolete]` and recommend consumers implement any desired caching themselves in a way that respects the parent activity(ies) and their lifetimes properly for the relevant application.