Skip to content
This repository has been archived by the owner on Aug 29, 2019. It is now read-only.

Commit

Permalink
Improve read-deps-edn fn
Browse files Browse the repository at this point in the history
  • Loading branch information
oakes committed Apr 3, 2019
1 parent 571d101 commit 990f5e3
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions prod.clj
Expand Up @@ -8,6 +8,7 @@
(System/exit 1)))

(require
'[clojure.string :as str]
'[leiningen.core.project :as p :refer [defproject]]
'[leiningen.install :refer [install]]
'[leiningen.deploy :refer [deploy]])
Expand All @@ -22,14 +23,25 @@
vals
(mapcat :extra-deps)
(into deps)
(map (fn parse-coord [coord]
(let [[artifact info] coord
s (str artifact)]
(if-let [i (str/index-of s "$")]
[(symbol (subs s 0 i))
(assoc info :classifier (subs s (inc i)))]
coord))))
(reduce
(fn [deps [artifact info]]
(if-let [version (:mvn/version info)]
(conj deps
(transduce cat conj [artifact version]
(select-keys info [:scope :exclusions])))
(select-keys info [:exclusions :classifier])))
deps))
[]))]
[]))
paths (->> (select-keys aliases aliases-to-include)
vals
(mapcat :extra-paths)
(into paths))]
{:dependencies deps
:source-paths []
:resource-paths paths}))
Expand Down

0 comments on commit 990f5e3

Please sign in to comment.