I want to use different lint.xml files for release and debug build types in Android Studio. So, how can this be achieved?
When
I did not try it, but maybe something like this could help you.
tasks.whenTaskAdded { task ->
if (task.name == 'lintDebug') {
task.ext.lintXmlFileName = "lint-debug.xml"
} else if (task.name == 'lintDemo') {
task.ext.lintXmlFileName = "lint-demo.xml"
}
}
EDIT: comments feedback: