I have a project which has few lint warnings. For newly created changes if there are any lint warnings I want the build to fail. To do that I have added following options in gradle file.
lintOptions {
baseline file("lint-baseline.xml")
lintConfig file("lint.xml")
warningsAsErrors true
abortOnError true
}
Build fails for the newly created lint warnings. If resolved, it still fails pointing to old issues recorded in lint-baseline.xml
Error :
Lint found errors in the project; aborting build.
Fix the issues identified by lint, or add the following to your build script to proceed with errors: ... android { lintOptions { abortOnError false } } ...
Errors found:
/.../app/lint-baseline.xml: Error: 3 errors were filtered out because they are listed in the baseline file, lint-baseline.xml [LintBaseline]