-
Notifications
You must be signed in to change notification settings - Fork 129
Open
Description
See solution here for fix: https://issuetracker.google.com/issues/277166577
From the issue:
Status: Won't Fix (Intended Behavior)
Thanks for sharing the repro. The issue is in the build script that triggers eager task creation, which breaks AGP task configuration. Please use:
tasks.configureEach {
if(name.startsWith("connectedNet")) {
enabled = false
}
}
instead of tasks.whenTaskAdded (see [Gradle docs](https://docs.gradle.org/current/userguide/task_configuration_avoidance.html#sec:old_vs_new_configuration_api_overview) for more info). After this modification, R8 will fail with missing classes, so please follow instructions at https://developer.android.com/build/releases/past-releases/agp-7-0-0-release-notes#r8-missing-class-warning to fix that.
Sidenote: I'd advise against disabling tasks in this way. If you'd like to disable instrumented tests, see https://github.com/android/gradle-recipes/blob/0db8094e5a1a9661f61958db85380320157f5050/Groovy/disableAndroidTest/app/build.gradle#L15.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels