Closed benmusson closed 6 months ago
I don't think the dependency on assemble is actually necessary, since deploy should already have inferred dependencies on signModule and zipModule.
Assemble is only'mustRunAfter
, which merely insures that deploy
runs after assemble if assemble is already on the task graph. It won't add it to the graph if it doesn't exist, it's an order directive, not a binding dependency.
Do you have an SSCCE you could show to reproduce the error? Do you have the base plugin applied to your root project to establish lifecycle tasks?
Also, what happens when you run gradlew :assemble
, which calls the assemble class explicitly on the root project? I wonder if you'll get the same error.
Yes, calling gradlew :assemble
produces the same error. If I add an assemble task to my root project with tasks.register("assemble")
, I can get the deployModl
task to run but then receive another error:
In plugin 'io.ia.sdk.modl' type 'io.ia.sdk.gradle.modl.task.Deploy' property 'module' has @Input annotation used on property of type 'RegularFileProperty'.
I'm running gradle 8.5.
I'll try and put together an example as a repo, and will link it back here.
https://github.com/benmusson/ignition-module-monorepo-example
This is an example of the project structure I'm trying to use.
Expected behavior: Running gradlew deployModl
at the repository root should build and deploy all included modules.
Observed error:
gradlew deployModl
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':modules:example-module:deployModl'.
> Task with path ':assemble' not found in project ':modules:example-module'.
What works:
gradlew assemble
...
BUILD SUCCESSFUL in 832ms
What doesn't work:
gradlew :assemble
FAILURE: Build failed with an exception.
* What went wrong:
Cannot locate tasks that match ':assemble' as task 'assemble' not found in root project 'ignition-module-monorepo-example'.
There shouldn't need to be an assemble task on the root project, the plugin should depend on the assemble task of the project it is applied to.
Suggested fix in #45
Solved by adding base plugin to my root project.
On v0.1.1,
.\gradlew deployModl
fails with errorTask with path ':assemble' not found in project ...
.I can manually run
.\gradlew assemble
successfully.