Skip to content

Conversation

@maxlambrecht
Copy link
Member

PR Description

This PR removes deprecations reported by ./gradlew build --warning-mode all to keep the build compatible with the upcoming Gradle 10 upgrade.

Changes:

  • Replace deprecated dependency “multi-string notation” with single-string coordinates (including classifiers)
  • Update protobuf plugin configuration to use explicit platform executables (@exe) and configureEach
  • Fix root publishing configuration by applying com.vanniktech.maven.publish only where publishable components exist (apply false at root)
  • Upgrade task wiring

Signed-off-by: Max Lambrecht <maxlambrecht@gmail.com>
Signed-off-by: Max Lambrecht <maxlambrecht@gmail.com>
@rturner3
Copy link
Collaborator

I am seeing a few warnings related to Gradle 10 compatibility when running ./gradlew assemble --warning-mode all with this PR checked out locally:

> Configure project :
Build file '/Users/foo/rturner3/java-spiffe/build.gradle': line 157
Properties should be assigned using the 'propName = value' syntax. Setting a property via the Gradle-generated 'propName value' or 'propName(value)' syntax in Groovy DSL has been deprecated. This is scheduled to be removed in Gradle 10. Use assignment ('jacocoReportPath = <value>') instead. Consult the upgrading guide for further information: https://docs.gradle.org/9.2.1/userguide/upgrading_version_8.html#groovy_space_assignment_syntax
        at build_e1srl9z1oegpqg7hzi4ngr85x$_run_closure5.doCall$original(/Users/foo/rturner3/java-spiffe/build.gradle:157)
        (Run with --stacktrace to get the full stack trace of this deprecation warning.)
        at build_e1srl9z1oegpqg7hzi4ngr85x.run(/Users/foo/rturner3/java-spiffe/build.gradle:156)
        (Run with --stacktrace to get the full stack trace of this deprecation warning.)

> Configure project :java-spiffe-core
Declaring dependencies using multi-string notation has been deprecated. This will fail with an error in Gradle 10. Please use single-string notation instead: "com.google.protobuf:protoc:3.25.5:osx-aarch_64@exe". Consult the upgrading guide for further information: https://docs.gradle.org/9.2.1/userguide/upgrading_version_9.html#dependency_multi_string_notation
Declaring dependencies using multi-string notation has been deprecated. This will fail with an error in Gradle 10. Please use single-string notation instead: "io.grpc:protoc-gen-grpc-java:1.77.0:osx-aarch_64@exe". Consult the upgrading guide for further information: https://docs.gradle.org/9.2.1/userguide/upgrading_version_9.html#dependency_multi_string_notation

I believe that the first warning will be addressed once #382 is merged. Is the intention to handle the remaining warnings in this PR or will they be addressed in a later PR?

Signed-off-by: Max Lambrecht <maxlambrecht@gmail.com>
@maxlambrecht
Copy link
Member Author

I am seeing a few warnings related to Gradle 10 compatibility when running ./gradlew assemble --warning-mode all with this PR checked out locally:

> Configure project :
Build file '/Users/foo/rturner3/java-spiffe/build.gradle': line 157
Properties should be assigned using the 'propName = value' syntax. Setting a property via the Gradle-generated 'propName value' or 'propName(value)' syntax in Groovy DSL has been deprecated. This is scheduled to be removed in Gradle 10. Use assignment ('jacocoReportPath = <value>') instead. Consult the upgrading guide for further information: https://docs.gradle.org/9.2.1/userguide/upgrading_version_8.html#groovy_space_assignment_syntax
        at build_e1srl9z1oegpqg7hzi4ngr85x$_run_closure5.doCall$original(/Users/foo/rturner3/java-spiffe/build.gradle:157)
        (Run with --stacktrace to get the full stack trace of this deprecation warning.)
        at build_e1srl9z1oegpqg7hzi4ngr85x.run(/Users/foo/rturner3/java-spiffe/build.gradle:156)
        (Run with --stacktrace to get the full stack trace of this deprecation warning.)

> Configure project :java-spiffe-core
Declaring dependencies using multi-string notation has been deprecated. This will fail with an error in Gradle 10. Please use single-string notation instead: "com.google.protobuf:protoc:3.25.5:osx-aarch_64@exe". Consult the upgrading guide for further information: https://docs.gradle.org/9.2.1/userguide/upgrading_version_9.html#dependency_multi_string_notation
Declaring dependencies using multi-string notation has been deprecated. This will fail with an error in Gradle 10. Please use single-string notation instead: "io.grpc:protoc-gen-grpc-java:1.77.0:osx-aarch_64@exe". Consult the upgrading guide for further information: https://docs.gradle.org/9.2.1/userguide/upgrading_version_9.html#dependency_multi_string_notation

I believe that the first warning will be addressed once #382 is merged. Is the intention to handle the remaining warnings in this PR or will they be addressed in a later PR?

The first warning went away after merging #382.

Regarding the other 2 warnings, I initially could not find a fix for it, since changing the artifact = "group:module:version:classifier@exe" strings does not eliminate the warning. After further investigation, I addressed it by avoiding the plugin’s internal dependency creation altogether and wiring the tools via explicit configurations and path = ..., which removes the deprecated API usage and makes the build compatible with Gradle 10.

Signed-off-by: Max Lambrecht <maxlambrecht@gmail.com>
Signed-off-by: Max Lambrecht <maxlambrecht@gmail.com>
Signed-off-by: Max Lambrecht <maxlambrecht@gmail.com>
Signed-off-by: Max Lambrecht <maxlambrecht@gmail.com>
Signed-off-by: Max Lambrecht <maxlambrecht@gmail.com>
@maxlambrecht maxlambrecht merged commit 5f9d7fb into spiffe:main Dec 17, 2025
8 checks passed
@maxlambrecht maxlambrecht deleted the build/gradle10-deprecations branch December 17, 2025 03:59
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