Gradle打包过程

gradle时序

graph LR
init -->configure-->executeTasks

executeTasks

graph LR
transform --> packageDebug(packageDebug: 将intermediates中的产物打包成apk) --> assembleDebug

自定义task

http://blog.csdn.net/liuhongwei123888/article/details/50542104

assets的注入

packageApplication之后assemble之前可以进行assets的注入

removeUnusedResourcesTask.dependsOn variant.packageApplication
variant.assemble.dependsOn removeUnusedResourcesTask

assets位于build下的如下目录:

build\intermediates\merged_assets\debug\mergeDebugAssets\out