forked from androidmalin/AndroidComponentPlugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmatrix.sh
executable file
·36 lines (33 loc) · 1.32 KB
/
matrix.sh
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
#!/bin/bash
./gradlew clean && ./gradlew assembleRelease \
#需要配置ANDROID_HOME环境变量 /User/malin/sdk
#需要下载ndk 16.1.4479499 /User/malin/sdk/ndk/16.1.4479499
root=`pwd`
android_sdk_home=$ANDROID_HOME
ndk=$android_sdk_home/ndk/16.1.4479499/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-nm
echo $root
echo $android_sdk_home
echo $ndk
java -jar ./analyze/matrix-apk-canary-2.0.0.jar \
--apk $root/app/build/outputs/apk/release/app-release.apk \
--unzip $root/app/build/apk-checker-result \
--mappingTxt $root/app/build/outputs/proguard/release/mapping/mapping.txt \
--output $root/app/build/apk-checker-result \
--format "mm.html","mm.json" \
--log v \
-manifest \
-fileSize --min 10 --order desc --suffix "png", "jpg", "jpeg", "gif", "arsc" \
-countMethod --group "package" \
-checkResProguard \
-findNonAlphaPng --min 10 \
-checkMultiLibrary \
-uncompressedFile --suffix "png", "jpg", "jpeg", "gif", "arsc" \
-countR \
-duplicatedFile \
-checkMultiSTL --toolnm $ndk \
-unusedResources --rTxt $root/app/build/intermediates/runtime_symbol_list/release/R.txt --ignoreResources "R.raw.*","R.style.*","R.attr.*","R.id.*","R.string.ignore_*" \
-unusedAssets --ignoreAssets "*.so" \
-unstrippedSo --toolnm $ndk \
-countClass --group package \
sleep 2 && \
open $root/app/build/apk-checker-result.html