Skip to content
This repository was archived by the owner on Jan 13, 2025. It is now read-only.

Conversation

@jpobst
Copy link
Contributor

@jpobst jpobst commented Apr 19, 2022

DO NOT MERGE THIS TO main, THIS WILL BE PUBLISHED OUT OF THE BRANCH

Creates a 9999.0.0 version of Xamarin.Google.Guava.ListenableFuture that does not include guava-listenablefuture.jar. This version of the package will be the dependency for Xamarin.Google.Guava. It will be delisted so that it does not show up for people adding an explicit reference to Xamarin.Google.Guava.ListenableFuture.

This mirrors the way Google/Maven have set this up:
https://mvnrepository.com/artifact/com.google.guava/listenablefuture

There are 3 scenarios we need to cover to ensure one (and only one) copy of ListenableFuture.class is included in an application.

  • Project (and dependencies) only references Xamarin.Google.Guava.ListenableFuture
    • Project will reference the listed version in NuGet (currently 1.0.0.7)
    • ListenableFuture.class will be provided by guava-listenablefuture.jar
  • Project (and dependencies) only references Xamarin.Google.Guava
    • Xamarin.Google.Guava will have a dependency on Xamarin.Google.Guava.ListenableFuture 9999.0 which does not include guava-listenablefuture.jar.
    • ListenableFuture.class will be provided by guava.jar
  • Project (and dependencies) references Xamarin.Google.Guava.ListenableFuture and Xamarin.Google.Guava
    • Xamarin.Google.Guava's dependency on Xamarin.Google.Guava.ListenableFuture 9999.0 will ensure this version is used.
    • ListenableFuture.class will be provided by guava.jar

Note 9999.0 package does not include guava-listenablefuture.jar or Xamarin.Google.Guava.ListenableFuture.targets.

image

Note that we do provide managed bindings for Xamarin.Google.Guava.ListenableFuture, however we do not provide any managed bindings for Xamarin.Google.Guava. Thus the 9999.0 must still include the C# binding of ListenableFuture for applications that use it, since Xamarin.Google.Guava will not.

image

@jpobst
Copy link
Contributor Author

jpobst commented Apr 21, 2022

Leaving this as a draft so it doesn't get accidentally committed.

Copy link
Member

@jonathanpeppers jonathanpeppers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, would we probably just keep this on a guava-9999 branch forever?

@jpobst jpobst closed this May 2, 2022
@jpobst
Copy link
Contributor Author

jpobst commented May 2, 2022

@jpobst jpobst deleted the guava-9999 branch June 14, 2022 14:52
jpobst added a commit to dotnet/android-libraries that referenced this pull request Sep 26, 2024
…979)

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:

xamarin/XamarinComponents#1366
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants