Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New deprecation warnings with Gradle 6.0-rc-1 #153

Closed
huxi opened this issue Oct 27, 2019 · 4 comments · Fixed by #159
Closed

New deprecation warnings with Gradle 6.0-rc-1 #153

huxi opened this issue Oct 27, 2019 · 4 comments · Fixed by #159
Assignees

Comments

@huxi
Copy link

huxi commented Oct 27, 2019

The following is printed while executing forbiddenApis with --warning-mode all Gradle option with Gradle 6.0-rc-1 and de.thetaphi:forbiddenapis:2.7.

Property 'classesDir' is not annotated with an input or output annotation. This behaviour has been deprecated and is scheduled to be removed in Gradle 7.0.
Property 'patternSet' is not annotated with an input or output annotation. This behaviour has been deprecated and is scheduled to be removed in Gradle 7.0.
@uschindler
Copy link
Member

uschindler commented Oct 28, 2019

Hi,
those are not problems, as the correct annotation is there (deprecated property shadowing another one). e.g., classesDir is only available as a setter for backwards compatibility for older Gradle versions. The "correct" property to use is "classesDirs".

The documentation is not clear what this means after 7.0.

@uschindler
Copy link
Member

patternSet is a shadow of includes / exlcudes. It's there to implement an interface. I have to figure out how other Gradle-internal tasks handle this. Maybe there is another annotation to prevent this warning from appearing (e.g. @AlreadyDefinedAsInputAndIKnowWhatIAmDoing)

@uschindler uschindler self-assigned this Oct 28, 2019
@uschindler
Copy link
Member

Looks like https://docs.gradle.org/6.0-rc-1/javadoc/org/gradle/api/model/ReplacedBy.html is the way to go for the first example.

@uschindler
Copy link
Member

Unfortunately it's since Gradle 5.4, so it can't be added, sorry! But https://docs.gradle.org/6.0-rc-1/javadoc/org/gradle/api/tasks/Internal.html can be used as workaround.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

2 participants