forked from wimleers/dotfiles
/
android-mode.elc
91 lines (86 loc) · 9.92 KB
/
android-mode.elc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
;ELC
;;; Compiled by andre@alex.local on Tue Jun 5 09:15:44 2012
;;; from file /Users/andre/.emacs.d/elpa/android-mode-0.1/android-mode.el
;;; in Emacs version 24.1.50.1
;;; with all optimizations.
;;; This file uses dynamic docstrings, first added in Emacs 19.29.
;;; This file does not contain utf-8 non-ASCII characters,
;;; and so can be loaded in Emacs versions earlier than 23.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(byte-code "\300\301\302\303\304\305\306\307&\210\310\311\312\313\314\315\306\301&\210\310\316\317\320\314\321\306\301&\210\310\322\323\324\314\325\306\301&\210\310\326\327\330\314\315\306\301&\210\310\331\332\333\314\315\306\301&\207" [custom-declare-group android-mode nil "A minor mode for Android application development" :prefix "android-mode-" :group applications custom-declare-variable android-mode-sdk-dir "~/Android/sdk" "Set to the directory containing the Android SDK." :type string android-mode-sdk-tool-subdirs '("tools" "platform-tools") "List of subdirectors in the SDK containing commandline tools." (repeat string) android-mode-sdk-tool-extensions '(#1="" ".bat" ".exe") "List of possible extensions for commandline tools." (repeat string) android-mode-key-prefix " " "Minor mode keys prefix." android-mode-avd #1# "Default AVD to use."] 8)
#@80 Look for AndroidManifest.xml file to find project root of android application.
(defalias 'android-root #[nil "\301\302\"\207" [default-directory locate-dominating-file "AndroidManifest.xml"] 3 (#$ . 1402)])
(defalias 'android-in-root '(macro . #[(body) "\301\302E\207" [body let ((default-directory (android-root)))] 3]))
#@267 Try to find android sdk directory through the local.properties
file in the android project base directory. If local.properties
doesn't exist, it does not contain the sdk-dir property or the
referred directory does not exist, return `android-mode-sdk-dir'
variable.
(defalias 'android-local-sdk-dir #[nil "\305 \306\307\310
!\2058 \311 !r q\210\312 \210\313
!\210eb\210\314\315\316\317#\2057 \320\321!\322 !\210\310!\2056 )*+\206= \207" [default-directory buffer local-properties sdk-dir android-mode-sdk-dir android-root "local.properties" "*android-mode*/local.properties" file-exists-p get-buffer-create erase-buffer insert-file-contents re-search-forward "^sdk.dir=\\(.*\\)" nil t match-string 1 kill-buffer] 4 (#$ . 1733)])
#@136 Find path to SDK tool. Calls `android-local-sdk-dir' to try to find locally
defined sdk directory. Defaults to `android-mode-sdk-dir'.
(defalias 'android-tool-path #[(name) "\302\303\304\305\306\307\"\"\"\206 \310\311 \"\207" [android-mode-sdk-tool-subdirs name find-if file-exists-p apply append mapcar #[(path) "\301\302\"\207" [android-mode-sdk-tool-extensions mapcar #[(ext) "\303\304\305
PE\306#\207" [path name ext mapconcat identity android-local-sdk-dir "/"] 6]] 3] error "can't find SDK tool: %s"] 7 (#$ . 2477)])
(defvar android-exclusive-processes nil)
(defalias 'android-start-exclusive-command #[(name command &rest args) "\304\305! \"?\205 \306\307\310\211
%\311\"\205 \305! B\211\207" [name android-exclusive-processes command args find intern set-process-sentinel apply start-process-shell-command #[(proc msg) "\302!\303>\205 \304\305\306!! \"\211\207" [proc android-exclusive-processes process-status (exit signal) delete intern process-name] 4]] 7])
#@61 List of Android Virtual Devices installed on local machine.
(defalias 'android-list-avd #[nil "\304\305!\306P\307!\310\311\312\313 #\203# \314\315 \"
B\311\225\202
\203- \316
!\2020 \317\320!,\207" [command output result offset android-tool-path "android" " list avd" shell-command-to-string nil 0 string-match "Name: \\(.*\\)" match-string 1 reverse error "no Android Virtual Devices found"] 4 (#$ . 3469)])
#@26 Launch Android emulator.
(defalias 'android-start-emulator #[nil "\302\230\204