     (when (some #(newer? % start) (file-seq (file "classes")))
       (reload!))))
 
+(deftask compile-java #{deps compile-native}
+  (copy-native)
+  (compile-java (file "src" "jvm")))
+
 (defn source-dir []
   (let [src (file "src" "clj")]
     (if (.exists src) src (file "src"))))

  (ant Copy {:todir (format "native/%s/%s" (os-name) (os-arch))}
       (add-fileset {:dir "build/native/lib"})))

(deftask compile #{deps compile-native}
  "Compile all clojure and java source files. Use 'cake compile force' to recompile."
  (copy-native)
  (compile-java (file "src" "jvm"))
  (compile-clojure (source-dir) (file "classes") (:aot *project*))
  (compile-clojure (file "test") (file "test" "classes") (:aot-test *project*)))


        [cake.utils :only [os-name os-arch sudo prompt-read]]
        [cake.utils.useful :only [pluralize]])
  (:import [org.apache.tools.ant.taskdefs Copy Javac Java]))

(declare copy-native)

(defn compile-java [src]
  (let [start (System/currentTimeMillis)]
