Created
June 22, 2018 23:08
-
-
Save kennyjwilli/3c0371bc129628c523bf5b74ab316577 to your computer and use it in GitHub Desktop.
Maven to deps.edn converter
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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