From the course: Gradle for Java-Based Applications and Libraries

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Declaring JUnit dependencies

Declaring JUnit dependencies

From the course: Gradle for Java-Based Applications and Libraries

Start my 1-month free trial

Declaring JUnit dependencies

- [Instructor] The JUnit project publishes its libraries to Maven Central. You can consume those dependencies by declaring them in your build. In the previous chapter, you already learned a lot about declaring dependencies. We will expand on that knowledge here in the context of a test framework. JUnit does not provide a single dependency. It actually breaks up its functionality into different libraries. You can pick and choose which ones you need in your project. To find all JUnit dependencies, open a browser and navigate through the Maven Central search page. In the search bar, enter the group ID for JUnit 5 libraries. The group ID is org.junit.jupiter. Press the search button, and you will be presented with a list of JUnit dependencies. As you can see here, the latest version is 5.7.0. Of those dependencies, we will need two at a minimum in our project, the JUnit Jupiter API and the JUnit Jupiter engine. The…

Contents