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

Jib Gradle Plugin emits warning on gradle 8.2 due to referencing deprecated convention. #4062

Closed
madorb opened this issue Jul 5, 2023 · 5 comments

Comments

@madorb
Copy link

madorb commented Jul 5, 2023

Environment:

  • Jib version: 3.3.1
  • Build tool: gradle
  • OS: macos

Description of the issue:
When applying jib plugin to a project using gradle 8.2 (with --stacktrace enabled to show exact location) the following warnings are emitted:

The Project.getConvention() method has been deprecated. This is scheduled to be removed in Gradle 9.0. Consult the upgrading guide for further information: https://docs.gradle.org/8.2/userguide/upgrading_version_8.html#deprecated_access_to_conventions
        at org.gradle.api.internal.project.DefaultProject.getConvention(DefaultProject.java:593)
        at com.google.cloud.tools.jib.gradle.JibPlugin.lambda$apply$9(JibPlugin.java:187)
...
The org.gradle.api.plugins.Convention type has been deprecated. This is scheduled to be removed in Gradle 9.0. Consult the upgrading guide for further information: https://docs.gradle.org/8.2/userguide/upgrading_version_8.html#deprecated_access_to_conventions
        at org.gradle.internal.extensibility.DefaultConvention.logConventionDeprecation(DefaultConvention.java:398)
        at org.gradle.internal.extensibility.DefaultConvention.findPlugin(DefaultConvention.java:100)
        at org.gradle.internal.extensibility.DefaultConvention.getPlugin(DefaultConvention.java:89)
        at com.google.cloud.tools.jib.gradle.JibPlugin.lambda$apply$9(JibPlugin.java:188)
...
The org.gradle.api.plugins.JavaPluginConvention type has been deprecated. This is scheduled to be removed in Gradle 9.0. Consult the upgrading guide for further information: https://docs.gradle.org/8.2/userguide/upgrading_version_8.html#java_convention_deprecation
        at org.gradle.api.plugins.internal.NaggingJavaPluginConvention.logDeprecation(NaggingJavaPluginConvention.java:185)
        at org.gradle.api.plugins.internal.NaggingJavaPluginConvention.getSourceSets(NaggingJavaPluginConvention.java:154)
        at com.google.cloud.tools.jib.gradle.JibPlugin.lambda$apply$9(JibPlugin.java:189)        

This appears to be due to loading the convetion here: https://github.com/GoogleContainerTools/jib/blob/master/jib-gradle-plugin/src/main/java/com/google/cloud/tools/jib/gradle/JibPlugin.java#L187

Expected behavior:
Jib gradle plugin does not show deprecation warnings

Steps to reproduce:

  1. Apply jib to a gradle project using gradle >= 8.2
@diegomarquezp
Copy link
Contributor

Hi @madorb, thanks for bringing this up. It seems like we need to update the usage of conventions in favor of extensions (docs).

@alicejli
Copy link
Contributor

I believe this is fixed with #3892. Please re-open if not.

@madorb
Copy link
Author

madorb commented Jul 11, 2023

looks like that should resolve it, will update and test once a release is made

@bmuschko
Copy link

Can you provide an ETA on when this fix will be released?

@OverDrone
Copy link

latest release 3.3.2 (May 23) does not include this fix. When we may expect a new release?

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

Successfully merging a pull request may close this issue.

5 participants