Today, when preparing a publish release, the "Sign Archive" step always fails the first run, as it relies on the output from the "Build Windows" job, but does not specify the dependency, so it runs before the packages have been built.
Specifying the dependency is better, but it makes the "Build Windows" stage take a lot longer and the test stage(s) cannot run until it completes.
This PR moves the signing to its own stage with the proper dependency set, so it will not run until the packages are ready. By moving it to its own stage it can also run in parallel with the test stage(s), reducing the overall CI time.
Note this changes the previous `.jar + .targets` behavior to the updated `dotnet` "`.jar/.aar` next to the `.dll`" method.
As part of this we do lose the `$(XamarinGoogleGuavaOptOut)` opt-out we had previously added.
Given that this was added to help with broken Guava packages published before April 2022, this property should no longer be needed:
https://github.com/xamarin/XamarinComponents/pull/1366
"Pause" migrating everything to a common template, and pivot to moving the remaining packages from the GPS repository to the AndroidX repository. This should enable us to eliminate the circular dependencies between the two repositories which should help fix the majority of the https://github.com/xamarin/AndroidX/issues/764 issues going forward.
Bring in the GPS and Glide templates as new "templateSet", and merge in all the build infrastructure pieces that the GPS repository had to make it build correctly.
Replaced `remove-node` elements with `attr` elements defining `managedName` attributes for methods in `MediaLibraryService.MediaLibrarySession.Builder` and `MediaSession.Builder` classes. Updated parameter names for `setSessionActivity`, `setId`, `setExtras`, and `setBitmapLoader` methods to improve clarity. Retained `remove-node` element for `build` method in `MediaLibraryService.MediaLibrarySession.Builder`.
Move the packages in GPS that use the following package-specific templates to this repository and switch them to using the default template:
- brotli
- chromium-cronet
- codehaus-mojo
- datatransport
- flatbuffers
- grpc
- opencensus
- perfmark
- protobuf-lite
- squareup-okhttp
- squareup-okhttp3
- squareup-picasso
- squareup-retrofit
- squareup-retrofit2
- squareup-okio
- squareup-javapoet
- tensorflow-lite
- user-messaging-platform
- zxing
One wrinkle is that AndroidX does not allow a stable package to depend on a prerelease package:
```xml
<!-- Warnings we want to error on: -->
<!-- NU5104: A stable release of a package should not have a prerelease dependency. -->
<WarningsAsErrors>$(WarningsAsErrors);NU5104</WarningsAsErrors>
```
Although we should always abide by this rule, we are bound by Google's packaging decisions and sometimes we have no choice. The `Xamarin.TensorFlow.Lite.Support.Api` and `Xamarin.TensorFlow.Lite.Task.Vision.PlayServices.Library` packages we are moving from GPS have a prerelease dependency. (GPS repository does not enforce this rule.)
In order to keep this rule globally, but allow packages to opt out of it, add the `allowPrereleaseDependencies` artifact-level field to `config.json`:
```json
{
"groupId": "org.tensorflow",
"artifactId": "tensorflow-lite-task-vision-play-services",
"version": "0.4.4",
"nugetVersion": "0.4.4.6",
"nugetId": "Xamarin.TensorFlow.Lite.Task.Vision.PlayServices.Library",
"allowPrereleaseDependencies": true,
"comments": "Depends on Xamarin.Google.Android.ODML.Image which only has a prerelease version.",
...
}
```
Companion PR that removes these packages from GPS: https://github.com/xamarin/GooglePlayServicesComponents/pull/906
Move the packages in GPS that use the following package-specific templates to this repository and switch them to using the default template:
- annotations
- aopalliance
- dagger
- errorprone
- findbugs
- inject-guice
- jakarta
- javax-inject
- ow2-asm
Companion PR that removes them from GPS: https://github.com/xamarin/GooglePlayServicesComponents/pull/905