I just upgraded `Gradle` to `7.3.1` from `7.1.3` a...
# gradle
n
I just upgraded
Gradle
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
Copy code
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"))
}
😶 2
v
You probably also updated AGP, because afair they reconfigure things and changed the output folder or something like that. But that shows you, 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.
n
Sorry I updated
AGP
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 🙂
v
Well, learn it. 🙂 No, I have no idea, I don't do any Android development and actually your question is "not Kotlin" anyway, so is not appropriate for this Slack anyway. You probably should ask in some Android community or look in the docs of that plugn for a changelog. But it could well be that such path changes are not mentioned, because you should never configure concrete paths anyway.
a
https://gradle.org/slack-invite is a good place to go for some questions/learning on Gradle there is a #android channel that would be a good place for this.
n
Thank you Amanda, joined 🙏 wasn’t aware it is existing
v
Why do people not read channel topics? 😕
n
Yeah it's my bad sorry 🙂