Gradle DSL method not found: 'destination()' after update to Gradle 5.2.1

前端 未结 2 1260
无人共我
无人共我 2020-12-11 01:30

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 erro

相关标签:
2条回答
  • 2020-12-11 01:47

    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")

    0 讨论(0)
  • 2020-12-11 01:48

    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")
        }
    }
    
    0 讨论(0)
提交回复
热议问题