Diagnosing Gradle upgrades and buildSrc errors

96 Views Asked by At

I currently have an issue where, after trying to switch from Gradle 6.9.3 to 7.3.3, my :buildSrc:compileGroovy target fails with a NoClassDefFoundError on LoggingManagerInternal, which was a class removed in Gradle 7. The stack trace does not have appear to point to anywhere within the project code.

What would be the best way about diagnosing this issue, where it came from, and how it can be fixed?

1

There are 1 best solutions below

0
On

In my project, it was using an old version of the gradle-docker-plugin, 'com.bmuschko:gradle-docker-plugin:6.7.0', but in a directory within my project called buildSrc. In buildSrc, there was another build.gradle file I was not aware of, which had an old version of the plugin calling the old gradle API.

My solution was to update that gradle plugin version from 4.6.2 to 6.7.0, and that got me to my next issue in the upgrade.