Skip to content
This repository has been archived by the owner on Nov 6, 2024. It is now read-only.

Move second batch of GPS package-specific templates to AndroidX default template. #906

Merged
merged 1 commit into from
Sep 5, 2024

Conversation

jpobst
Copy link
Contributor

@jpobst jpobst commented Aug 30, 2024

Remove the packages that use the following package-specific templates from this repository as they have moved to AndroidX repository:

  • 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

Companion PR that adds them to AndroidX: dotnet/android-libraries#950

@jpobst jpobst marked this pull request as ready for review September 4, 2024 18:35
@jpobst jpobst requested a review from moljac September 4, 2024 18:35
jpobst added a commit to dotnet/android-libraries that referenced this pull request Sep 5, 2024
…ult template. (#950)

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: xamarin/GooglePlayServicesComponents#906
@jpobst jpobst merged commit d75f2b6 into main Sep 5, 2024
5 checks passed
@jpobst jpobst deleted the gps-phase-2 branch September 5, 2024 18:33
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants