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

The Provider.forUseAtConfigurationTime method has been deprecated #3945

Closed
RecodeLiner opened this issue Nov 18, 2023 · 5 comments · May be fixed by #4376
Closed

The Provider.forUseAtConfigurationTime method has been deprecated #3945

RecodeLiner opened this issue Nov 18, 2023 · 5 comments · May be fixed by #4376
Labels
enhancement New feature or request gradle Gradle plugin problems

Comments

@RecodeLiner
Copy link

Describe the bug
While build on last version of gradle it log this message:
The Provider.forUseAtConfigurationTime method has been deprecated. This is scheduled to be removed in Gradle 9.0. Simply remove the call. Consult the upgrading guide for further information: https://docs.gradle.org/8.4/userguide/upgrading_version_7.html#for_use_at_configuration_time_deprecation

Affected platforms
Select one of the platforms below:

  • All

Versions

  • Kotlin version*: 1.9.10
  • Compose Multiplatform version*: 1.5.10
  • JDK (for desktop issues): 21

To Reproduce
Steps and/or the code snippet to reproduce the behavior:

  1. ./gradlew --warning-mode=all
  2. See error

Expected behavior
Update for future gradle 9.0

@RecodeLiner RecodeLiner added bug Something isn't working submitted labels Nov 18, 2023
@elijah-semyonov elijah-semyonov added gradle Gradle plugin problems enhancement New feature or request and removed submitted bug Something isn't working labels Nov 20, 2023
@KhushAlbiorix
Copy link

KhushAlbiorix commented Dec 6, 2023

@RecodeLiner @elijah-semyonov, can I run my app on the desktop because every time I run it, it gives me the above error?

@RecodeLiner
Copy link
Author

This is not an error if you are using 8.x versions because here it is only a warning, but if you already have 9.x, you need to wait for a fix

@Omico
Copy link
Contributor

Omico commented Dec 17, 2023

It seems intentional. See here.

private fun Provider<String?>.forUseAtConfigurationTimeSafe(): Provider<String?> =
try {
forUseAtConfigurationTime()
} catch (e: NoSuchMethodError) {
// todo: remove once we drop support for Gradle 6.4
this
}

@Rafael2616
Copy link

any update on this issue, as this deprecation warning is showing to me also..

@okushnikov
Copy link
Collaborator

Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.

@JetBrains JetBrains locked and limited conversation to collaborators Dec 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request gradle Gradle plugin problems
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants