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

前端 未结 2 1264
无人共我
无人共我 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条回答
  •  慢半拍i
    慢半拍i (楼主)
    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")
        }
    }
    

提交回复
热议问题