Permalink
Browse files

Finish support for Java-only projects

  • Loading branch information...
1 parent 1928f2e commit 8cb74a42e215a2c69c57fc2b52277487129d6b58 @alexander-yakushev alexander-yakushev committed Oct 4, 2012
Showing with 13 additions and 5 deletions.
  1. +4 −0 res/templates/project.clj
  2. +4 −0 sample/project.clj
  3. +5 −5 src/leiningen/droid/build.clj
@@ -14,6 +14,10 @@
;; :target-path "bin"
;; :compile-path "bin/classes"
+ ;; Uncomment this line if your project doesn't use Clojure. Also
+ ;; don't forget to remove respective dependencies.
+ ;; java-only true
+
:dependencies [[android/clojure "1.4.0"]
[neko/neko "2.0.0-beta1"]]
:profiles {:dev {:dependencies [[android/tools.nrepl "0.2.0-bigstack"]]
View
@@ -14,6 +14,10 @@
;; :target-path "bin"
;; :compile-path "bin/classes"
+ ;; Uncomment this line if your project doesn't use Clojure. Also
+ ;; don't forget to remove respective dependencies.
+ ;; java-only true
+
:dependencies [[android/clojure "1.4.0"]
[neko/neko "2.0.0-beta1"]]
:profiles {:dev {:dependencies [[android/tools.nrepl "0.2.0-bigstack"]]
@@ -130,20 +130,20 @@
It is done by running `apkbuilder` tool on the generated DEX-file
and the resource package."
[{{:keys [sdk-path out-apk-path out-res-pkg-path out-dex-path]} :android,
- source-paths :source-paths, java-source-paths :java-source-paths
- :as project}]
+ source-paths :source-paths, java-source-paths :java-source-paths,
+ java-only :java-only :as project}]
(info "Creating APK...")
(ensure-paths sdk-path out-res-pkg-path out-dex-path)
(let [apkbuilder-bin (str sdk-path "/tools/apkbuilder")
suffix (if (dev-build? project) "debug-analigned" "unaligned")
unaligned-path (append-suffix out-apk-path suffix)
clojure-jar (first-matched #(re-find #"android/clojure" (str %))
- (resolve-dependencies :dependencies
- project))]
+ (resolve-dependencies :dependencies project))
+ rj-line (if java-only [] ["-rj" (str clojure-jar)])]
(sh apkbuilder-bin unaligned-path "-u"
"-z" out-res-pkg-path
"-f" out-dex-path
- "-rj" (str clojure-jar))))
+ rj-line)))
(defn sign-apk
"Signs APK file with the key taken from the keystore.

0 comments on commit 8cb74a4

Please sign in to comment.