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

Conversation

@jonathanpeppers
Copy link
Member

@jonathanpeppers jonathanpeppers commented Mar 5, 2021

So far ported these packages to .NET 6:

  • Xamarin.Google.Guava
  • Xamarin.Google.Guava.FailureAccess
  • Xamarin.Google.Guava.ListenableFuture

This requires:

  • Xamarin.Android from VS 16.10
  • .NET 6.0.100-preview.4.21255.9
  • .NET 6 Android workload
  • Xamarin.Legacy.Sdk
  • Updated build.cake to use dotnet build

So far ported these packages to .NET 6:

* Xamarin.Google.Guava
* Xamarin.Google.Guava.FailureAccess
* Xamarin.Google.Guava.ListenableFuture

This requires:

* Xamarin.Android from VS 16.10
* .NET 6.0.100-preview.4.21255.9
* .NET 6 Android workload
* Xamarin.Legacy.Sdk
* Updated `build.cake` to use `dotnet build`
@jonathanpeppers jonathanpeppers changed the title Multi-target for .NET 6 and MonoAndroid90 [Guava] Multi-target for .NET 6 and MonoAndroid90 May 25, 2021
Comment on lines +7 to +8
// Just ensure this compiles
public class Future : Java.Lang.Object, IListenableFuture
Copy link
Member Author

Choose a reason for hiding this comment

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

This sample isn't really that helpful, basically just an "integration test" checking a type exists.

When I look at GuavaSample.dll it has the same .jar files embedded as before:

image

@jonathanpeppers jonathanpeppers marked this pull request as ready for review May 25, 2021 20:48
@jonathanpeppers jonathanpeppers requested review from jpobst and moljac May 25, 2021 20:48
@jpobst
Copy link
Contributor

jpobst commented May 25, 2021

Package looks the same, other than MonoAndroid50 -> MonoAndroid90, which I assume is intended.

image

You will likely want to bump the patch version numbers so they are higher than the ones currently published on NuGet?

@jpobst
Copy link
Contributor

jpobst commented May 25, 2021

Unrelated question, we specify net6.0-android:

<TargetFrameworks>net6.0-android;monoandroid90</TargetFrameworks>

The TF in the NuGet is net6.0-android30.0. Is that expected?

@jonathanpeppers
Copy link
Member Author

I didn't change any of the monoandroid90 values, they seem the same as before?

If you leave the 30 off of net6.0-android, it will use a value from a generated .targets file:

https://github.com/xamarin/xamarin-android/blob/b36df8fbeb15bcc2bcbe239d7ce49f8ec93ad263/build-tools/Xamarin.Android.Tools.BootstrapTasks/Xamarin.Android.Tools.BootstrapTasks/GenerateSupportedPlatforms.cs#L63-L65

Such as:

<TargetPlatformVersion Condition=" '$(TargetPlatformVersion)' == '' ">30.0</TargetPlatformVersion>

We could explicitly put 30 here? It will change to 31 by default at some point.

@jpobst
Copy link
Contributor

jpobst commented May 25, 2021

Maybe feels safer to explicitly use 30? It seems without it we run the risk of updating our XA at some point and accidentally releasing new packages that don't work for existing users.

Copy link
Contributor

@moljac moljac left a comment

Choose a reason for hiding this comment

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

LGTM

@jonathanpeppers jonathanpeppers merged commit f37ecf9 into xamarin:main May 26, 2021
@jonathanpeppers jonathanpeppers deleted the net6 branch May 26, 2021 13:27
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.

3 participants