 
 (require '[samestep.boot-refresh :refer [refresh]])
 (require '[tolitius.boot-check :as check])
+(require '[adzerk.boot-test :refer [test]])
+(require '[boot.pod :as pod])
 
 (deftask build
   "Build the project locally as a JAR."

  ;; Q: Does it make any sense to keep it around?
  (require '[frereth-cp.server :as app])
  (apply (resolve 'app/-main) file))

(require '[adzerk.boot-test :refer [test]])

  (let [dir (if (seq dir) dir #{"target"})]
    (comp (javac) (aot) (pom) (uber) (jar) (target :dir dir))))

(deftask check-conflicts
  "Verify there are no dependency conflicts."
  []
  (with-pass-thru fs
    (require '[boot.pedantic :as pedant])
    (let [dep-conflicts (resolve 'pedant/dep-conflicts)]
      (if-let [conflicts (not-empty (dep-conflicts pod/env))]
        (throw (ex-info (str "Unresolved dependency conflicts. "
                             "Use :exclusions to resolve them!")
                        conflicts))
        (println "\nVerified there are no dependency conflicts.")))))

(deftask dev
  []
  (merge-env! :source-paths #{"dev" "dev-resources"})
  identity)

(deftask testing
  []
  (merge-env! :dependencies '[[gloss "0.2.6" :scope "test"]]
              :source-paths #{"test"})
  identity)

(deftask cider-repl
  "Set up a REPL for connecting from CIDER"
  []
  ;; Just because I'm prone to forget one of the vital helper steps
  (comp (dev) (testing) (check-conflicts) (cider) (javac) (repl)))

(deftask run
  "Run the project."
