Home > database >  Changing enabled to required throws an error in gradle
Changing enabled to required throws an error in gradle

Time:08-31

Changing enabled to required throws an error in gradle 7.5

> Configure project :
The Report.enabled property has been deprecated. This is scheduled to be removed in Gradle 8.0. Please use the required property instead. See https://docs.gradle.org/7.5/dsl/org.gradle.api.reporting.Report.html#org.gradle.api.reporting.Report:enabled for more details.

 jacocoTestReport {
     reports {
-        xml.enabled false
-        csv.enabled false
-        html.enabled true
         xml.required false
         csv.required false
         html.required true
     }
 }

> Could not find method required() for arguments [false] on Report xml of type org.gradle.api.reporting.internal.TaskGeneratedSingleFileReport.

CodePudding user response:

required is a property, not a method. This should help:

jacocoTestReport {
    reports {
        xml.required = false
        csv.required = false
        html.required = true
    }
}

See: JaCoCo Report configuration

  • Related