Browse files

Pass resource paths to dx

  • Loading branch information...
1 parent ce35325 commit 91a0c44765eb1ba54339c6e04edd43a89d75f877 @oakes oakes committed Mar 8, 2013
Showing with 6 additions and 3 deletions.
  1. +6 −3 src/leiningen/droid/build.clj
@@ -26,20 +26,23 @@
"Creates a DEX file from the compiled .class files."
[{{:keys [sdk-path out-dex-path external-classes-paths
force-dex-optimize]} :android,
- compile-path :compile-path :as project}]
+ compile-path :compile-path resource-paths :resource-paths :as project}]
(info "Creating DEX....")
(ensure-paths sdk-path)
(let [dx-bin (sdk-binary sdk-path :dx)
no-optimize (if (and (not force-dex-optimize) (dev-build? project))
"--no-optimize" [])
annotations (str sdk-path "/tools/support/annotations.jar")
deps (resolve-dependencies :dependencies project)
- external-paths (or external-classes-paths [])]
+ external-paths (or external-classes-paths [])
+ existing-resource-paths (filter #(.exists ( %))
+ resource-paths)]
(with-process [proc (map str
(flatten [dx-bin "--dex" no-optimize
"--output" out-dex-path
compile-path annotations deps
- external-paths]))]
+ external-paths
+ existing-resource-paths]))]
(.addShutdownHook (Runtime/getRuntime) (Thread. #(.destroy proc))))))
(defn crunch-resources

0 comments on commit 91a0c44

Please sign in to comment.