The new gradle (5.x) incompatible with gradle-java-flavours. Caution

So today I’ve installed the new Android Studio (3.4) which comes with new Gradle and Gradle plug-in versions. As in the past most of my projects got broken and needed some tweaking in order to be able to build.

The only unresolvable problem is with my Safenetwork project that uses the gradle-java-flavours pluging. It fails with:

Could not get unknown property 'classesDir' for mock local test classes of type org.gradle.api.internal.tasks.DefaultSourceSetOutput.

It seems classesDir is deprecated and removed and SourceSetOutput.getClassesDir() should be used instead. It seems like a small change which is easy to get fixed but I have no experience with building/publishing gradle plugins.

Please be warned (@lionel.faber) that if you upgrade Gradle the build(s) might fail.

2 Likes

Thanks for the heads up! I’ll keep this in mind when we plan to upgrade Gradle. It might be worth it to raise an issue in the gradle-java-plugins repo. Maybe even a PR :wink:

1 Like