forked from medic/cht-android
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
51 lines (41 loc) · 1.29 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
ADB = ${ANDROID_HOME}/platform-tools/adb
EMULATOR = ${ANDROID_HOME}/tools/emulator
GRADLEW = ./gradlew
ifdef ComSpec # Windows
# Use `/` for all paths, except `.\`
ADB := $(subst \,/,${ADB})
EMULATOR := $(subst \,/,${EMULATOR})
GRADLEW := $(subst /,\,${GRADLEW})
endif
default: deploy-unbranded android-logs
branded: clean-apks assemble-all deploy-all android-logs
branded-debug: clean-apks assemble-all-debug deploy-all android-logs
clean: clean-apks
android-emulator:
nohup ${EMULATOR} -avd test -wipe-data > emulator.log 2>&1 &
${ADB} wait-for-device
android-logs:
${ADB} logcat MedicMobile:V AndroidRuntime:E '*:S' | tee android.log
deploy-unbranded:
${GRADLEW} --daemon --parallel installUnbrandedDebug
uninstall-unbranded:
adb uninstall org.medicmobile.webapp.mobile
kill:
pkill -9 emulator64-arm
clean-apks:
rm -rf build/outputs/apk/
assemble-all:
${GRADLEW} --daemon --parallel assemble
assemble-all-debug:
${GRADLEW} --daemon --parallel assembleDebug
deploy-all:
find build/outputs/apk -name \*-debug.apk | \
xargs -n1 ${ADB} install -r
url-tester:
DISABLE_APP_URL_VALIDATION=true ${GRADLEW} --daemon --parallel installUnbrandedDebug
uninstall:
adb uninstall org.medicmobile.webapp.mobile
test:
${GRADLEW} androidCheck lint test
travis: test
${GRADLEW} assemble coverageReport