Android项目随着迭代时间愈来愈长,代码废弃资源也会愈来愈多。 android
Lint Cleaner Plugin这个github源上小工具,简单易用,省去了很多麻烦。git
首先,配置一下app的build.gradle文件github
buildscript { repositories { mavenCentral() } dependencies { classpath 'com.android.tools.build:gradle:1.5.0' classpath 'com.droidtitan:lint-cleaner-plugin:0.3.0' } }
再配置module的build.gradle文件app
apply plugin: 'android' apply plugin: 'com.droidtitan.lintcleaner'
而后在项目根目录下,执行清理命令maven
gradle lintClean
或者工具
./gradlew lintClean
文章参考自:https://github.com/marcoRS/lint-cleaner-plugingradle