GithubHelp home page GithubHelp logo

aarpackagesize's Introduction

快速批量统计aar包大小

本项目可简单快速产出AAR在APK中的大小。

Demo效果

克隆本工程在终端使用python执行如下脚本:

python AarPackageSize.py

使用

使用以下命令获取依赖树,在app模块目录下执行如下命令会得到一个名为depends.txt结果文件:

../gradlew -q dependencies --configuration releaseRuntimeClasspath > depends.txt

将depends.txt文件复制到本工程下覆盖原文件,在工程根目录下执行python命令,可以在终端看到执行的过程及结果:

python AarPackageSize.py

注意事项

  1. 根据实际情况修改app的so架构,默认为armeabi-v7a
  2. 将aar所在的仓库地址配置在本工程中
  3. 在config.json文件中配置依赖分组
  4. 在order.json文件中配置结果输出顺序

快速统计指定aar大小

1.将aar所在的仓库地址配置在本工程中
2.将需要单独统计的aar依赖添加到aarlist.json文件中:

[
  "com.github.bumptech.glide:annotations:4.12.0",
  "com.github.bumptech.glide:disklrucache:4.12.0",
  "com.github.bumptech.glide:gifdecoder:4.12.0",
  "com.github.bumptech.glide:glide:4.12.0"
]

3.执行python3 LocalAarListSize.py即可:

License

Copyright 2021 yuweiguocn

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

aarpackagesize's People

Contributors

yuweiguocn avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.