forked from mapbox/mapbox-maps-android
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
executable file
·127 lines (107 loc) · 3.63 KB
/
Makefile
File metadata and controls
executable file
·127 lines (107 loc) · 3.63 KB
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
.PHONY: check
check:
./gradlew ktlint lint;
python scripts/license-validate.py;
sh scripts/kdoc-validate.sh;
.PHONY: test
test:
./gradlew test -i
.PHONY: build
build:
./gradlew sdk-base:assembleRelease;
./gradlew sdk:assembleRelease;
./gradlew extension-style:assembleRelease;
./gradlew extension-localization:assembleRelease;
./gradlew extension-androidauto:assembleRelease;
./gradlew module-telemetry:assembleRelease;
./gradlew plugin-animation:assembleRelease;
./gradlew plugin-annotation:assembleRelease;
./gradlew plugin-attribution:assembleRelease;
./gradlew plugin-compass:assembleRelease;
./gradlew plugin-gestures:assembleRelease;
./gradlew plugin-locationcomponent:assembleRelease;
./gradlew plugin-logo:assembleRelease;
./gradlew plugin-overlay:assembleRelease;
./gradlew plugin-scalebar:assembleRelease;
./gradlew plugin-lifecycle:assembleRelease;
# Use `make checkApi TAG=ReleaseTag` to check the release tag or `make checkApi` to check current branch while running locally.
# Note: if run locally, execute `mbx env` and `./gradlew assembleRelease` first.
.PHONY: checkApi
checkApi:
unset GITHUB_TOKEN; \
echo "$(shell mbx-ci github reader token)" > gh_token.txt;\
sh scripts/java-api-check-all.sh "$(TAG)"
# Note: if run locally, execute `mbx env` first.
.PHONY: checkChangelog
checkChangelog:
unset GITHUB_TOKEN; \
echo "$(shell mbx-ci github reader token)" > gh_token.txt;\
sh scripts/check-changelog.sh
.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: sdkRegistryUpload
sdkRegistryUpload:
./gradlew mapboxSDKRegistryUpload;
.PHONY: sdkRegistryPublish
sdkRegistryPublish:
python3 -m pip install git-pull-request;
./gradlew mapboxSDKRegistryPublishAll;
.PHONY: clean
clean:
./gradlew clean
.PHONY: codecoverage
codecoverage:
./gradlew sdk:jacocoTestDebugUnitTestReport && google-chrome sdk/build/jacoco/jacocoHtml/index.html
# Use `make generate-changelog TAG=LastReleaseTag` while running locally.
.PHONY: generate-changelog
generate-changelog:
unset GITHUB_TOKEN; \
export GITHUB_TOKEN=$(shell mbx-ci github reader token); \
changelog-draft -b main -p $(TAG) -o CHANGELOG.md
# Use `make update-android-docs TAG=YourReleaseTag` while running locally.
# Run `make prepare-release-doc` first in the internal repository,
# Note: if run locally, execute `mbx env` first.
.PHONY: update-android-docs
update-android-docs:
unset GITHUB_TOKEN; \
echo "$(shell mbx-ci github writer private token)" > gh_token.txt;\
sh scripts/update-android-docs.sh -s $(TAG)
.PHONY: unit-tests
unit-tests:
./gradlew test -i
.PHONY: instrumentation-tests
instrumentation-tests:
./gradlew 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:
./gradlew checkApi;
./gradlew apiCheck;
# Metalava & kotlin binary compatibility validator: update API
.PHONY: update-api
update-api:
./gradlew updateApi;
./gradlew apiDump;
# 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;