In Eclipse > Menu bar "Windows" > Preferences > left side: Gradle> Arguments > Program Arguments > put -x test
and
Under Eclipse > Menu bar "Windows" > Preferences > on the left: Gradle EnIDE> check the box next to the line -x test (--exclude-task test) or use gradle assemble .
See if that helps. Make sure GRADLE_HOME is installed / known for Eclipse.

UPDATE:
This will stop the test task from any project (as global). If you just want to run gradle clean build -x test or the like (from time to time and only in some project), follow these steps:
- In the GRADLE_HOME / init.d folder, create a global shared file named
shenzi.gradle In this shared file, add the following:
allprojects{ apply plugin: 'java' apply plugin: 'groovy' // blah blah uncomment if you need. //apply plugin: 'pmd' //apply plugin: 'findbugs' //apply plugin: 'checkstyle' //apply plugin: 'jacoco' tasks.withType(Compile) { options.debug = true options.compilerArgs = ["-g"] } // .. // .. more code exists here for commented out lines as shown above, so ignore this in your version // .. task myAliasNoTestBuild() << { // see link below on how to create alias tasks } }
OR
try this solution: https://www.mail-archive.com/ user@gradle.codehaus.org /msg09173.html
OR
How to prevent gradle creation from running a test task
Arun sangal
source share