affected-paths currently breaks on Android projects using AGP 9.x because the Android project extraction path is tied to legacy variant APIs.
Problem
When running affected-path analysis on an AGP 9 project, the tooling step fails before returning affected modules.
Typical failure signatures include:
org.gradle.tooling.BuildActionFailureException
Caused by: java.lang.IllegalArgumentException: Required value was null
at com.squareup.tooling.support.android.AndroidProjectExtractorKt.extractAppModuleProject(...)
and (in late-evaluation contexts/tests):
It is too late to add actions as the callbacks already executed.
Did you try to call onVariants from the old variant API 'applicationVariants'...
Impact
- Affected-path computation crashes instead of producing module paths.
- CI workflows that rely on affected-paths for selective builds/tests fail or must fall back to full test scope.
Reproduction (high level)
- Use an Android multi-module project on AGP 9.x.
- Apply the affected-path tooling/model extraction path.
- Run affected-path analysis (CLI or core analyzer path).
- Observe crash during Android model extraction.
Root cause (high level)
The extractor logic depends on legacy AGP variant/model behavior that changed in AGP 9.
The runtime Android extension/variant wiring no longer matches assumptions from the old AppExtension/BaseVariant style extraction path.
affected-pathscurrently breaks on Android projects using AGP 9.x because the Android project extraction path is tied to legacy variant APIs.Problem
When running affected-path analysis on an AGP 9 project, the tooling step fails before returning affected modules.
Typical failure signatures include:
and (in late-evaluation contexts/tests):
Impact
Reproduction (high level)
Root cause (high level)
The extractor logic depends on legacy AGP variant/model behavior that changed in AGP 9.
The runtime Android extension/variant wiring no longer matches assumptions from the old
AppExtension/BaseVariantstyle extraction path.