clojars / clojars-web

A community repository for open-source Clojure libraries
https://clojars.org
Eclipse Public License 1.0
468 stars 114 forks source link

Allow .module files to be uploaded #843

Closed ajoberstar closed 1 year ago

ajoberstar commented 1 year ago

Gradle module files [1] are Gradle's alternative to POM files. They have a similar goal of defining the primary component group/artifact/version that was published along with its dependencies. Additionally they allow declaring variants of the main component that may have different dependencies or capabilities.

We're doing very minimal validation, parsing it as JSON and validating the top-level component group/module/version the upload path (as is already done for POM files).

It does look like Gradle uploads maven-metadata.xml last, so I believe this should fit in with how the existing validation works. I think this is the line in Gradle's code that implies the order.

[1] https://docs.gradle.org/current/userguide/publishing_gradle_module_metadata.html

Fixes #835

This was my first crack at it. Open to any feedback or changes that you'd like to see.

tobias commented 1 year ago

I merged and deployed this as part of Clojars 177. Let me know if you see any issues with it, and thanks for the contribution!

ajoberstar commented 1 year ago

I merged and deployed this as part of Clojars 177. Let me know if you see any issues with it, and thanks for the contribution!

Just did a quick test and everything works great! I appreciate the quick reviews and feedback.