I would like to be able to run the lint task when I\'m building projects with the android studio to ensure the lint rules are being followed.
I have tried using task
Just modifying answer of @Yoel Gluschnaider
For me if I use Val it shows error like this :
Could not set unknown property 'lintTask' for object of type com.android.build.gradle.internal.api.ApplicationVariantImpl.
So I replace it
applicationVariants.all {
def lintTask = tasks["lint${name.capitalize()}"]
assembleProvider.get().dependsOn.add(lintTask)
}
and it work fine!!