Skip to content
This repository has been archived by the owner on Apr 25, 2024. It is now read-only.

Handle AAR files that don't include a res folder #168

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/leiningen/droid/build.clj
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,9 @@
assets (mapcat #(when (.exists (io/file %)) ["-A" (str %)])
(concat assets-paths [assets-gen-path]
(get-aar-files project "assets")))
aar-resources (for [res (get-aar-files project "res")] ["-S" res])
aar-resources (for [res (get-aar-files project "res")
:when (.exists ^File res)]
["-S" res])
aar-crunched-resources (for [res (get-aar-files project "out-res")
:when (.exists ^File res)]
["-S" res])
Expand Down
4 changes: 3 additions & 1 deletion src/leiningen/droid/code_gen.clj
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,9 @@
android-jar (get-sdk-android-jar sdk-path target-version)
manifest-file (io/file manifest-path)
library-specific (if library ["--non-constant-id"] [])
aar-resources (for [res (get-aar-files project "res")] ["-S" (str res)])
aar-resources (for [res (get-aar-files project "res")
:when (.exists ^File res)]
["-S" (str res)])
external-resources (for [res external-res-paths] ["-S" res])]
(ensure-paths manifest-path res-path android-jar)
(.mkdirs (io/file gen-path))
Expand Down