Fixed
Status Update
Comments
je...@google.com <je...@google.com> #2
Any plans to support this?
hu...@google.com <hu...@google.com> #3
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.compose.material3:material3-adaptive-navigation-suite:1.4.0-alpha07
androidx.compose.material3:material3-adaptive-navigation-suite-android:1.4.0-alpha07
hu...@google.com <hu...@google.com> #4
an...@google.com <an...@google.com> #5
Thank you for your patience while our engineering team worked to resolve this issue. A fix for this issue is now available in:
- Android Studio Iguana | 2023.2.1 Canary 2
- Android Gradle Plugin 8.3.0-alpha02
We encourage you to try the latest update.
If you notice further issues or have questions, please file a new bug report.
Thank you for taking the time to submit feedback — we really appreciate it!
Description
Steps to reproduce
./gradlew help
, it will fail with:./gradlew help
again without updating Gradle, it will fail with:Root cause
At this changehttps://android.googlesource.com/platform/tools/base/+/27e840abc64595652fd05ac564660b983ef8a478 (merged Jun 7, 2022), we use a static variable to record whether the Gradle version check has been performed. This is to avoid running the check multiple times, once for each subproject.
However, a static variable is not suited for this use case for 2 reasons:
Potential fix
We can replace the static variable with a property in a cross-classloader BuildService. This will fix both the scope and lifetime issues above (the scope will be JVM-scoped, cross-classloader, and the lifetime will be per build).
We've been talking about this cross-classloader BuildService for a while, maybe this is a good opportunity to implement it.