-
Notifications
You must be signed in to change notification settings - Fork 3k
Description
Describe the bug
First reported here but was waiting to extract a reproducer to file a full report
The validateExtension
task produces deprecation warnings on Gradle 8.14.3 and fails on Gradle 9.0.0-rc-3 when running with org.gradle.parallel
is set to true.
The deprecation warning is
Resolution of the configuration :example-deployment:runtimeClasspath was attempted from a context different than the project context. Have a look at the documentation to understand why this is a problem and how it can be resolved. This behavior has been deprecated.
The quarkus validateExtension
task resolves the deployment runtime classpath here
This happens without declaring an explicit dependency on the project as would traditionally be recommended (see https://docs.gradle.org/8.14.3/userguide/viewing_debugging_dependencies.html#sub:resolving-unsafe-configuration-resolution-errors)
This is done in this unconventional way to work around Gradle's protections against circular dependencies (where the deployment module depends on the extension module and the extension module consumes the deployment runtime classpath).
Expected behavior
Can run Gradle build without deprecation warnings in preparation for Gradle 9 as described in #48524
Actual behavior
This deprecation warning appears when building an extension in a build that sets org.gradle.parallel
to true
, which is why it was not detected during the initial validation of Gradle 9 with Quarkus.
This is intended behavior of Gradle in Gradle 9: gradle/gradle#33938
How to Reproduce?
- Clone https://github.com/ryandens/quarkus-extension-gradle-reproducer
./gradlew build
Build scans
Gradle 8.14.3: https://scans.gradle.com/s/ispyasboxlgy2/deprecations
Gradle 9.0.0-rc-3: https://scans.gradle.com/s/4uad4owi7xpe6
Output of uname -a
or ver
No response
Output of java -version
OpenJDK Runtime Environment Temurin-21.0.6+7
Quarkus version or git rev
3.25.0
Build tool (ie. output of mvnw --version
or gradlew --version
)
Gradle 8.14.3 / Gradle 9.0.0-rc-3
Additional information
No response