Permalink
Browse files

Merge pull request #16 from oakes/master

Pass resource paths to dx
  • Loading branch information...
2 parents ce35325 + 91a0c44 commit 505668ed7d67a25822869bce352cad651cedeb65 @alexander-yakushev alexander-yakushev committed Mar 8, 2013
Showing with 6 additions and 3 deletions.
  1. +6 −3 src/leiningen/droid/build.clj
View
9 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 (java.io.File. %))
+ 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 505668e

Please sign in to comment.