This paper introduces the use of AarPackageSize, a fast statistical AAR size project, and the matters needing attention.
Qin Mingyue Han guan, thousands of long March people have not yet. But make dragon city fly will be in, do not teach Huma degree Yin Mountain. Wang changling –
Effect of the Demo
To clone the project, run the following script on the terminal using Python:
python AarPackageSize.py
Copy the code
use
To obtain the dependency tree, run the following command in the app module directory to get a result file named depends. TXT:
../gradlew -q dependencies --configuration releaseRuntimeClasspath > depends.txt
Copy the code
Copy the depends. TXT file to the project and overwrite the original file. Run the Python command in the root directory of the project, and you can see the execution process and result in the terminal:
python AarPackageSize.py
Copy the code
Matters needing attention
- Modify app SO architecture according to actual situation, default is Armeabi-V7A
- The warehouse address of aar is configured in this project
- Configure dependency grouping in the config.json file
- Configure the output order of results in the order.json file
The project address
- Github.com/yuweiguocn/…
For more information, see fast Batch Counting AAR sizes in 58.com practice
Follow me by searching “yuweiguocn” on wechat