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 warning in settings.gradle #743

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

Conversation

lhvy
Copy link
Contributor

@lhvy lhvy commented Jan 3, 2025

When running ./gradlew build using Gradle 8.12 or higher (WPILib 2025.1.1 uses 8.11), the following output is shown:

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

When more info is requested, the deprecation is as follows:

Settings file 'robot/settings.gradle': line 23
Space-assignment syntax in Groovy DSL has been deprecated. This is scheduled to be removed in Gradle 10.0. Use assignment ('name = <value>') instead. Consult the upgrading guide for further information: https://docs.gradle.org/8.12/userguide/upgrading_version_8.html#groovy_space_assignment_syntax
        at settings_bsoh050aq8icg3omjmmbz5bm0$_run_closure1$_closure2$_closure3.doCall$original(robot/settings.gradle:23)
        (Run with --stacktrace to get the full stack trace of this deprecation warning.)
        at settings_bsoh050aq8icg3omjmmbz5bm0$_run_closure1$_closure2.doCall$original(robot/settings.gradle:22)
        (Run with --stacktrace to get the full stack trace of this deprecation warning.)
Settings file 'robot/settings.gradle': line 24
Space-assignment syntax in Groovy DSL has been deprecated. This is scheduled to be removed in Gradle 10.0. Use assignment ('url = <value>') instead. Consult the upgrading guide for further information: https://docs.gradle.org/8.12/userguide/upgrading_version_8.html#groovy_space_assignment_syntax
        at settings_bsoh050aq8icg3omjmmbz5bm0$_run_closure1$_closure2$_closure3.doCall$original(robot/settings.gradle:24)
        (Run with --stacktrace to get the full stack trace of this deprecation warning.)
        at settings_bsoh050aq8icg3omjmmbz5bm0$_run_closure1$_closure2.doCall$original(robot/settings.gradle:22)
        (Run with --stacktrace to get the full stack trace of this deprecation warning.)

The provided two line change fixes these two issues for projects of all languages, and is enough to make the entire deprecation warning disappear for Java projects.

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.

2 participants