plugins { id 'java' id 'jacoco' id 'application' } group = 'com.geektrust' version = '1.0' sourceCompatibility = 1.8 targetCompatibility = 1.8 jacoco { //Please do not change this toolVersion = "0.8.4" reportsDir = file("$buildDir/jacoco") } jacocoTestReport { //Please do not change this reports { xml.enabled true csv.enabled false html.enabled false xml.destination file("./jacoco.xml") } } application { mainClassName = 'com.geektrust.backend.App' } jar { archiveBaseName = 'geektrust' //Please do not change this final artifact name version = null //Please do not change this final artifact version manifest { attributes 'Main-Class' : 'com.geektrust.backend.App' //Change this to the main class of your program which will be executed } // To create a single jar with all dependencies. from { configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } } { exclude "META-INF/*.SF" exclude "META-INF/*.DSA" exclude "META-INF/*.RSA" } } repositories { mavenCentral() } dependencies { testCompile 'org.mockito:mockito-junit-jupiter:3.3.3' testCompile 'org.junit.jupiter:junit-jupiter:5.4.2' } test { ///Please do not change this useJUnitPlatform() testLogging { events "PASSED", "SKIPPED", "FAILED", "STANDARD_ERROR" } finalizedBy jacocoTestReport // report is always generated after tests run afterSuite { desc, result -> if (!desc.parent) println("${result.resultType} " + "(${result.testCount} tests, " + "${result.successfulTestCount} successes, " + "${result.failedTestCount} failures, " + "${result.skippedTestCount} skipped)") } }