I want to run the Android Lint both locally (IDE) and on the CI.
I have a task like this, which I want the abortOnError
as true
when run on CI but false
when ran locally.
task lintCI {
outputs.upToDateWhen { false }
subprojects.each { project ->
dependsOn(project.tasks.matching { (it.name == 'lint') })
}}
I have tried
project.android {
lintOptions {
warningsAsErrors true
abortOnError false
}
}
but I am getting Android tasks have already been created.
Any Idea how to change these options per task ?