Setting up JUnit 5 with Gradle

Gradle is another build tool, and a popular alternative to Maven for JVM-based projects.

We’ll take the same test class FirstTest.java to demonstrate how to add the JUnit 5 dependency to a Gradle project.

Create Gradle project in IntelliJ

Learn how to create a Gradle project using IntelliJ.

  • Go to “File” -> ”New” -> ”Project”, and select “Gradle” in the “New Project” window. Then, click “Next.”

Get hands-on with 1200+ tech skills courses.