Hi,
I am maintaining a Gradle plugin that still supports Gradle versions down to 7.4. Since 8.11, a deprecation warning is shown when running the plugin: “The ProjectDependency.getDependencyProject() method has been deprecated.”
I followed the instructions to address this, and the warning is not shown anymore.
However, I now use ProjectDependency.getPath() or rather ProjectDependency.path where previously I used the now deprecated method.
The new method is documented with “@since 8.11”, so I expected this change to break backwards compatibility with the older Gradle versions. But the project uses compatibility tests (using GradleRunner) for different Gradle versions, down to 7.4, and to my surprise, they all pass.
What am I missing here? I will check the compatibility tests once more to see if accidentally the wrong Gradle version is used. Because, this cannot be true, or can it? Does the Gradle API somehow do some magic behind the scenes to support this?
I am really a little bit confused.