I know that I can use the -x test option to prevent the calling task from being called. I also have something like this in my gradle script to prevent tests from running 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 remove the dependency between build-> test?
gradle
bmurmistro
source share