Следующая задача Gradle, которая настраивает JacocoReportBase :
task jacocoRootReport(type: JacocoReport) {
...
sourceDirectories = files(subprojects.sourceSets.main.allSource.srcDirs)
additionalSourceDirs = files(subprojects.sourceSets.main.allSource.srcDirs)
classDirectories = files(subprojects.sourceSets.main.output)
executionData = files(subprojects.jacocoTestReport.executionData)
...
}
, выдает эти предупреждения при сборке с ./gradlew assembleDebug --warning-mode all
:
The JacocoReportBase.setSourceDirectories(FileCollection) method has been deprecated.
This is scheduled to be removed in Gradle 6.0. Use getSourceDirectories().from(...)
at tasks_1p10s36ydq4k8rroeiucekewi$_run_closure6.doCall(.../tasks.gradle:152)
The JacocoReportBase.setAdditionalSourceDirs(FileCollection) method has been deprecated.
This is scheduled to be removed in Gradle 6.0. Use getAdditionalSourceDirs().from(...)
at tasks_1p10s36ydq4k8rroeiucekewi$_run_closure6.doCall(.../tasks.gradle:151)
The JacocoReportBase.setClassDirectories(FileCollection) method has been deprecated.
This is scheduled to be removed in Gradle 6.0. Use getClassDirectories().from(...)
at tasks_1p10s36ydq4k8rroeiucekewi$_run_closure6.doCall(.../tasks.gradle:153)
The JacocoReportBase.setExecutionData(FileCollection) method has been deprecated.
This is scheduled to be removed in Gradle 6.0. Use getExecutionData().from(...)
at tasks_1p10s36ydq4k8rroeiucekewi$_run_closure6.doCall(.../tasks.gradle:154)
Как использоватьсовместимый с Gradle 6.0 синтаксис (как предполагает предупреждение об устаревании) для применения желаемых значений с этими методами (которые по своему названию кажутся получателями, а не установщиками):
getAdditionalSourceDirs().from(...)
getSourceDirectories().from(...)
getClassDirectories().from(...)
getExecutionData().from(...)
?