This repository has been archived by the owner on Jan 24, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
project.clj
72 lines (57 loc) · 3.74 KB
/
project.clj
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
(defn get-deps [deps-file allowed known]
(let [{:keys [deps]} (try (clojure.edn/read-string (slurp deps-file)) (catch Exception e (throw (ex-info (str "Error in file " deps-file) {} e))))
deps (apply dissoc deps known)
{:keys [mvn local] :as m} (group-by (fn [[k v]]
(cond
(:mvn/version v) :mvn
(:local/root v) :local
:else :unsupported))
deps)]
(when-let [unsupported (seq (clojure.set/difference (set (keys m)) allowed))]
(throw (ex-info "Found unsupported deps" {:deps (select-keys m unsupported)})))
{:deps (mapv (fn [[k v]]
(cond-> [k (:mvn/version v)]
(:exclusions v)
(conj :exclusions (:exclusions v))))
mvn)
:source-roots (mapv (fn [[k v]]
(:local/root v))
local)}))
(let [{:keys [deps source-roots]} (get-deps "deps.edn" #{:mvn :local} nil)]
(def deps (into deps (mapcat (fn [root]
(:deps (get-deps (str root "/deps.edn") #{:mvn :local} (map first deps))))
source-roots)))
(def source-paths (vec (cons "src" (map (fn [root]
(str root "/src"))
(concat source-roots
(mapcat (fn [root]
(:source-roots (get-deps (str root "/deps.edn") #{:mvn :local} (map first deps))))
source-roots)))))))
(defproject adgoji.aws.api (or (System/getenv "VERSION") "none")
:dependencies ~deps
:plugins [[nrepl/lein-nrepl "0.3.2"]]
;:repl-options {:init-ns app.scratch}
:min-lein-version "2.8.1"
; :auto-clean false
:resource-paths ["resources"]
:source-paths ~source-paths
:test-paths []
:clean-targets ^{:protect false} ["resources/public/js/compiled"
"target"
"test/js"]
:profiles {:dev {:dependencies [[com.cognitect.aws/api "0.8.445"]
[com.cognitect.aws/endpoints "1.1.11.732"]
[com.cognitect.aws/s3 "784.2.593.0"]
[com.cognitect.aws/sts "773.2.578.0"]
[com.cognitect.aws/sts "773.2.578.0"]
[com.cognitect.aws/cloudformation "773.2.575.0"]
[borkdude/babashka "0.0.75" :exclusions [org.clojure/clojure
org.clojure/core.async
org.clojure/spec.alpha
org.clojure/core.memoize
]]
[org.clojure/clojure "1.10.2-alpha1"]
]
:plugins [[lein-kibit "0.1.8"]]
:global-vars {*warn-on-reflection* true
*assert* true}}})