Skip to content Skip to sidebar Skip to footer

Gradle Dsl Method Not Found: 'destination()' After Update To Gradle 5.2.1

After updating to Gradle 5.2.1 my build is failing with this error: Gradle DSL method not found: 'destination()' I figured out that this error has something todo with my analysis.

Solution 1:

Before Gradle 5.0 the method setDestination(Object file) was already deprecated, see here : setDestination(Object file)

In Gradle 5.x this method has been removed, you must now use setDestination(File file) which takes a File parameter (see setDestination(File file) )

So you need to change your code into:

reports {
    xml {
        destination file("$buildDir/outputs/reports/checkstyle_report.xml")
    }
}

Solution 2:

All adjustment was done in my quality.gradle. Check config folder for quality.gradle file and change all usage of

destination "$reportsDir/pmd/pmd.xml"

to

destination file("$reportsDir/pmd/pmd.html")

Post a Comment for "Gradle Dsl Method Not Found: 'destination()' After Update To Gradle 5.2.1"