It would be "interesting"/cool if, instead of binding a .jar or .aar file, we could instead bind a gradle or maven "artifact name" and all dependencies within one binding project.
Is this at all practical or possible?
@jonpryor That's something @EgorBo did awhile back:
https://github.com/EgorBo/Xamarin.GradleBindings
https://marketplace.visualstudio.com/items?itemName=EgorBogatov.XamarinGradleBindings
It's definitely something we hear from users often.
In other words, a tool that could generate a binding project based on a maven package & it's dependencies.
How feasible is it to create a binding project that gets a user say 90% the way there with their Metadata.xml to just consume in a project?
Was just going to open an issue about the same feature and found this.. I really miss the VS extension as it doesn't support VS 2019 but having the functionality built-in would be much better.
The think I missed in the extension however was that it was _just_ for generating a new binding project. There was no way (or I didn't find it) to update the .jar or .aar after the binding project was created. So if I was to maintain a binding library, when an update to the underlying native lib would come, I'd have to recreate the project or find another way to get the updated versions of these files after the project was created (which I found kinda hard compared to for example NuGet)...
So the imo best approach for this would be to make it work similarly to how NuGets are consumed by adding an MSBuild item like <GradleReference Include="GradleLibName" Version="1.2.3" />. Of course a graphical package manager similar to the NuGet one would be great, but at least such support to easily reference (and update by changing the version attribute) would be a huge step forward 馃槉.
GradleReference is a good idea. Before I bind such a library, I had to download all gradle dependent AAR or jar files. If we do this through msbuild, I think it will greatly reduce our work of binding Android library.
Most helpful comment
Was just going to open an issue about the same feature and found this.. I really miss the VS extension as it doesn't support VS 2019 but having the functionality built-in would be much better.
The think I missed in the extension however was that it was _just_ for generating a new binding project. There was no way (or I didn't find it) to update the
.jaror.aarafter the binding project was created. So if I was to maintain a binding library, when an update to the underlying native lib would come, I'd have to recreate the project or find another way to get the updated versions of these files after the project was created (which I found kinda hard compared to for example NuGet)...So the imo best approach for this would be to make it work similarly to how NuGets are consumed by adding an MSBuild item like
<GradleReference Include="GradleLibName" Version="1.2.3" />. Of course a graphical package manager similar to the NuGet one would be great, but at least such support to easily reference (and update by changing the version attribute) would be a huge step forward 馃槉.