Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Maven to deps.edn converter
(defn transform-deps
[deps]
(binding [*print-namespace-maps* false]
(clojure.pprint/pprint
(reduce (fn [deps-edn [id version & opts]]
(let [opts (apply hash-map opts)]
(if (= "test" (:scope opts))
deps-edn
(assoc deps-edn
id (merge {:mvn/version version}
(select-keys opts [:exclusions :classifier :extension]))))))
(sorted-map) deps))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.