Disable `lint` in Android gradle

From the Project site Android Tools Android Gradle Plugin User Guide . I know that you can prevent an Android lint build from being interrupted by:

lintOptions { abortOnError false } 

I also know that lint can be disabled for releases:

 lintOptions { checkReleaseBuilds false } 

However, is it possible to completely disable lint at startup, for example. gradle assembleDebug ?

I know about the risks, and for this particular project he spends a lot of time, taking into account all the tastes of the assembly that we have.

+10
source share
2 answers

Of course, you can do this by adding this line to your gradle.properties file:

 gradle=build -x lint -x lintVitalRelease 

Warning : the above line will prevent lint from starting for both debug and release builds!

If you want to know more about hacker games, quick builds, and performance improvements, these will be the best slides you'll see: Mastering Gradle 3.0

I prepared this from many different resources, including Android Developer & Gradle documentation, videos for Android developers, etc. - I hope this helps! It really matters a lot in build time (both growth and project load time)

0
source

Add the following lines of code to build.gradle (application).

 android { lintOptions { checkReleaseBuilds false //If you want to continue even if errors found use following line abortOnError false } } 
0
source

All Articles