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

Deprecation warning with Gradle 4.0-rc-1 #120

Closed
huxi opened this issue May 30, 2017 · 8 comments · Fixed by #124
Closed

Deprecation warning with Gradle 4.0-rc-1 #120

huxi opened this issue May 30, 2017 · 8 comments · Fixed by #124
Assignees
Milestone

Comments

@huxi
Copy link

huxi commented May 30, 2017

The following deprecation warning is generated with Gradle 4.0-rc-1:

Using a single directory for all classes from a source set. This behaviour has been deprecated and is scheduled to be removed in Gradle 5.0
	at de.thetaphi.forbiddenapis.gradle.CheckForbiddenApis_Decorated.getClassesDir(Unknown Source)

Output above is generated with --stacktrace option, grepping the stacktrace elements on thetaphi.

@uschindler
Copy link
Member

uschindler commented May 31, 2017

Thanks for the hint. Up to now I have no idea how to fix this proerly, because the current Gradle plugin compiles against version 2.3 of Gradle and I don't plan to release an update in a minor version, as this change would break it for users with all earlier Gradle versions.

I think I can fix this with the next major version of forbiddenapis, but I have no idea what the correct fix is. I'd suggest to wait for the official Gradle documentatation about this. Up to now I have not found anything about this on the net. This is just a warning and I see no urgency. It looks like many plugins are affected by this.

@uschindler
Copy link
Member

@uschindler uschindler self-assigned this May 31, 2017
@hakanai
Copy link

hakanai commented Jul 6, 2017

I saw someone on the forum talking about dodging it using reflection to call the newer method:

https://discuss.gradle.org/t/gradle-4-0-warning-what-is-this/23004/8

We're getting this in our build too, but we have so many plugins and more than half of them might be doing it, and there is no way to know because Gradle doesn't print out who called the thing.

@uschindler
Copy link
Member

uschindler commented Jul 6, 2017

As the plugin bootstrap is written in Groovy inside forbidden-apis, this should be easy to fix. I just had no time to do it up to now, but the approach is:

I will prepare a fix duing the summer vacation! As said before, it's no urgent :-)

@uschindler
Copy link
Member

I added a PR #124 that fixes the warning and changes the plugin to also use the classesDirs property (and deprecate the old classesDir in the plugin).

If anybody could check this with his build, I'd be happy!

@uschindler uschindler added this to the 2.4 milestone Jul 19, 2017
uschindler added a commit that referenced this issue Jul 26, 2017
Remove warning in Gradle 4. This closes #120
@huxi
Copy link
Author

huxi commented Sep 24, 2017

Could you perform a release including the fix?

@uschindler
Copy link
Member

Is going to happen soon. I just wanted to wait for Java 9 release to update all signatures and ASM parser.

@huxi
Copy link
Author

huxi commented Sep 24, 2017

Makes sense.

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.

3 participants