原文:https://zeroturnaround.com/rebellabs/making-gradle-builds-faster/
对build过程进行配置实现编译优化:
首先要配置java环境:https://www.jianshu.com/p/5fe13447a6b7
在项目的控制台输入命令:
./gradlew :app:assembleDebug --dry-run

由于我当前项目文件夹的权限不够,所以要先提权。

下载完之后会进行一系列的配置

显示编译的详细时间
./gradlew :app:assembleDebug --dry-run --profile
项目目录的build/reports/profile下就会出现一个html文件,讲它在浏览器中打开,里面显示了编译的几个环节以及所需的时间:


网友评论