ajoberstar/gradle-git-publish

GitPublishReset uses deprecated ProjectLayout.directoryProperty() method

Closed this issue · 10 comments

With Gradle 5.0, getting the following warning that is coming from this plugin:

The ProjectLayout.directoryProperty() method has been deprecated. This is scheduled to be removed in Gradle 6.0. Please use the ObjectFactory.directoryProperty() method instead.

Thanks for the report. I'll have to see if there's a way to maintain compatibility with Gradle 4 but stil eliminate the deprecation warning.

@ajoberstar You can use the project.objects.directoryProperty() since version 4.0 in place of this to fix it.

I've submitted #71 to address this issue.

As far as I can see, GitPublishReset still uses the deprecated method, doesn’t it?

Do you mean that you still get a deprecation warning when running it or that the commit doesn't look like the right change?

There is still a call to layout's directoryProperty but only if not on Gradle 5.

I am still seeing the warning with Gradle 5.3 even after upgrading to the 2.1.0 plugin version.

There were two places that used the deprecated method: GitPublishExtension and GitPublishReset. You've only replaced the former in 739e3e6 while the latter is unchanged, isn't it?

Ah, missed that there were two of these in your PR. Pushed up a 2.1.1-rc.1. Let me know if it's resolved now.

That seems to have fixed it for me

Final 2.1.1 is out now.