Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

avoid lint when gradle execute check

could someone tell me a way to avoid executing "lint" each time I run in gradle check?

I've defined in build.gradle

lintOptions {       quiet true   } 

However, it keeps doing this task. The problem is that it takes ages each time I have to do a check.

like image 280
Jose M Lechon Avatar asked Jan 15 '14 16:01

Jose M Lechon


People also ask

How do you check for lint errors?

Run the lint tool on your module by right-clicking on your module folder or file in the Project View and selecting Analyze > Inspect Code. This displays the lint inspection results with a list of issues that lint detected in your module.


2 Answers

gradle build -x lint  

Source: Gradle User Guide : Excluding Tasks

like image 191
kukido Avatar answered Sep 22 '22 11:09

kukido


You can skip it using adding -x lint when you run the check task:

./gradlew check -x lint  

If you want to skip it permanently you can add this to your build.gradle before apply plugin: 'com.android.application':

tasks.whenTaskAdded { task ->     if (task.name.equals("lint")) {         task.enabled = false     } } 
like image 21
rciovati Avatar answered Sep 23 '22 11:09

rciovati