nuhkoca
10/25/2022, 12:17 PMGradle
to 7.3.1
from 7.1.3
and below task is not generating jacoco
folders anymore. Anybody knows why? Couldn’t find the release notes about what’s been done on Jacoco
tasks.register('jacocoTestReport', JacocoReport) {
dependsOn("testDebugUnitTest")
group = "Reporting"
description = "Generates code coverage report for the test task."
reports {
html.required = true
xml.required = true
}
def javaTree = fileTree(
dir: "$buildDir/intermediates/javac/debug",
excludes: coverageExcludes
)
def kotlinTree = fileTree(
dir: "$buildDir/tmp/kotlin-classes/debug",
excludes: coverageExcludes
)
classDirectories.setFrom(files([javaTree, kotlinTree]))
def coverageSourceDirs = [
"$projectDir/src/main/java",
"$projectDir/src/main/kotlin"
]
sourceDirectories.setFrom(files(coverageSourceDirs))
executionData.setFrom(files("$buildDir/outputs/unit_test_code_coverage/debugUnitTest/*.exec"))
}
Vampire
10/25/2022, 12:50 PMnuhkoca
10/25/2022, 1:14 PMAGP
not Gradle
my bad! Is there any place you read or heard what are the changed they’ve done?
that is a horribly bad idea to configure paths and manual task dependencies. Instead wire task output to task inputs, then it doesn’t matter if the location changes and you get the necessary task dependencies implicitly wherever necessary.You say good things but unfortunately I have zero knowledge how to do that 🙂
Vampire
10/25/2022, 1:16 PMAmanda Martin
10/25/2022, 9:12 PMnuhkoca
10/25/2022, 10:07 PMVampire
10/26/2022, 6:48 AMnuhkoca
10/26/2022, 9:52 AM