 
 ;; Tasks
 
-(deftask testing
-  "Adds the test files to the fileset."
-  []
-  (merge-env! :resource-paths #{"src/test/cljc"
-                                "src/test/cljs"
-                                "src/test/resources"})
-  identity)
-
-(deftask benchmarking
-  "Adds the benchmark files to the fileset."
-  []
-  (merge-env! :resource-paths #{"src/benchmark/cljc"
-                                "src/benchmark/java"
-                                "src/benchmark/resources"}
-              :dependencies   '[[com.cognitect/transit-clj         "0.8.300"]
-                                [com.cognitect/transit-cljs        "0.8.239"]
-                                [com.damballa/abracad              "0.4.14-alpha2"]
-                                [gloss                             "0.2.6"]
-                                [cheshire                          "5.7.1"]
-                                [funcool/octet                     "1.0.1"]
-                                [com.google.protobuf/protobuf-java "3.3.1"]
-                                [com.taoensso/nippy                "2.14.0-alpha1"]
-                                [criterium                         "0.4.4"]])
-  identity)
-
 (deftask dev
   "Dev task for proto-repl."
   []
-  (merge-env! :init-ns        'user
-              :resource-paths #{"src/dev/clj"}
-              :dependencies   '[[org.clojure/tools.namespace "0.2.11"]
-                                [proto-repl                  "0.3.1" :exclusions [org.clojure/core.async]]])
+  (boot-tools-deps/load-deps {:resolve-aliases   [:dev]
+                              :classpath-aliases [:dev]})
   (require 'clojure.tools.namespace.repl)
-  (apply (resolve 'clojure.tools.namespace.repl/set-refresh-dirs) (get-env :directories))
-  (comp (testing)
-        (benchmarking)
+  (apply (resolve 'clojure.tools.namespace.repl/set-refresh-dirs)
+         (get-env :directories))
+  (comp (boot-tools-deps/deps :aliases [:test :benchmark :dev])
         (javac)))
 
 (deftask test-clj
   "Runs the tests on JVM."
   []
-  (comp (testing)
+  (comp (boot-tools-deps/deps :aliases [:test])
         (boot-test/test :namespaces clj-test-namespaces)))
 
 (deftask test-node

   e js-env VAL kw "The js environment."]
  (let [opt    (or opt :none)
        js-env (or js-env :slimer)]
    (comp (testing)
          (boot-cljs-test/test-cljs :js-env        js-env
                                    :namespaces    cljs-test-namespaces
                                    :optimizations opt

(merge-env!
  :init-ns      'user
  :dependencies '[[seancorfield/boot-tools-deps "0.1.4"]]
  :repositories [["clojars" {:url      "https://clojars.org/repo"
                             :username (System/getenv "CLOJARS_USER")
                             :password (System/getenv "CLOJARS_PASS")}]])

(require '[boot-tools-deps.core :as boot-tools-deps])

(boot-tools-deps/load-deps {:resolve-aliases   [:build]
                            :classpath-aliases [:build]})

(require '[boot.util :as boot-util]
         '[adzerk.boot-test :as boot-test]
