By default, “assemble” depends on “jar”. Is there a way to remove this dependency?
Motivation:
I have a Java project where I am not using the “jar” task (my project produces other artifacts).
I would like to attach the “dist” task in my project to the assemble task, but don’t want the “jar” task to run.
I have tried:
assemble.dependsOn.remove(jar)
but this fails as follows:
Removing a task dependency from a task instance is not supported
(this is Gradle 6.7.1).
Is there any way to achieve this?