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

Fix Gradle deprecation warnings #96

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

steven-sheehy
Copy link

@steven-sheehy steven-sheehy commented Jan 22, 2025

What does this PR do?

Fixes #92

  • Bump de.undercouch.download to fix a ConfigureUtil deprecation warning
  • Change report to use outputLocation to fix a Report.destination deprecation warning
  • Change use of convention to extensions to fix deprecation warnings
  • Move sourceCompatibility inside java to fix a JavaPluginConvention deprecation warning
  • Remove unnecessary casts to CharSequence
  • Suppress no comment warnings in javadocs

Where should the reviewer start?

Run ./gradlew clean build --warning-mode all to show the deprecation warnings.

Why is it needed?

Fixes #92

Build file '/Users/stevensheehy/projects/oss/web3j-gradle-plugin/build.gradle': line 13
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.7/userguide/upgrading_version_8.html#java_convention_deprecation
        at build_aoyhe4wym7kz855rudt1kxzng.run(/Users/stevensheehy/projects/oss/web3j-gradle-plugin/build.gradle:13)
        (Run with --stacktrace to get the full stack trace of this deprecation warning.)
The org.gradle.util.ConfigureUtil 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.7/userguide/upgrading_version_8.html#org_gradle_util_reports_deprecations
        at build_aoyhe4wym7kz855rudt1kxzng$_run_closure2$_closure11.doCall$original(/Users/stevensheehy/projects/oss/web3j-gradle-plugin/build.gradle:28)
        (Run with --stacktrace to get the full stack trace of this deprecation warning.)
Script '/Users/stevensheehy/projects/oss/web3j-gradle-plugin/gradle/java/build.gradle': line 3
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.7/userguide/upgrading_version_8.html#java_convention_deprecation
        at build_cfxj9i1s3k4es82kgnb359k8f.run(/Users/stevensheehy/projects/oss/web3j-gradle-plugin/gradle/java/build.gradle:3)
        (Run with --stacktrace to get the full stack trace of this deprecation warning.)
        at build_aoyhe4wym7kz855rudt1kxzng.run(/Users/stevensheehy/projects/oss/web3j-gradle-plugin/build.gradle:19)
        (Run with --stacktrace to get the full stack trace of this deprecation warning.)
Script '/Users/stevensheehy/projects/oss/web3j-gradle-plugin/gradle/java/build.gradle': line 4
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.7/userguide/upgrading_version_8.html#java_convention_deprecation
        at build_cfxj9i1s3k4es82kgnb359k8f.run(/Users/stevensheehy/projects/oss/web3j-gradle-plugin/gradle/java/build.gradle:4)
        (Run with --stacktrace to get the full stack trace of this deprecation warning.)
        at build_aoyhe4wym7kz855rudt1kxzng.run(/Users/stevensheehy/projects/oss/web3j-gradle-plugin/build.gradle:19)
        (Run with --stacktrace to get the full stack trace of this deprecation warning.)
Script '/Users/stevensheehy/projects/oss/web3j-gradle-plugin/gradle/repositories/build.gradle': line 3
The RepositoryHandler.jcenter() method has been deprecated. This is scheduled to be removed in Gradle 9.0. JFrog announced JCenter's sunset in February 2021. Use mavenCentral() instead. Consult the upgrading guide for further information: https://docs.gradle.org/8.7/userguide/upgrading_version_6.html#jcenter_deprecation
        at build_9q2fpmeq9xk9cnp0fx5836zok$_run_closure1.doCall$original(/Users/stevensheehy/projects/oss/web3j-gradle-plugin/gradle/repositories/build.gradle:3)
        (Run with --stacktrace to get the full stack trace of this deprecation warning.)
        at build_9q2fpmeq9xk9cnp0fx5836zok.run(/Users/stevensheehy/projects/oss/web3j-gradle-plugin/gradle/repositories/build.gradle:1)
        (Run with --stacktrace to get the full stack trace of this deprecation warning.)
Build file '/Users/stevensheehy/projects/oss/web3j-gradle-plugin/build.gradle': line 101
The Report.destination property has been deprecated. This is scheduled to be removed in Gradle 9.0. Please use the outputLocation property instead. For more information, please refer to https://docs.gradle.org/8.7/dsl/org.gradle.api.reporting.Report.html#org.gradle.api.reporting.Report:destination in the Gradle documentation.
        at build_aoyhe4wym7kz855rudt1kxzng$_run_closure8.doCall$original(/Users/stevensheehy/projects/oss/web3j-gradle-plugin/build.gradle:101)
        (Run with --stacktrace to get the full stack trace of this deprecation warning.)
        at build_aoyhe4wym7kz855rudt1kxzng.run(/Users/stevensheehy/projects/oss/web3j-gradle-plugin/build.gradle:100)
        (Run with --stacktrace to get the full stack trace of this deprecation warning.)

Checklist

  • I've read the contribution guidelines.
  • I've added tests (if applicable).
  • I've added a changelog entry if necessary.

@steven-sheehy
Copy link
Author

To fully fix all deprecation warnings the below upstream PRs should be merged as well:

hyperledger-web3j/web3j-build-tools#12
hyperledger-web3j/web3j-build-tools#2

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

Successfully merging this pull request may close these issues.

Gradle deprecation warnings
1 participant