clojure-android / lein-droid

A Leiningen plugin for building Clojure/Android projects
Eclipse Public License 1.0
645 stars 56 forks source link

"lein droid release" doesn't compile necessary namespaces #14

Closed oakes closed 11 years ago

oakes commented 11 years ago

Using "lein droid release" was creating a non-functioning apk because it wasn't compiling any namespace except the ones listed in always-compile-ns.

After further research, I noticed that lein-droid uses the leiningen.compile/stale-namespaces function in release mode. This may be the problem, because that function uses the compilable-namespaces function, which expects :aot to be at the root of the project map that you supply.

Since lein-droid projects don't have :aot defined at the root of the map, it can't find it. The workaround (obviously) is to add :aot :all to the root of the project.clj map.

alexander-yakushev commented 11 years ago

Hello Zach,

Sorry for the late response, holidays and such. You are absolutely correct, this error appeared after I had moved the :aot value from the root map to the :android map to fix #9.

I don't want to two equivalent values in the project tree so I made a hack to solve this issue. :aot should still be in the :android map but root-level :aot will be added automatically.

I pushed changes to clojars into 0.1.0-beta5.