stt*_*nko 8 lint gradle android-gradle-plugin
有谁知道是否可以在多模块 Android 项目中为 Lint 检查设置单个 Gradle 任务?目的是为所有模块(应用程序 + 一些 Android 库)提供唯一的 HTML/XML 报告。
为此,仅在其他模块用作依赖项的模块中配置 android lint 并checkDependencies在lintOptions.
前任:
有一个名为的应用程序模块app,它使用feature_1, feature_2,feature_3库模块作为依赖项,因此设置checkDependencies为truein lintOptionsof appmodule build.gradlefile。
android{
lintOptions{
checkDependencies true // <---
xmlReport false
htmlReport true
htmlOutput file("${project.rootDir}/build/reports/android-lint.html")
}
}
Run Code Online (Sandbox Code Playgroud)
注意:
当您运行./gradlew lint它时,将为每个模块build/reports目录中的每个依赖模块生成报告,但是将在指定位置生成包含与项目相关的所有 lint 问题的报告。
参考:https : //groups.google.com/d/msg/lint-dev/TpTMBMlwPPs/WZHCu59TAwAJ
| 归档时间: |
|
| 查看次数: |
780 次 |
| 最近记录: |