Reputation: 37600
In my main grade.build file I have the following:
...
preBuild.dependsOn 'copyConfigFile'
task copyConfigFile(type: Copy) {...}
apply from: 'dirLocation/other.gradle'
import com.android.builder.core.DefaultManifestParser
android {...}
There is a task in other.grade which I tried add as another preBuild dependency but gradle says the task can't be found in project :app.
Upvotes: 0
Views: 1205
Reputation: 1693
You can use gradle.taskGraph.whenReady, here is an example:
task installDebug
gradle.taskGraph.whenReady {
installDebug.dependsOn 'projectA:projectB:installDebugExecutable'
}
Upvotes: 1