allprojects { apply(plugin: 'java') apply(plugin: 'jacoco') repositories { mavenCentral() } java { toolchain { languageVersion = JavaLanguageVersion.of(8) } } test { finalizedBy jacocoTestReport // report is always generated after tests run } jacocoTestReport { dependsOn test // tests are required to run before generating the report } dependencies { testImplementation platform('org.junit:junit-bom:5.11.3') testImplementation 'org.junit.jupiter:junit-jupiter' } }