Status Update
Comments
je...@google.com <je...@google.com>
ga...@google.com <ga...@google.com>
ga...@google.com <ga...@google.com> #2
The issue is with configuration on demand, as AGP relies on callback project.gradle.projectsEvaluated { ... }
to start allowing for configurations to be resolved. With configuration on demand & composite builds, configurations need to be resolved in order to find which projects need to be configured. I think we need to listen for another event.
hu...@google.com <hu...@google.com> #3
Adding a reference to what Ivan said: From
ga...@google.com <ga...@google.com> #4
ag/Ice507db310bb268170566599138aea4b46b672e4 fixes this. It should be out in AGP 7.0.0-alpha05.
e....@gmail.com <e....@gmail.com> #5
For anyone substituting module dependencies with projects, who aren't fans of the log spam: create an empty gradle build and include it.
gradle.properties
# fail build instead of endless warnings
android.dependencyResolutionAtConfigurationTime.disallow=true
settings.gradle
// include empty gradle project to suppress warnings and failures
// on dependency resolution at configuration time
// (caused by substituting modules with projects)
includeBuild("gradle/dummy")
gradle/dummy/settings.gradle
// intentionally left blank
Description
It appears that this only happens when configuration on demand is enabled, and settings.gradle adds an includedBuild, and the com.android.library plugin is applied to a project.
I've simplified this down to a smaller reproduction test case: see