GooglePlayServicesComponents icon indicating copy to clipboard operation
GooglePlayServicesComponents copied to clipboard

Determine Android Library Version for Nuget Package

Open CMihalcik opened this issue 4 years ago • 1 comments

How can I determine which version of an Android library a particular Nuget package provides bindings for?

Will the following process lead to the correct version? Is there a simpler approach, perhaps tagging the repo each time a nuget package is published?

  1. Download a published nuget package, e.g. https://www.nuget.org/packages/Xamarin.Firebase.Config/71.1610.4
  2. Extract the .nuspec and pull the commit attribute from the repository element
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
  <metadata>
    <id>Xamarin.Firebase.Config</id>
    <version>71.1610.4</version>
    ...
    <repository type="git" url="https://github.com/xamarin/GooglePlayServicesComponents" branch="71.20200716-build-tasks-netstandard2.0" commit="ee47d60b0807e567b80076d6e55029fe7d4fc3ae" />
    ...
  </metadata>
</package>
  1. Browse config.json at that commit, https://github.com/xamarin/GooglePlayServicesComponents/blob/ee47d60b0807e567b80076d6e55029fe7d4fc3ae/config.json
  2. Note the version of the object with `nugetId: "Xamarin.Firebase.Config" (16.1.0 in this case)

CMihalcik avatar May 03 '21 17:05 CMihalcik

Well, when I get some free time from bindings and maintenance I work on side-project for bindings improvements (basically utilities for dependency graphs for nuget and maven artifacts).

perhaps tagging the repo each time a nuget package is published?

We do exactly that!

We don't ship POM files with nuget (there is active discussion about it). Currently I grab version, search the tags obtained from github API and then try to deduce maven version.

moljac avatar May 06 '21 09:05 moljac