 ; low-level commands
 
 (defn run-project-task
-  [path project-map]
+  [path project]
   (if (is-android-project? path)
     (doseq [sub-cmd ["build" "apk" "install" "run"]]
-      (leiningen.droid/droid (add-sdk-path project-map) sub-cmd))
-    (leiningen.run/run project-map)))
+      (leiningen.droid/droid (add-sdk-path project) sub-cmd))
+    (leiningen.run/run project)))
 
 (defn run-repl-project-task
-  [path project-map]
+  [path project]
   (if (is-android-project? path)
     (doseq [sub-cmd ["doall" "repl"]]
-      (leiningen.droid/droid (add-sdk-path project-map) sub-cmd)
+      (leiningen.droid/droid (add-sdk-path project) sub-cmd)
       (Thread/sleep 10000))
-    (leiningen.repl/repl project-map)))
+    (leiningen.repl/repl project)))
 
 (defn build-project-task
-  [path project-map]
+  [path project]
   (if (is-android-project? path)
-    (-> (leiningen.droid/transform-into-release project-map)
+    (-> (leiningen.droid/transform-into-release project)
         add-sdk-path
         leiningen.droid/execute-release-routine)
-    (leiningen.uberjar/uberjar project-map)))
+    (leiningen.uberjar/uberjar project)))
 
 (defn test-project-task
-  [path project-map]
-  (leiningen.test/test project-map))
+  [path project]
+  (leiningen.test/test project))
 
 (defn clean-project-task
-  [path project-map]
-  (leiningen.clean/clean project-map))
+  [path project]
+  (leiningen.clean/clean project))
 
 (defn cljsbuild-project-task
-  [path project-map]
-  (leiningen.cljsbuild/cljsbuild project-map "auto"))
+  [path project]
+  (leiningen.cljsbuild/cljsbuild project "auto"))
 
 (defn hot-swap-project-task
-  [path project-map]
+  [path project]
   (when-let [conn (->> (Bootstrap/virtualMachineManager)
                        .attachingConnectors
                        (filter #(= (.name (.transport %)) "dt_socket"))
                        first)]
      (let [prm (.defaultArguments conn)
-           stale-classes (-> (:java-source-paths project-map)
-                             (stale-java-classes (:compile-path project-map))
-                             doall)]
+           stale-classes (doall (stale-java-classes project))]
        (.setValue (.get prm "port") debug-port)
        (.setValue (.get prm "hostname") "127.0.0.1")
        (when-let [vm (try (.attach conn prm) (catch Exception _))]
-         (leiningen.javac/javac project-map)
+         (leiningen.javac/javac project)
          (->> stale-classes
               (create-class-map (.allClasses vm))
               (.redefineClasses vm))


(defn start-process-directly
  [process path func]
  (let [project-map-orig (read-project-clj path)
        jvm-opts (conj (:jvm-opts project-map-orig)
                       (str "-agentlib:jdwp="
                            "transport=dt_socket,"
                            "server=y,"
                            "suspend=n,"
                            "address="
                            debug-port))
        project-map (-> project-map-orig
                        (assoc :eval-in :trampoline
                               :jvm-opts jvm-opts))
        forms leiningen.core.eval/trampoline-forms
        profiles leiningen.core.eval/trampoline-profiles]
    (reset! forms [])
    (reset! profiles [])
    (func path project-map)
    (doseq [i (range (count @forms))]
      (->> (leiningen.core.eval/shell-command project-map (nth @forms i))
           (start-process process path)))))

(defn stop-process

          (catch Exception e {}))))))

(defn add-sdk-path
  [project]
  (assoc-in project
            [:android :sdk-path]
            (or (get-in project [:android :sdk-path])
                (utils/read-pref :android-sdk))))

(defn create-file-from-template
