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 dependencies but with no luck. My TeamCity build server uses the build task which runs the lint task so that works great. However, the android studio appears to use generateDebugSources
and compileDebugJava
tasks interchangeably when I have selected the debug build variant.
Here is what I have tried in my build.gradle:
assemble.dependsOn lint
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…