-
Notifications
You must be signed in to change notification settings - Fork 71
/
Makefile
60 lines (48 loc) · 2.18 KB
/
Makefile
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
APK_FILE := ./firetweet/build/outputs/apk/firetweet-fdroid-debug.apk
define pkg_variables
$(eval PACKAGE := $(shell aapt dump badging $(APK_FILE)|awk -F" " '/package/ {print $$2}'|awk -F"'" '/name=/ {print $$2}'))
$(eval MAIN_ACTIVITY := $(shell aapt dump badging $(APK_FILE)|awk -F" " '/launchable-activity/ {print $$2}'|awk -F"'" '/name=/ {print $$2}' | grep MainActivity))
endef
.PHONY: all
all: build-debug install run logcat
compile-debug:
./gradlew \
firetweet:compileFdroidDebugSources \
firetweet:compileFdroidDebugAndroidTestSources \
firetweet.component.common:compileDebugSources \
firetweet.component.common:compileDebugAndroidTestSources \
firetweet.component.jsonserializer:compileDebugSources \
firetweet.component.jsonserializer:compileDebugAndroidTestSources \
firetweet.component.nyan:compileDebugSources \
firetweet.component.nyan:compileDebugAndroidTestSources \
firetweet.component.querybuilder:compileDebugSources \
firetweet.component.querybuilder:compileDebugAndroidTestSources \
firetweet.component.twitter4j:compileDebugSources \
firetweet.component.twitter4j:compileDebugAndroidTestSources \
firetweet.component.twitter4j.streaming:compileDebugSources \
firetweet.component.twitter4j.streaming:compileDebugAndroidTestSources \
firetweet.extension.push.xiaomi:compileDebugSources \
firetweet.extension.push.xiaomi:compileDebugAndroidTestSources \
firetweet.extension.streaming:compileDebugSources \
firetweet.extension.streaming:compileDebugAndroidTestSources \
firetweet.extension.twitlonger:compileDebugSources \
firetweet.extension.twitlonger:compileDebugAndroidTestSources \
firetweet.library.extension:compileDebugSources \
firetweet.library.extension:compileDebugAndroidTestSources \
firetweet.wear:compileDebugSources \
firetweet.wear:compileDebugAndroidTestSources
build-debug:
./gradlew assembleFdroidDebug
$(APK_FILE): build-debug
install: $(APK_FILE)
adb install -r $(APK_FILE)
uninstall:
$(call pkg_variables)
adb uninstall $(PACKAGE)
run:
$(call pkg_variables)
adb shell am start -n $(PACKAGE)/$(MAIN_ACTIVITY)
logcat:
adb logcat | grep `adb shell ps | grep org.getlantern.firetweet | cut -c10-15`
clean:
./gradlew clean