badgen/badgen.net

Missing support for Android packages

kiselitza opened this issue · 3 comments

When trying to use badgen.net for badge generation of given Android library published on Bintray I find no way to do so.

Even though the library is synced to be shown on mvnrepository, it won’t work with mvn-central approach either.

https://bintray.com/infobip/maven/infobip-rtc
https://mvnrepository.com/artifact/com.infobip/infobip-rtc

I am aware that some sort of workaround would be, for example, to use GitHub release version as a source of truth, but still would appreciate having an option to do so directly from central repository.

When trying to use badgen.net for badge generation of given Android library published on Bintray I find no way to do so.

The short answer would be here is how you can generate a badge for a given library:

![](https://badgen.net/maven/v/metadata-url/https/jcenter.bintray.com/com/infobip/infobip-rtc/maven-metadata.xml)

Now goes the proper explanation. First, let's take a look inside Maven Central & Bintray's JCenter:

Obviously, you can't generate a badge using /maven/v/maven-central/:group/:artifact handler for something that isn't present inside Central in the first place 🙃
https://badgen.net/maven reveals another /maven/v/metadata-url/:path+ handler which can be used for stuff outside of Central. That brings us back to the start because the badge URL I already shared with you has been constructed using the exact same handler. 🎉

So long story short, if one publishes stuff to Central there is a dedicated badge handler for it, alternatively one needs to use maven-metadata and construct badge URL using artifact URL as input param.

OTOH badgen.net should probably support other popular Maven repositories (Sonatype, JCenter, JitPack?) out of the box and you are more than welcome to make it happen by submitting PRs 😉

Once #481 lands in, you'll be able to use the following badge:

![](https://badgen.net/maven/v/jcenter/com.infobip/infobip-rtc)