Can't upgrade my gradle 4.4.1 to 5.0+. Error in spotbugs

A problem occurred configuring root project ‘ME_QMONEY_MODULE_GRADLE’.

Could not create task ‘:spotbugsTest’.
Could not create task of type ‘SpotBugsTask’.
Could not create an instance of type com.github.spotbugs.internal.SpotBugsReportsImpl.

It seems you have checkstyle issues in your code?
There’s no other problem other than that.
Refer to the following FAQ, in order to resolve the checkstyle issues efficiently