Deprecated Gradle features warnings

I’ve been seeing a warning in my build scripts like this:

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0

I’ve reproduced this in a basic JavaFX app and to get some additional information I’ve run the following:

./gradlew run --warning-mode all --stacktrace

> Configure project :
Project : => '' Java module
The AbstractCompile.destinationDir property has been deprecated. This is scheduled to be removed in Gradle 9.0. Please use the destinationDirectory property instead. Consult the upgrading guide for further information:
        at org.gradle.api.tasks.compile.AbstractCompile.getDestinationDir(
        at org.gradle.api.tasks.compile.JavaCompile_Decorated.getDestinationDir(Unknown Source)
        at org.javamodularity.moduleplugin.tasks.MergeClassesHelper$GradleTaskWrapper.getDestinationDir(
        at org.javamodularity.moduleplugin.tasks.MergeClassesTask.lambda$configureMergeClassesAfterEvaluate$2(
        at java.base/$StreamBuilderImpl.forEachRemaining(
        at java.base/$ConcatSpliterator.forEachRemaining(

I’ve truncated the stack trace, but to me the cause of the deprecation warning is coming from the gradle task.

Is anyone else seeing this and is this a bug?

No, the deprecation warning is logged by getDestinationDir, but the problem is the one calling that method.
In your case it is the Java Modularity plugin.
I would anyway recommend to not use it, but to use the built-in JPMS support.
If you don’t apply the plugin manually, you should update the JavaFX plugin, as from 0.1.0 on it does not auto-apply the Java Modularity plugin anymore.

Hi @Vampire

Yes that was exactly the problem. I wasn’t using the Java Modularity plugin, but the JavaFX plugin 0.0.14 was the cause, Switching to 0.1.0 as you point out resolves the warning messages.

I’m ready for Gradle 9!


1 Like