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

Commit

Permalink
Minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-yakushev committed Jun 16, 2012
1 parent c91bfa0 commit 26b8f31
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion project.clj
@@ -1,4 +1,4 @@
(defproject lein-droid/lein-droid "0.0.2"
(defproject lein-droid/lein-droid "0.0.3"
:description "Plugin for easy Clojure/Android development and deployment"
:url "https://github.com/alexander-yakushev/lein-droid"
:license {:name "Eclipse Public License"
Expand Down
2 changes: 1 addition & 1 deletion sample/project.clj
Expand Up @@ -16,7 +16,7 @@
:aot-exclude-ns ["clojure.parallel"]

:dependencies [[android/clojure "1.4.0"]
[neko/neko "1.1.0-SNAPSHOT"]]
[neko/neko "1.1.1-SNAPSHOT"]]
:profiles {:dev {:dependencies [[org.clojure/tools.nrepl "0.2.0-beta6"]]}
:release {:android {;; Specify the path to your private
;; keystore and the the alias of the
Expand Down
3 changes: 2 additions & 1 deletion src/leiningen/droid.clj
Expand Up @@ -78,7 +78,8 @@
;; Meta tasks
"build" (build project)
"apk" (apk project)
"doall" (apply doall project)
"deploy" (apply deploy project args)
"doall" (apply doall project args)
"release" (release project)

;; Help tasks
Expand Down
6 changes: 3 additions & 3 deletions src/leiningen/droid/compile.clj
Expand Up @@ -21,15 +21,15 @@
This task is necessary if you define the UI in XML and also to gain
access to your strings and images by their ID."
[{{:keys [sdk-path
target-version manifest-path res-path gen-path
out-res-path]} :android}]
[{{:keys [sdk-path target-version manifest-path res-path gen-path
out-res-path]} :android}]
(info "Generating R.java...")
(let [aapt-bin (str sdk-path "/platform-tools/aapt")
android-jar (get-sdk-android-jar sdk-path target-version)
manifest-file (io/file manifest-path)]
(ensure-paths sdk-path manifest-path res-path aapt-bin android-jar)
(.mkdirs (io/file gen-path))
(.mkdirs (io/file out-res-path))
(sh aapt-bin "package" "-f" "-m" "--auto-add-overlay"
"-M" manifest-path
"-S" res-path
Expand Down
9 changes: 5 additions & 4 deletions src/leiningen/droid/manifest.clj
Expand Up @@ -61,10 +61,11 @@
first
up up
(xml-> (attr :android:name)))]
(let [[_ pkg-name simple-name] (re-matches #"(.*\.)?(.+)" activity-name)]
(if (and pkg-name (> (count pkg-name) 1))
activity-name
(str (first (xml-> manifest (attr :package))) "." simple-name)))))
(let [[_ pkg-name simple-name] (re-matches #"(.*\.)?(.+)" activity-name)
pkg-name (if (and pkg-name (> (count pkg-name) 1))
pkg-name
(first (xml-> manifest (attr :package))))]
(str pkg-name "/." simple-name))))

(defn write-manifest-with-internet-permission
"Updates the manifest on disk guaranteed to have the Internet permission."
Expand Down

0 comments on commit 26b8f31

Please sign in to comment.