Run Gradle Build without test cases


If you are trying to run your project from your IDE as you are trying to fix or develop something, it could be annoying to have the test cases run before every build as it takes up a lot of time.

If you want to skip the test cases and just perform a Gradle Build, you can do that by adding a flag -x or --exclude-task followed by test.


Windows:
./gradlew build -x test

Linux/macOS:
gradlew build -x test
Gradle Build without test cases

Facing issues? Have Questions? Post them here! I am happy to answer!

Author Info:

Rakesh (He/Him) has over 14+ years of experience in Web and Application development. He is the author of insightful How-To articles for Code2care.

Follow him on: X

You can also reach out to him via e-mail: rakesh@code2care.org

Copyright © Code2care 2024 | Privacy Policy | About Us | Contact Us | Sitemap