Gradle 6.0 deprecation warning for JacocoReport configuration

后端 未结 1 1588
一整个雨季
一整个雨季 2021-02-18 12:51

The following Gradle task, which configures JacocoReportBase:

task jacocoRootReport(type: JacocoReport) {
    ...
    sourceDirectories = files(subprojects.sourc         


        
相关标签:
1条回答
  • 2021-02-18 13:34

    There is a setter .from, which works alike this:

    task jacocoRootReport(type: JacocoReport) {
        ...
        sourceDirectories.from = subprojects.sourceSets.main.allSource.srcDirs
        additionalSourceDirs.from = subprojects.sourceSets.main.allSource.srcDirs
        classDirectories.from = subprojects.sourceSets.main.output
        executionData.from = subprojects.jacocoTestReport.executionData
        ...
    }
    
    0 讨论(0)
提交回复
热议问题