Determine Android Library Version for Nuget Package
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?
- Download a published nuget package, e.g. https://www.nuget.org/packages/Xamarin.Firebase.Config/71.1610.4
- Extract the
.nuspecand 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>
- Browse
config.jsonat that commit, https://github.com/xamarin/GooglePlayServicesComponents/blob/ee47d60b0807e567b80076d6e55029fe7d4fc3ae/config.json - Note the
versionof the object with `nugetId: "Xamarin.Firebase.Config" (16.1.0 in this case)
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.