diff --git a/build.gradle b/build.gradle index f49ba7fc28..e04e8e93c3 100644 --- a/build.gradle +++ b/build.gradle @@ -321,23 +321,22 @@ configure(javaProjects) { subproject -> compileKotlin.dependsOn updateCopyrights jacocoTestReport { + onlyIf { System.properties['sonar.host.url'] } + dependsOn test reports { - csv.required = false + xml.required = true html.required = false - xml.outputLocation = file("${buildDir}/reports/jacoco/test/jacocoTestReport.xml") } } + rootProject.tasks['sonarqube'].dependsOn jacocoTestReport + test { maxHeapSize = '2g' jvmArgs '-XX:+HeapDumpOnOutOfMemoryError' jacoco { destinationFile = file("$buildDir/jacoco.exec") } - - if (System.properties['sonar.host.url']) { - finalizedBy jacocoTestReport - } } task testAll(type: Test, dependsOn: [':checkAsciidocLinks', 'check'])