For AI agents: the documentation index is at https://docs.gradle.org/llms.txt. Request any page with the header Accept: text/markdown to get Markdown. User manual pages are also available as Markdown by replacing .html with .md in the URL.

useJUnit

abstract fun useJUnit()(source)

Use the JUnit4 testing framework.

Gradle will provide the version of JUnit4 to use. Defaults to version 4.13.2

Since

7.3


abstract fun useJUnit(version: String)(source)

Use the JUnit4 testing framework with a specific version.

Since

7.3

Parameters

version

version of JUnit4 to use


abstract fun useJUnit(version: Provider<String>)(source)

Use the JUnit4 testing framework with a specific version.

Since

7.6

Parameters

version

provider supplying the version of JUnit4 to use