I'm trying to register a task in the root module t...
# gradle
s
I'm trying to register a task in the root module to call tasks in a submodule,
Copy code
tasks.register("jib") {
    dependsOn(tasks.named(":lp-server-deploy:jib"))
}
but I'm getting this error.
Copy code
* What went wrong:
A problem occurred configuring root project 'lp-server-root'.
> Could not create task ':jib'.
   > Task with name ':lp-server-deploy:jib' not found in root project 'lp-server-root'.
named
should evaluate lazily, but I feel like the
dependsOn
might be forcing it to resolve early.
g
But why? When you call jib it will execute task with this name in all modules
s
yes, and why would I want to create a docker image for all modules. I only want it for my runnable module. Therefore I only apply it to the runnable module, but I want to be able to run the task from the root module.