My project structure looks like
Root + subproj1
+ subproj2
each subproject defines its own task launch () {}. What I'm trying to do is doing: subproj1: run ,: subproj2: running in parallel with the task of starting a Root project. I tried in the root project build.gradle
task run(){
def threads = 2
def tasks = [ ":subproj1:run", ":subproj2:run" ]
tasks.each {
new Thread(){
public void run(){
dependsOn it
}
}.start();
}
}
but he makes an exception, for example
Exception in thread "Thread-12" org.gradle.api.UnknownProjectException:
Project with path ':subproj1:run' could not be found in root project 'ROOT'
How can I run a subproject task in parallel with the root project?
source
share