Can Gradle task dependencies be set up to exclude a task?
<p>We have in our build a lifecycle task which is supposed to run everything to do a quick check of the code. It looks like this:</p>

<pre><code>  task minimalBuild(dependsOn: [jar, testJar, javadoc])
</code></pre>

<p>Someone said it should also run checks, which seems reasonable, except that if I depend on <code>check</code> itself, <code>check</code> depends on <code>test</code>, so all the tests will be run and it's no longer a quick build.</p>

<p>I could manually list the individual checks of course, and that is my best idea right now, but every time someone installs a new checking tool, they will have to update this list, and they might not know they have to.</p>

<p>Is there a way to do this programmatically at least? Can I make <code>minimalBuild</code> depend on "everything <code>check</code> depends on except for <code>test</code>"?</p>