How to run a Gradle build without executing tests?
Hi everyone! I'm new to Gradle and Java, and I have a problem. I have a project that builds via Gradle. When I run the `gradle build` command, the build completes successfully, but it also runs all unit tests. This is fine for a final build, but during development I often just want to compile the project and build the JAR file without running tests, because the tests take a lot of time (we have about 200 of them, and they take about 5-7 minutes). I tried looking in the documentation, but there are many different flags and I got confused.
Here is my current `build.gradle` (simplified):
```java
plugins {
id 'java'
id 'application'
}
repositories {
mavenCentral()
}
dependencies {
testImplementation 'junit:junit:4.13.2'
}
```
When I run `gradle build`, it
No answers yet.
Log in to leave an answer
Blogs
CI/CD for Java Projects: Setting Up GitHub Actions
Generics in C++: Templates, Why They Are Needed and How to Use Them
How to Write a REST API in C# in 30 Minutes: A Step-by-Step Guide
How Node.js Handles Command Line Arguments: From process.argv to the Source Code