we have in our build lifecycle task supposed run quick check of code. looks this:
task minimalbuild(dependson: [jar, testjar, javadoc])
someone said should run checks, seems reasonable, except if depend on check
itself, check
depends on test
, tests run , it's no longer quick build.
i manually list individual checks of course, , best idea right now, every time installs new checking tool, have update list, , might not know have to.
is there way programmatically @ least? can make minimalbuild
depend on "everything check
depends on except test
"?
you can onfigure via taskgraph
, so:
gradle.taskgraph.whenready { graph -> if (graph.hastask(minimalbuild)) { tasks.withtype(test){ enabled = false } } }
this configuration should added root of script. waits untill execution graph ready (it contains task, should executed), after checks, whether minimalbuild
task executed , if yes, disables tasks wit test type.
Comments
Post a Comment