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

Gradle 8.11+ reports extendsFrom deprecation warnings #44660

Open
amaechler opened this issue Nov 22, 2024 · 3 comments
Open

Gradle 8.11+ reports extendsFrom deprecation warnings #44660

amaechler opened this issue Nov 22, 2024 · 3 comments
Labels
area/gradle Gradle kind/enhancement New feature or request

Comments

@amaechler
Copy link

amaechler commented Nov 22, 2024

Describe the bug

When building a Quarkus project with Gradle 8.11 and upwards, Gradle reports many deprecation warnings that look something like this:

Calling extendsFrom on configuration ':service-event-collector:detachedConfiguration7' has been deprecated. This will fail with an error in Gradle 9.0. Detached configurations should not extend other configurations, this was extending: 'quarkusDevRuntimeClasspathConfigurationPlatform'. Consult the upgrading guide for further information: https://docs.gradle.org/8.11.1/userguide/upgrading_version_8.html#detached_configurations_cannot_extend

Going through the logs, I get warnings for extending from the following:

'compileClasspath'
'runtimeOnly'
'quarkusDevRuntimeClasspathConfigurationPlatform'
'quarkusProdRuntimeClasspathConfigurationPlatform'
'quarkusTestRuntimeClasspathConfigurationPlatform'

There was an attempt to fix this once in #41329, but it had to be reverted due to #41825. Starting with Gradle 8.11, this issue is a bit more obvious (or annoying) because the deprecation message is now always printed to the console AFAIK.

Expected behavior

No deprecation messages when building a project with the latest Gradle tooling.

Actual behavior

The above deprecation messages. Note that with Gradle 8.11 and onwards, you will just get a summary by default, stating

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

To see all the warnings, you must either pass --warning-mode all to the Gradle wrapper CLI, or set org.gradle.warning.mode=all in the Gradle properties.

How to Reproduce?

Reproducer: @amaechler

Steps to reproduce:

quarkus create app org.acme:getting-started --extension='rest' --gradle
cd getting-started
./gradlew --gradle-version latest
./gradlew build

# ...

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

Output of uname -a or ver

Darwin MacBookPro 24.1.0 Darwin Kernel Version 24.1.0: Thu Oct 10 21:03:15 PDT 2024; root:xnu-11215.41.3~2/RELEASE_ARM64_T6000 arm64

Output of java -version

openjdk version "21" 2023-09-19 OpenJDK Runtime Environment Zulu21.28+85-CA (build 21+35) OpenJDK 64-Bit Server VM Zulu21.28+85-CA (build 21+35, mixed mode, sharing)

Quarkus version or git rev

3.16.4

Build tool (ie. output of mvnw --version or gradlew --version)

Gradle 8.11.1

Additional information

You can use '--warning-mode all' to show the individual deprecation warnings

@amaechler amaechler added the kind/bug Something isn't working label Nov 22, 2024
@quarkus-bot quarkus-bot bot added the area/gradle Gradle label Nov 22, 2024
Copy link

quarkus-bot bot commented Nov 22, 2024

/cc @glefloch, @quarkusio/devtools

@gsmet gsmet added kind/enhancement New feature or request and removed kind/bug Something isn't working labels Nov 22, 2024
@gsmet
Copy link
Member

gsmet commented Nov 22, 2024

/cc @aloubyansky FYI as you worked on the initial patch mentioned in this issue.

@mschorsch
Copy link
Contributor

mschorsch commented Nov 23, 2024

There is also #39221

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/gradle Gradle kind/enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants