How to Run Gradle Build Without Unit Test Cases

If for some reason you are doing some tests and your Gradle project builds over and over again and it takes a long time to build it, it could slow down your progress, one reason for your build taking a long time could be the test cases.

To disable unit test cases and do a Gradle build of your Java/Android Project you can add the option -x test to ignore them.

% ./gradlew build -x test
% gradle build -x test
Gradle Build without Unit 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:

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