-
Notifications
You must be signed in to change notification settings - Fork 132
/
Makefile
executable file
·89 lines (72 loc) · 2.37 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
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
87
88
89
.PHONY: check
check:
./gradlew ktlint lint;
python scripts/license-validate.py;
./gradlew clean dokkaHtml -Pmapbox.dokkaHtmlFlavor=release
.PHONY: test
test:
./gradlew test -i
.PHONY: sdk-build
sdk-build:
./gradlew assembleRelease -x app:assembleRelease -x android-auto-app:assembleRelease\
-x compose-app:assembleRelease -x extension-style-app:assembleRelease
.PHONY: proguard
proguard:
./gradlew clean;
./gradlew app:installRelease;
adb shell am start -n com.mapbox.maps.testapp/.examples.SimpleMapActivity;
xdg-open app/build/outputs/mapping/release/mapping.txt;
.PHONY: fix
fix:
./gradlew ktlintFormat
.PHONY: clean
clean:
./gradlew clean
.PHONY: codecoverage
codecoverage:
./gradlew maps-sdk:jacocoTestDebugUnitTestReport && google-chrome maps-sdk/build/jacoco/jacocoHtml/index.html
.PHONY: unit-tests
unit-tests:
./gradlew test -i
.PHONY: instrumentation-tests
instrumentation-tests:
./gradlew maps-sdk:connectedDebugAndroidTest && ./gradlew app:connectedDebugAndroidTest
.PHONY: instrumentation-clean
instrumentation-clean:
adb uninstall com.mapbox.maps.testapp || true;
adb uninstall com.mapbox.maps.testapp.test || true;
# Generates Activity sanity tests
.PHONY: generate-sanity-test
generate-sanity-test:
node scripts/sanity-test/generate-sanity-test.js
# Metalava & kotlin binary compatibility validator: check API
.PHONY: check-api
check-api:
# validate api surface for both metalava and kotlin binary compatibility validator
./gradlew checkApi;
# Metalava & kotlin binary compatibility validator: update API
.PHONY: update-api
update-api:
# generate api file for both metalava and kotlin binary compatibility validator
./gradlew updateApi;
# Metalava: update metalava version
.PHONY: update-metalava
update-metalava:
sh ./metalava/update.sh
.PHONY: start-android-auto-dhu
start-android-auto-dhu:
adb forward tcp:5277 tcp:5277;
$(ANDROID_HOME)/extras/google/auto/desktop-head-unit;
# Check permissions app module, requires app:assembleDebug first
.PHONY: check-permissions
check-permissions:
python3 scripts/check-permissions.py \
--apk app/build/outputs/apk/release/app-release.apk \
--file app/permission.json
# Update permissions app module, requires app:assembleDebug first
.PHONY: update-permissions
update-permissions:
python3 scripts/check-permissions.py \
--apk app/build/outputs/apk/debug/app-debug.apk \
--file app/permission.json \
--update True