dependsOn submodule task from plugin

I am using the jib plugin to deploy a docker container for a multimodule spring boot project. The project has many submodules, one of them being a deploy module. I am applying the Jib plugin to this submodule using a company plugin.

We also have many other projects, not all which are multimodule projects. I’m attempting to get our jenkins build working by running the jib task from the root, so it will work for all projects, but I am unable to create a task in the root project that dependsOn the jib task from a submodule. I believe this is an issue with the kotlin-dsl, as what the gradle guide says is exactly what I’m doing in order to avoid eager configuration.

tasks.register("jib") {

gives me the error

Task with name ':lp-server-deploy:jib' not found in root project 'lp-server-root'.