How to prevent gradle build from executing test task
gradle
Solution
build depends on test via check. You probably don't want to remove the dependency on check as it may do other things, so you could try:
`check.dependsOn.remove(test)`
Do you mind if I ask why you want to do this?
Problem
I know that I can use the -x test option to prevent the test task from getting called. I also have something like this in my gradle script to prevent tests from being executed in certain cases: ``` plugins.withType(JavaPlugin).whenPluginAdded { test { doFirst { if (env.equals('prod')) { throw new StopExecutionException("DON'T RUN TESTS IN PROD!!!!") } } } } ``` but is there a way to configure the java plugin to removed the dependency between build -> test?