-
Notifications
You must be signed in to change notification settings - Fork 403
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
SimpleWorkResult is deprecated in gradle 4.2 #326
Comments
Solution for this fix is really simple. Unfortunately it requires to drop support for Gradle < 4.2 Change needs to be applied in before: import org.gradle.api.internal.tasks.SimpleWorkResult
@Override
WorkResult execute(CopyActionProcessingStream stream) {
// ...
return new SimpleWorkResult(true)
} after: import org.gradle.api.tasks.WorkResults
@Override
WorkResult execute(CopyActionProcessingStream stream) {
// ...
return WorkResults.didWork(true)
} |
I would definitely support breaking compatibility with older gradle versions to fix this annoying output line. |
The class While I understand and appreciate that things are progressing fast in the gradle world, I would also hope that plugins (and libraries in general) provide a reasonable continuity/backward compatibility. As an example of such an approach, see how Gradle continues to support building with java 7 until version 5.0. I will create a PR that both avoids this warning and continues to be backward compatible (until Shadow starts to support the future 5.0 version, at which point it will probably be inevitable without hacks). |
That's even better! |
Explicitly silences deprecation warning regarding SimpleWorkResult. Since the recommended WorkResults appeared in 4.2, we can use this workaround to both avoid this warning in newer gradle versions and still support pre-4.2 for now. Closes GradleUp#326.
2.0.2 is now available with this fix. |
This fixes a deprecation warning shown when running the shadowJar task. (See GradleUp/shadow#326 for details.)
@DuncanCasteleyn your error is not the same problem as this issue. Please find an existing open issue that corresponds to this, or open a new one. |
Shadow Version
2.0.0, 2.0.1
Gradle Version
4.2
Expected Behavior
Clean build.
Actual Behavior
Gradle prints a deprecation warning:
The text was updated successfully, but these errors were encountered: