Shan
02/13/2019, 7:55 PMdependsOn("clean")
in my script, it will only execute for one of the modules.Shan
02/13/2019, 7:57 PMShan
02/13/2019, 7:59 PMdependsOn()
for cleaning and building, then manually locating the artifacts within their respective lib
folders) is the proper way to do this.tapchicoma
02/13/2019, 8:42 PMIf I click 'clean' from the Gradle window on the root of the project, it will perform the task correctly, but if I putRunningin my script, it will only execute for one of the modules.dependsOn("clean")
./gradlew clean
triggers all tasks with the same name in all modules - you can check it with ./gradlew -m clean
.
Using dependsOn("clean")
adds dependency only to one particular module "clean"
task.Shan
02/13/2019, 8:43 PMtapchicoma
02/13/2019, 9:00 PMtask cleanCache(type: Delete) {
description "Clean all local build caches (Gradle and Android)"
group "Build"
dependsOn allprojects.collect { subproject ->
subproject.tasks.matching {
it.name == 'cleanBuildCache'
}
}
delete gradle.ext.buildCacheDir
}
Shan
02/13/2019, 9:23 PM