-
Notifications
You must be signed in to change notification settings - Fork 460
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
Use modern API to get property values #2007
Conversation
Some of these APIs are introduced in Gradle 6.2, we probably should merge this after bumping the min requirement. |
Nice! LGTM. It makes sense to me to wait until we depend on Gradle 6.2. |
Awesome, thanks @Goooler! Want to bump the minimum Gradle in this PR? That will get it to pass tests, and then we can merge.
|
That would be a breaking change, I'm not sure if we should do it in minor releases. Might be in the next major update. |
We have bumped the required Gradle version in the past without bumping the major version. As long as we call it out in the release notes I think it is fine. |
Thanks for being so cautious! |
29b240e
to
a7d6459
Compare
Gradle on Java 11 is failing with
|
|
If bumping to |
Some tests failed due to without private fun <T> Provider<T>.forUseAtConfigurationTimeCompat(): Provider<T> =
if (GradleVersion.current() < GradleVersion.version("6.5")) {
// Gradle < 6.5 doesn't have this function.
this
} else if (GradleVersion.current() < GradleVersion.version("7.4")) {
// Gradle 6.5 - 7.3 requires this function to be called.
@Suppress("DEPRECATION")
this.forUseAtConfigurationTime()
} else {
// Gradle >= 7.4 deprecated this function in favor of not calling it (became no-op, and will eventually nag).
// https://docs.gradle.org/current/userguide/upgrading_version_7.html#for_use_at_configuration_time_deprecation
this
} to compact various Gradle versions, it's a bit annoying. I would hold this before bumping min Gradle requirement to 7.4 |
Do we get anything positive by switching to these APIs? is it related to project isolation (#1979)? If we do get anything useful, it might be worth dealing with the annoyance. Seems like there's only 4 |
It would be a suggestion for migration from Gradle side, but every property getting works well with CC, I believe we have no much emergency to do it for now. |
Roger, thanks for looking into this! |
https://docs.gradle.org/8.5/userguide/build_environment.html#configuring_your_build_environment