Reputation: 1275
In my android app, it takes approximately more than 3 minutes to build the app. If I browse through the build tasks one by one, I noticed that app:lintDebug
takes the considerable amount of minutes (more than 1 minute)
It is quite annoying and i was aware to disable lint check , by putting these settings
lintOptions {
tasks.lint.enabled = false
quiet false
abortOnError false
ignoreWarnings false
warningsAsErrors true
checkReleaseBuilds false
}
Also in the top of the file
tasks.whenTaskAdded { task ->
if (task.name == "lint") {
task.enabled = false
}
}
Also I have checked the offline Gradle build aswel.
But yet
Is there any others settings that i need to put to stop this?
Upvotes: 0
Views: 327
Reputation: 1275
Finally i got it done by using a different task name , the gradle build for lint check has placed as lintDebug instead of lint updated skipping lint check should placed as follow
tasks.whenTaskAdded { task ->
if (task.name == "lintDebug") {
task.enabled = false
}
}
Upvotes: 0
Reputation: 111
Actually build time depends on your module count. I give you some advice which use on my project(7 module)
Upvotes: 1
Reputation: 1105
Try to work on offline mode after adding dependencies.If you want to add more dependencies just disable offline mode add dependency and then again enable offline mode. This will save a lot of your build time.I am working on a large project where build time on online mode is almost an hour while on offline mode it took some minutes to build.
To enable or disable offline mode go to:
-> File
-> Settings
-> Build,Execution,Development -> Gradle
-> Checked or unchecked offline work
Upvotes: 0