-(set-env!
-  :dependencies '[[adzerk/boot-cljs "2.1.4" :scope "test"]
-                  [javax.xml.bind/jaxb-api "2.3.0" :scope "test"]
-                  [seancorfield/boot-tools-deps "0.1.4" :scope "test"]
-                  [orchestra "2017.11.12-1" :scope "test"]]
-  :repositories (conj (get-env :repositories)
-                  ["clojars" {:url "https://clojars.org/repo/"
-                              :username (System/getenv "CLOJARS_USER")
-                              :password (System/getenv "CLOJARS_PASS")}]))
+(defn read-deps-edn [aliases-to-include]
+  (let [{:keys [paths deps aliases]} (-> "deps.edn" slurp clojure.edn/read-string)
+        deps (->> (select-keys aliases aliases-to-include)
+                  vals
+                  (mapcat :extra-deps)
+                  (into deps)
+                  (reduce
+                    (fn [deps [artifact info]]
+                      (if-let [version (:mvn/version info)]
+                        (conj deps
+                          (transduce cat conj [artifact version]
+                            (select-keys info [:scope :exclusions])))
+                        deps))
+                    []))]
+    {:dependencies deps
+     :source-paths (set paths)
+     :resource-paths (set paths)}))
+
+(let [{:keys [source-paths resource-paths dependencies]} (read-deps-edn [])]
+  (set-env!
+    :source-paths source-paths
+    :resource-paths resource-paths
+    :dependencies (into '[[adzerk/boot-cljs "2.1.4" :scope "test"]
+                          [javax.xml.bind/jaxb-api "2.3.0" :scope "test"]
+                          [orchestra "2017.11.12-1" :scope "test"]]
+                        dependencies)
+    :repositories (conj (get-env :repositories)
+                    ["clojars" {:url "https://clojars.org/repo/"
+                                :username (System/getenv "CLOJARS_USER")
+                                :password (System/getenv "CLOJARS_PASS")}])))
 
 (require
   '[orchestra.spec.test :refer [instrument]]
-  '[clojure.edn :as edn]
   '[adzerk.boot-cljs :refer [cljs]]
-  '[clojure.java.io :as io]
-  '[boot-tools-deps.core :refer [deps]])
+  '[clojure.java.io :as io])
 
 (task-options!
   sift {:include #{#"\.jar$"}}

    #"(?i)^META-INF\\INDEX.LIST$"))

(deftask build []
  (comp (deps) (aot) (pom) (uber :exclude jar-exclusions) (jar) (sift) (target)))

(deftask build-cljs []
  (comp
    (deps :aliases [:cljs])
    (cljs :optimizations :advanced)
    (target)
    (with-pass-thru _

       :version "2.5.8-SNAPSHOT"
       :description "An IDE for Clojure"
       :url "https://github.com/oakes/Nightcode"
       :license {"Public Domain" "http://unlicense.org/UNLICENSE"}}
  push {:repo "clojars"}
  aot {:namespace '#{nightcode.core
                     nightcode.lein}}
