 
 ; utilities
 
+(defn java-project-map?
+  [project]
+  (or (:java-only project)
+      (= (count (:source-paths project)) 0)
+      (clojure.set/subset? (set (:source-paths project))
+                           (set (:java-source-paths project)))))
+
 (defn read-file
   [path]
   (let [length (.length (io/file path))]

(defn clean-project-task
  [path project]
  (cond
    (:clr project)
    (leiningen.clr/clr project "clean")
    :else
    (leiningen.clean/clean project)))

    (android-project? path)
    (some-> (read-android-project project)
            (leiningen.droid/doall []))
    (ios-project? path)
    nil
    (clr-project? path)
    (leiningen.clr/clr project "run")
    (ring-project? path)
    (leiningen.ring/ring project "server")
    :else
    (leiningen.run/run project)))
