Finding a plugins latest version programmatically?


(N Christopher) #1

Obviously the portal will show me the newest version of a plugin, but I’m trying to do it programmatically to make the version appear correctly on my website etc. Normally I’d do this by traversing the m2 folders. Plugins go to https://plugins.gradle.org/m2/ which redirects to https://jcenter.bintray.com/gradle/plugin/ but neither of those allow HTTP access. You can pull a specific file but not get an index. Is their and API or other mechanism to do this?

I can pull http://plugins.gradle.org/m2/com/github/nwillc/vplugin/maven-metadata.xml but that seems to show old data from before I used plugins.gradle.org where as the portal shows the correct data…


(Fredrik Ekholdt) #2

Hi Christopher
Right now there’s no API for finding the latest version programatically.
We have a work-item already on adding maven-metadata.xml to our https://plugins.gradle.org/m2/ repository.

We haven’t had any asks for it yet. I am assuming this would fix your problem? If so, we have a good excuse for expediting it.

Regards,
Fredrik


(N Christopher) #3

Yes, a maven-metadata.xml would do the trick


(Fredrik Ekholdt) #4

Oki, will get in touch when we have fixed it.
Not sure, how things look like this and next week with the Gradle Summit and all. Hopefully, we’ll be able to get right on the week after.

Fredrik


(N Christopher) #5

I’m appreciative of the grade tool chain so all I have to say is thanks


(Ben Manes) #6

@freekh1 Any chance that you have the bandwidth to resolve this? For the plugins that have old metadata I monitor them manually (primarily [1]). Most plugins are on jcenter, but it would be nice to keep the dependency updates report clean.

[1] http://plugins.gradle.org/m2/net/ltgt/gradle/gradle-errorprone-plugin/maven-metadata.xml


(Emily Carlsen) #7

@freekh1 any updates? i’m curious about a Gradle plugins portal api as well, thanks!


(Eric Wendelin) #8

@nwillc The plugin portal now merges data between Bintray and what it knows and serves that.

I recognize this is incredibly late, so I hope this helps you and others who come upon this later.

Cheers,
Eric