plugins { id 'java' } group = 'com.example' version = '1.0-SNAPSHOT' repositories { mavenCentral() } dependencies { // JUnit 5 (Jupiter) testImplementation 'org.junit.jupiter:junit-jupiter-api:5.10.1' testImplementation 'org.junit.jupiter:junit-jupiter-params:5.10.1' testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.10.1' // JUnit 4 testImplementation 'junit:junit:4.13.2' // JUnit Vintage to run JUnit 4 tests with JUnit 5 testRuntimeOnly 'org.junit.vintage:junit-vintage-engine:5.10.1' } test { useJUnitPlatform() } java { sourceCompatibility = JavaVersion.VERSION_11 targetCompatibility = JavaVersion.VERSION_11 }