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

Manual updates 20220215 split dependencies #605

Merged
merged 31 commits into from
May 11, 2022
Merged

Conversation

moljac
Copy link
Member

@moljac moljac commented Apr 21, 2022

Does this change any of the generated binding API's?

Yes. Updates, new dependencies, etc

Describe your contribution

PR split

#575

@moljac
Copy link
Member Author

moljac commented Apr 22, 2022

Blocked

./generated/com.google.firebase.firebase-measurement-connector-impl/com.google.firebase.firebase-measurement-connector-impl.csproj : error NU1605: Detected package downgrade: Xamarin.GooglePlayServices.Measurement.Base from 119.0.1.5 to 116.3.0. Reference the package directly from the project to select a different version.  [./generated/GooglePlayServices.sln]
./generated/com.google.firebase.firebase-measurement-connector-impl/com.google.firebase.firebase-measurement-connector-impl.csproj : error NU1605:  Xamarin.Firebase.Measurement.Connector.Impl -> Xamarin.GooglePlayServices.Measurement.Api 119.0.1.5 -> Xamarin.GooglePlayServices.Measurement.Base (>= 119.0.1.5)  [./generated/GooglePlayServices.sln]
./generated/com.google.firebase.firebase-measurement-connector-impl/com.google.firebase.firebase-measurement-connector-impl.csproj : error NU1605:  Xamarin.Firebase.Measurement.Connector.Impl -> Xamarin.GooglePlayServices.Measurement.Base (>= 116.3.0) [./generated/GooglePlayServices.sln]

@moljac
Copy link
Member Author

moljac commented Apr 23, 2022

More fun:

Blocked by dependencies having new FB dependencies:

updating dependencies only:

Dependency errors : 1
1
	System.Exception: 
No matching artifact config found for: 
			com.google.firebase.firebase-encoders-proto:16.0.0
to satisfy dependency of: 
			com.google.android.datatransport.transport-runtime:3.1.3

	Please add following json snippet to config.json:


      {
        "groupId": "com.google.firebase",
        "artifactId": "firebase-encoders-proto",
        "version": "16.0.0",
        "nugetVersion": "CHECK PREFIX 16.0.0",
        "nugetId": "CHECK NUGET ID",
        "dependencyOnly": true/false
      }						

Unable to update all dependencies, so it boils down almost to do config.json update per artifact or groupId.

Copy link
Contributor

@jpobst jpobst left a comment

Choose a reason for hiding this comment

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

firebase-measurement-connector-impl seems to be the root of a lot of our problems.

Version 16.3.0 Xamarin.GooglePlayServices.Measurement.Api was skipped during transition to AndroidX support. Most likely human (my) error.

Yes,Xamarin.GooglePlayServices.Measurement.Api is used by Xamarin.Firebase.Measurement.Connector.Impl, but also by Xamarin.Firebase.Analytics and Xamarin.GooglePlayServices.TagManager.Api.

https://www.nuget.org/packages/Xamarin.GooglePlayServices.Measurement.Api/

More and more packages (even 3rd party) depend on Firebase Analytics.

Removing firebase-measurement-connector-impl is partial solution. The problem is in missing version.

It looks like it was originally intended to be kept in sync with firebase-measurement-connector. However connector has been continually updated, while connector-impl has not been updated for 3 years.

True. I was digging into that problem for last at least 2 months.

Nothing appears to depend on it.

You rely on our tolling (binderator) which might not be perfect, so that that statement would be tautology.

I found this:

https://mvnrepository.com/artifact/com.google.firebase/firebase-measurement-connector-impl/usages

Probably calculated transitive dependencies based on pom.xml files. From top of my head chain firebase-core uses firebase-analytics which uses firebase-measurement-connector-impl, but I am not 100% sure.

To get us back on track, let's ignore connector-impl for now.

I made it dependencyOnly: true. I am afraid it will be forgotten/skipped in the future.

We can either remove it from the config.json, or convert it to a dependencyOnly: true. That should allow binderator to bind everything else successfully.

I already removed (didn't bump) datartansport, because new versions depend on new firebase-encoders-proto, so we'll need several iterations to publish everything needed.

Before proceeding I need to solve Square.Okio and other issues.

@@ -25,87 +25,6 @@
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Bunch of merge conflicts and errors in this file.

Copy link
Member Author

Choose a reason for hiding this comment

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

I see no merge conflicts. Original PR has tons of unneeded dependencyOnly = "true" removed and template sets reordered/cleaned-up. I even added comments in config.json to make it more readable.

@@ -272,13 +272,16 @@
}
@if (@Model.NuGetPackageId == "Xamarin.Firebase.Firestore")
{
<PackageReference Include="Xamarin.Google.Guava" Version="29.0.0" />
<PackageReference Include="Xamarin.Google.Guava" Version="31.1.0" />
Copy link
Contributor

Choose a reason for hiding this comment

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

Changes to this file are not for this group of dependencies, so let's revert it.

Copy link
Member Author

Choose a reason for hiding this comment

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

as you wish. Reverted.

./generated/com.google.firebase.firebase-firestore/com.google.firebase.firebase-firestore.csproj : error NU1605: Detected package downgrade: Xamarin.Google.Guava from 31.1.0 to 29.0.0. Reference the package directly from the project to select a different version.  [./generated/GooglePlayServices.sln]
./generated/com.google.firebase.firebase-firestore/com.google.firebase.firebase-firestore.csproj : error NU1605:  Xamarin.Firebase.Firestore -> Xamarin.Grpc.Protobuf.Lite -> Xamarin.Google.Guava (>= 31.1.0)  [./generated/GooglePlayServices.sln]
./generated/com.google.firebase.firebase-firestore/com.google.firebase.firebase-firestore.csproj : error NU1605:  Xamarin.Firebase.Firestore -> Xamarin.Google.Guava (>= 29.0.0) [./generated/GooglePlayServices.sln]
./generated/com.google.firebase.firebase-firestore/com.google.firebase.firebase-firestore.csproj : error NU1605: Detected package downgrade: Xamarin.Google.Guava from 31.1.0 to 29.0.0. Reference the package directly from the project to select a different version.  [./generated/GooglePlayServices.sln]
./generated/com.google.firebase.firebase-firestore/com.google.firebase.firebase-firestore.csproj : error NU1605:  Xamarin.Firebase.Firestore -> Xamarin.Grpc.Stub -> Xamarin.Grpc.Api -> Xamarin.Google.Guava (>= 31.1.0)  [./generated/GooglePlayServices.sln]
./generated/com.google.firebase.firebase-firestore/com.google.firebase.firebase-firestore.csproj : error NU1605:  Xamarin.Firebase.Firestore -> Xamarin.Google.Guava (>= 29.0.0) [./generated/GooglePlayServices.sln]
./generated/com.google.firebase.firebase-firestore/com.google.firebase.firebase-firestore.csproj : error NU1605: Detected package downgrade: Xamarin.Google.Guava from 31.1.0 to 29.0.0. Reference the package directly from the project to select a different version.  [./generated/GooglePlayServices.sln]
./generated/com.google.firebase.firebase-firestore/com.google.firebase.firebase-firestore.csproj : error NU1605:  Xamarin.Firebase.Firestore -> Xamarin.Grpc.Android -> Xamarin.Grpc.Core -> Xamarin.Grpc.Api -> Xamarin.Google.Guava (>= 31.1.0)  [./generated/GooglePlayServices.sln]
./generated/com.google.firebase.firebase-firestore/com.google.firebase.firebase-firestore.csproj : error NU1605:  Xamarin.Firebase.Firestore -> Xamarin.Google.Guava (>= 29.0.0) [./generated/GooglePlayServices.sln]
./generated/com.google.firebase.firebase-firestore/com.google.firebase.firebase-firestore.csproj : error NU1605: Detected package downgrade: Xamarin.Google.Guava from 31.1.0 to 29.0.0. Reference the package directly from the project to select a different version.  [./generated/GooglePlayServices.sln]
./generated/com.google.firebase.firebase-firestore/com.google.firebase.firebase-firestore.csproj : error NU1605:  Xamarin.Firebase.Firestore -> Xamarin.Grpc.OkHttp -> Xamarin.Grpc.Core -> Xamarin.Grpc.Api -> Xamarin.Google.Guava (>= 31.1.0)  [./generated/GooglePlayServices.sln]
./generated/com.google.firebase.firebase-firestore/com.google.firebase.firebase-firestore.csproj : error NU1605:  Xamarin.Firebase.Firestore -> Xamarin.Google.Guava (>= 29.0.0) [./generated/GooglePlayServices.sln]

Copy link
Member Author

Choose a reason for hiding this comment

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

I really would not touch that if that was not necessary

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok, we can leave it then. I wonder if it's necessary in the first place.

It looks like com.google.firebase.firebase-firestore 11.4.2 (released 9/20/2019) had a dependency on Guava:

    <dependency>
      <groupId>com.google.guava</groupId>
      <artifactId>guava</artifactId>
      <version>20.0</version>
      <scope>compile</scope>
      <type>jar</type>
    </dependency>

However no newer version lists a dependency on Guava.

@moljac
Copy link
Member Author

moljac commented Apr 26, 2022

@jpobst

class-parse does not generate anything for Square.Okio:

https://mvnrepository.com/artifact/com.squareup.okio/okio/3.0.0

Tried decompiling, but output is gibberish and I am not sure why.

@jonpryor
Copy link
Member

@moljac wrote:

class-parse does not generate anything for Square.Okio:

That's because there are no .class files in it:

% jar tf okio-3.0.0.jar | grep class$
# no output

What is in it? A bunch of .kotlin_metadata and .kotlin_modul files.

There's nothing to bind here.

@moljac
Copy link
Member Author

moljac commented Apr 28, 2022

What is in it? A bunch of .kotlin_metadata and .kotlin_modul files.

yup.

There's nothing to bind here.

So, C# managed code will not be surfaced, but can bindings BuildAction remain the same? I guess so.

there are build errors, because code in Additions.cs is looking for generated code.

@moljac moljac requested a review from jonpryor April 29, 2022 06:11
@@ -25,87 +25,6 @@
}
],
"artifacts": [
{
"groupId": "com.github.bumptech.glide",
Copy link
Member

Choose a reason for hiding this comment

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

What's with this change? It looks like this was (nominally?) sorted by (groupId, artifactId), but this entire section for com.github.bumptech.glide was moved to after com.google.mlkit. Is this data sorted in any way?

Copy link
Member

Choose a reason for hiding this comment

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

This change results in "noise" which obscures the diff, e.g. this block:

      {
        "groupId": "com.github.bumptech.glide",
        "artifactId": "disklrucache",
        "version": "4.12.0",
        "nugetVersion": "4.12.0.8",
        "nugetId": "Xamarin.Android.Glide.DiskLruCache",
        "dependencyOnly": false,
        "templateSet": "glide"
      },

is identical, along with many (all?) of the surrounding JSON objects -- but it's not easy to see that this is identical.

Copy link
Member Author

Choose a reason for hiding this comment

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

no. It is not sorted

I did sort it in large PR and must sort it, because it is a huge. It even needs cleanup (duplicate and unneeded dependencyOnly= "true"with old versions).
I need to do it in separate PR after all versions are up-to-date.

I even started adding comments in json, but never finished it.

Copy link
Contributor

Choose a reason for hiding this comment

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

The file should be sorted by dependencyOnly, groupId, artifactId. The weekly update script will reset it to this sort every week. So if we manually move things around it'll cause diffs later:

https://github.com/xamarin/GooglePlayServicesComponents/blob/main/build/scripts/update-config.csx#L36-L38

Additionally, I don't know if the script will preserve the comments, since comments are not part of the JSON standard.

Copy link
Member Author

Choose a reason for hiding this comment

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

Additionally, I don't know if the script will preserve the comments, since comments are not part of the JSON standard.

I didn't test update script, but binderator and other tools (serialization - Newtonsoft and System.Json) didn't have issues with comments and I was tweaking versions a lot.

Copy link
Member Author

Choose a reason for hiding this comment

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

Sorting is nice, but overkill in this case, because 90%+ of the work with config.json is manual (adding new packages, tweaking versions, cleanup of duplicate entries or old/stale packages).

@@ -1,14 +1,5 @@
<Project>
<ItemGroup>
<PackageReference Update="Xamarin.Android.Glide.Annotations" Version="4.12.0.8" />
<PackageReference Update="Xamarin.Android.Glide.DiskLruCache" Version="4.12.0.8" />
Copy link
Member

Choose a reason for hiding this comment

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

Similar question: should @(PackageReference) be sorted, to reduce noise? Here, we have Xamarin.Android.Glide.DiskLruCache (1) moving, resulting in "diff noise"; (2) after Xamarin.Google.MLKit.Vision.Internal.Vkp (?).

Copy link
Member Author

Choose a reason for hiding this comment

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

Directory.Build.targets in samples folder is regenerated based on config.json, so that the latest not-published packages are used for testing with samples. This file could have been ignored too.
I think this noise is caused by manually resolving merge conflicts because of differences in PRs

It can generate primitive types, reference types and their variants (such as classes, interfaces,
enumerated types, anonymous inner classes), fields, methods, parameters, annotations, and Javadocs.
</PackageDescription>
<PackageLicenseFile>LICENSE.md</PackageLicenseFile>
Copy link
Member

Choose a reason for hiding this comment

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

As per all of the "wonderful" work with Component Governance, @(PackageLicenseFile) is "bad", and this should instead use $(PackageLicenseExpression):

<PackageLicenseExpression>MIT</PackageLicenseExpression>

See also: mono/opentk@daa9b2d

Copy link
Member Author

Choose a reason for hiding this comment

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

fixed. Dual license added

ZXing ("zebra crossing") is an open-source, multi-format 1D/2D barcode image processing library.
Core barcode encoding/decoding library.
</PackageDescription>
<PackageLicenseFile>LICENSE.md</PackageLicenseFile>
Copy link
Member

Choose a reason for hiding this comment

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

<PackageLicenseExpression>MIT</PackageLicenseExpression>

Copy link
Member Author

Choose a reason for hiding this comment

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

fixed

<Authors>Microsoft</Authors>
<Owners>Microsoft</Owners>
<Copyright>© Microsoft Corporation. All rights reserved.</Copyright>
<PackageLicenseUrl>https://go.microsoft.com/fwlink/?linkid=865435</PackageLicenseUrl>
Copy link
Member

Choose a reason for hiding this comment

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

$(PackageLicenseUrl) is deprecated: https://docs.microsoft.com/en-us/nuget/reference/msbuild-targets#packing-a-license-expression-or-a-license-file

Use $(PackageLicenseExpression) instead:

<PackageLicenseExpression>MIT</PackageLicenseExpression>

Copy link
Member Author

Choose a reason for hiding this comment

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

fixed all package metadata in all templates

<Copyright>© Microsoft Corporation. All rights reserved.</Copyright>
<PackageLicenseUrl>https://go.microsoft.com/fwlink/?linkid=865435</PackageLicenseUrl>
<PackageProjectUrl>https://go.microsoft.com/fwlink/?linkid=865435</PackageProjectUrl>
<PackageLicenseUrl>https://go.microsoft.com/fwlink/?linkid=865373</PackageLicenseUrl>
Copy link
Member

Choose a reason for hiding this comment

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

Duplicate $(PackageLicenseUrl).

Copy link
Member Author

Choose a reason for hiding this comment

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

fixed too

@moljac moljac requested a review from jonpryor April 29, 2022 15:30
@moljac
Copy link
Member Author

moljac commented May 2, 2022

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@moljac moljac requested a review from jpobst May 3, 2022 10:59
Copy link
Contributor

@jpobst jpobst left a comment

Choose a reason for hiding this comment

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

Here's a version of the changes to config.json that does not include the manual re-sorting. This makes it possible to see what is actually changing in this PR:

--- C:/Users/jopobst/AppData/Local/Temp/fS49sw_config.json	Tue May  3 09:24:13 2022
+++ C:/g/config.json	Tue May  3 09:24:01 2022
@@ -619,6 +619,14 @@
         "dependencyOnly": false
       },
       {
+        "groupId": "com.google.android.odml",
+        "artifactId": "image",
+        "version": "1.0.0-beta1",
+        "nugetVersion": "1.0.0.0-beta1",
+        "nugetId": "Xamarin.Google.Android.ODML.Image",
+        "dependencyOnly": false
+      },
+      {
         "groupId": "com.google.android.play",
         "artifactId": "core",
         "version": "1.10.2",
@@ -629,8 +637,8 @@
       {
         "groupId": "com.google.android.ump",
         "artifactId": "user-messaging-platform",
-        "version": "1.0.0",
-        "nugetVersion": "1.0.0.4",
+        "version": "2.0.0",
+        "nugetVersion": "2.0.0",
         "nugetId": "Xamarin.Google.UserMessagingPlatform",
         "dependencyOnly": false,
         "templateSet": "user-messaging-platform"
@@ -647,8 +655,8 @@
       {
         "groupId": "com.google.dagger",
         "artifactId": "dagger",
-        "version": "2.27",
-        "nugetVersion": "2.27.0.4",
+        "version": "2.40.5",
+        "nugetVersion": "2.40.5",
         "nugetId": "Xamarin.Google.Dagger",
         "dependencyOnly": false,
         "templateSet": "dagger"
@@ -656,8 +664,8 @@
       {
         "groupId": "com.google.errorprone",
         "artifactId": "error_prone_annotations",
-        "version": "2.4.0",
-        "nugetVersion": "2.4.0.3",
+        "version": "2.5.1",
+        "nugetVersion": "2.5.1",
         "nugetId": "Xamarin.Google.ErrorProne.Annotations",
         "dependencyOnly": false,
         "templateSet": "errorprone"
@@ -936,14 +944,6 @@
       },
       {
         "groupId": "com.google.firebase",
-        "artifactId": "firebase-measurement-connector-impl",
-        "version": "17.0.5",
-        "nugetVersion": "117.0.5.6",
-        "nugetId": "Xamarin.Firebase.Measurement.Connector.Impl",
-        "dependencyOnly": false
-      },
-      {
-        "groupId": "com.google.firebase",
         "artifactId": "firebase-messaging",
         "version": "22.0.0",
         "nugetVersion": "122.0.0.5",
@@ -1287,18 +1287,10 @@
         "dependencyOnly": false
       },
       {
-        "groupId": "com.google.android.odml",
-        "artifactId": "image",
-        "version": "1.0.0-beta1",
-        "nugetVersion": "1.0.0.0-beta1",
-        "nugetId": "Xamarin.Google.Android.ODML.Image",
-        "dependencyOnly": false
-      },
-      {
         "groupId": "com.google.protobuf",
         "artifactId": "protobuf-javalite",
-        "version": "3.14.0",
-        "nugetVersion": "3.14.0.3",
+        "version": "3.15.8",
+        "nugetVersion": "3.15.8",
         "nugetId": "Xamarin.Protobuf.JavaLite",
         "dependencyOnly": false,
         "excludedRuntimeDependencies": "junit.junit,org.easymock.easymock,org.easymock.easymockclassextension,com.google.truth.truth",
@@ -1308,13 +1300,31 @@
         "groupId": "com.google.protobuf",
         "artifactId": "protobuf-lite",
         "version": "3.0.1",
-        "nugetVersion": "3.0.1.3",
+        "nugetVersion": "3.0.1.4",
         "nugetId": "Xamarin.Protobuf.Lite",
         "dependencyOnly": false,
         "excludedRuntimeDependencies": "junit.junit,org.easymock.easymock,org.easymock.easymockclassextension,com.google.truth.truth",
         "templateSet": "protobuf-lite"
       },
       {
+        "groupId": "com.google.zxing",
+        "artifactId": "core",
+        "version": "3.4.1",
+        "nugetVersion": "3.4.1",
+        "nugetId": "Xamarin.Google.ZXing.Core",
+        "dependencyOnly": false,
+        "templateSet": "zxing"
+      },
+      {
+        "groupId": "com.squareup",
+        "artifactId": "javapoet",
+        "version": "1.13.0",
+        "nugetVersion": "1.13.0.0",
+        "nugetId": "Square.JavaPoet",
+        "dependencyOnly": false,
+        "templateSet": "squareup-javapoet"
+      },
+      {
         "groupId": "com.squareup.okhttp",
         "artifactId": "okhttp",
         "version": "2.7.5",
@@ -1327,8 +1337,8 @@
       {
         "groupId": "com.squareup.okhttp3",
         "artifactId": "okhttp",
-        "version": "4.9.2",
-        "nugetVersion": "4.9.2.3",
+        "version": "4.9.3",
+        "nugetVersion": "4.9.3",
         "nugetId": "Square.OkHttp3",
         "dependencyOnly": false,
         "templateSet": "squareup-okhttp3"
@@ -1336,8 +1346,8 @@
       {
         "groupId": "com.squareup.okhttp3",
         "artifactId": "okhttp-urlconnection",
-        "version": "4.9.2",
-        "nugetVersion": "4.9.2.3",
+        "version": "4.9.3",
+        "nugetVersion": "4.9.3",
         "nugetId": "Square.OkHttp3.UrlConnection",
         "dependencyOnly": false,
         "templateSet": "squareup-okhttp3"
@@ -1693,30 +1703,6 @@
         "dependencyOnly": true
       },
       {
-        "groupId": "com.google.android.datatransport",
-        "artifactId": "transport-api",
-        "version": "3.0.0",
-        "nugetVersion": "3.0.0",
-        "nugetId": "Xamarin.Google.Android.DataTransport.TransportApi",
-        "dependencyOnly": true
-      },
-      {
-        "groupId": "com.google.android.datatransport",
-        "artifactId": "transport-backend-cct",
-        "version": "3.0.0",
-        "nugetVersion": "3.0.0",
-        "nugetId": "Xamarin.Google.Android.DataTransport.TransportBackendCct",
-        "dependencyOnly": true
-      },
-      {
-        "groupId": "com.google.android.datatransport",
-        "artifactId": "transport-runtime",
-        "version": "3.0.1",
-        "nugetVersion": "3.0.1",
-        "nugetId": "Xamarin.Google.Android.DataTransport.TransportRuntime",
-        "dependencyOnly": true
-      },
-      {
         "groupId": "com.google.android.gms",
         "artifactId": "play-services-ads-base",
         "version": "20.0.0",
@@ -1736,7 +1722,7 @@
         "groupId": "com.google.android.gms",
         "artifactId": "play-services-measurement-api",
         "version": "16.3.0",
-        "nugetVersion": "116.3.0",
+        "nugetVersion": "119.0.1.5",
         "nugetId": "Xamarin.GooglePlayServices.Measurement.Api",
         "dependencyOnly": true
       },
@@ -1744,7 +1730,7 @@
         "groupId": "com.google.android.gms",
         "artifactId": "play-services-measurement-base",
         "version": "16.3.0",
-        "nugetVersion": "117.0.1",
+        "nugetVersion": "116.3.0",
         "nugetId": "Xamarin.GooglePlayServices.Measurement.Base",
         "dependencyOnly": true
       },
@@ -1773,6 +1759,14 @@
         "dependencyOnly": true
       },
       {
+        "groupId": "com.google.firebase",
+        "artifactId": "firebase-measurement-connector-impl",
+        "version": "17.0.5",
+        "nugetVersion": "117.0.5.6",
+        "nugetId": "Xamarin.Firebase.Measurement.Connector.Impl",
+        "dependencyOnly": true
+      },
+      {
         "groupId": "com.google.guava",
         "artifactId": "guava",
         "version": "31.1-android",
@@ -1790,14 +1784,6 @@
       },
       {
         "groupId": "com.google.protobuf",
-        "artifactId": "protobuf-javalite",
-        "version": "3.14.0",
-        "nugetVersion": "3.14.0",
-        "nugetId": "Xamarin.Protobuf.JavaLite",
-        "dependencyOnly": true
-      },
-      {
-        "groupId": "com.google.protobuf",
         "artifactId": "protobuf-lite",
         "version": "3.0.1",
         "nugetVersion": "3.0.1",
@@ -2113,6 +2099,20 @@
         ]
       },
       {
+        "name": "squareup-javapoet",
+        "mavenRepositoryType": "MavenCentral",
+        "templates": [
+          {
+            "templateFile": "templates/squareup-javapoet/Project.cshtml",
+            "outputFileRule": "generated/{groupid}.{artifactid}/{groupid}.{artifactid}.csproj"
+          },
+          {
+            "templateFile": "source/GooglePlayServicesSolutionFilter.cshtml",
+            "outputFileRule": "generated/{groupid}.{artifactid}/{groupid}.{artifactid}.slnf"
+          }
+        ]
+      },
+      {
         "name": "grpc",
         "mavenRepositoryType": "MavenCentral",
         "templates": [
@@ -2132,6 +2132,20 @@
         "templates": [
           {
             "templateFile": "templates/codehaus-mojo/Project.cshtml",
+            "outputFileRule": "generated/{groupid}.{artifactid}/{groupid}.{artifactid}.csproj"
+          },
+          {
+            "templateFile": "source/GooglePlayServicesSolutionFilter.cshtml",
+            "outputFileRule": "generated/{groupid}.{artifactid}/{groupid}.{artifactid}.slnf"
+          }
+        ]
+      },
+      {
+        "name": "zxing",
+        "mavenRepositoryType": "MavenCentral",
+        "templates": [
+          {
+            "templateFile": "templates/zxing/Project.cshtml",
             "outputFileRule": "generated/{groupid}.{artifactid}/{groupid}.{artifactid}.csproj"
           },
           {

New artifacts:

  • Xamarin.Google.ZXing.Core (moved from XamarinComponents)
  • Square.JavaPoet

Changes:

  • Xamarin.Firebase.Measurement.Connector.Impl move to dependencyOnly = true. This package seems to be abandoned, and its locked dependency messes up our graph.
  • Removal of Xamarin.Google.Android.DataTransport.* packages. Is this intentional?
  • Removal of dependencyOnly = true version of Xamarin.Protobuf.JavaLite. Looks like this was a duplicate.
@@ -1736,7 +1722,7 @@
         "groupId": "com.google.android.gms",
         "artifactId": "play-services-measurement-api",
         "version": "16.3.0",
-        "nugetVersion": "116.3.0",
+        "nugetVersion": "119.0.1.5",
         "nugetId": "Xamarin.GooglePlayServices.Measurement.Api",
         "dependencyOnly": true
       },

^^ This nugetVersion does not match the version, is this intentional?

@@ -1744,7 +1730,7 @@
         "groupId": "com.google.android.gms",
         "artifactId": "play-services-measurement-base",
         "version": "16.3.0",
-        "nugetVersion": "117.0.1",
+        "nugetVersion": "116.3.0",
         "nugetId": "Xamarin.GooglePlayServices.Measurement.Base",
         "dependencyOnly": true
       },

^^ This nugetVersion is being downgraded, is this intentional?

templates/squareup-javapoet/License.md Outdated Show resolved Hide resolved
templates/squareup-javapoet/cgmanifest.json Outdated Show resolved Hide resolved
templates/zxing/Project.cshtml Outdated Show resolved Hide resolved
templates/zxing/Project.cshtml Outdated Show resolved Hide resolved
templates/zxing/Project.cshtml Outdated Show resolved Hide resolved
@moljac
Copy link
Member Author

moljac commented May 5, 2022

Eazy answers 1st.

New artifacts:

  • Xamarin.Google.ZXing.Core (moved from XamarinComponents)
  • Square.JavaPoet

True.

ZXing is for Facebook components

Also for Facebook components - Google Install Referrer is in AndroidX repo:

dotnet/android-libraries#494

Changes:

  • Xamarin.Firebase.Measurement.Connector.Impl move to dependencyOnly = true. This package seems to be abandoned, and its locked dependency messes up our graph.
  • Removal of Xamarin.Google.Android.DataTransport.* packages. Is this intentional?

Those are used as template set (ProjectReference)

https://github.com/xamarin/GooglePlayServicesComponents/blob/mu-20220215-split-dependencies/config.json#L1236-L1262

  • Removal of dependencyOnly = true version of Xamarin.Protobuf.JavaLite. Looks like this was a duplicate.

Correct.

Now this "trick":

@@ -1736,7 +1722,7 @@
         "groupId": "com.google.android.gms",
         "artifactId": "play-services-measurement-api",
         "version": "16.3.0",
-        "nugetVersion": "116.3.0",
+        "nugetVersion": "119.0.1.5",
         "nugetId": "Xamarin.GooglePlayServices.Measurement.Api",
         "dependencyOnly": true
       },

^^ This nugetVersion does not match the version, is this intentional?

@@ -1744,7 +1730,7 @@
         "groupId": "com.google.android.gms",
         "artifactId": "play-services-measurement-base",
         "version": "16.3.0",
-        "nugetVersion": "117.0.1",
+        "nugetVersion": "116.3.0",
         "nugetId": "Xamarin.GooglePlayServices.Measurement.Base",
         "dependencyOnly": true
       },

^^ This nugetVersion is being downgraded, is this intentional?

This was mimicing (attempt) of something similar like your idea to weaken binderator rules for locked/strict/fixed versions.

I make binderator "happy" by specifying version (locked/exact/strict/fixed) it wants, but I sneak in newer nuget version.
Due to the fact that binderator does not check nuget versions it is happy and we can procedee.

@moljac moljac merged commit bcf8305 into main May 11, 2022
@moljac moljac deleted the mu-20220215-split-dependencies branch May 11, 2022 07:15
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