Skip to content

Comments

refactor to fetch variants/packageIds from an async store#1

Open
dfabulich wants to merge 2 commits intofix-agp-9from
fix-agp-9-provider-refactor
Open

refactor to fetch variants/packageIds from an async store#1
dfabulich wants to merge 2 commits intofix-agp-9from
fix-agp-9-provider-refactor

Conversation

@dfabulich
Copy link
Owner

What does this change accomplish?

This is a stacked PR on top of ndtp#273 designed to bring back features that were lost in the port to AGP 9.0

How have you achieved it?

https://developer.android.com/build/releases/agp-9-0-0-release-notes

The android DSL classes now only implement the new public interfaces

Over the last several years, we have introduced new interfaces for our DSL and API in order to better control which APIs are public. AGP versions 7.x and 8.x still used the old DSL types (for example BaseExtension) which also implemented the new public interfaces, in order to maintain compatibility as work progressed on the interfaces.

AGP 9.0 uses our new DSL interfaces exclusively, and the implementations have changed to new types that are fully hidden. This also removes access to the old, deprecated variant API.

The new variant API is asynchronous, using a callback. So I moved the variants and packageId stuff into a VariantPackageIdStore which returns Providers for all of its data. This required a pretty big refactor to make everything that used this data work properly.

I feel a lot less confident in this code than I do about ndtp#273 … it seems hard to test.

Scope of Impact and Testing instructions

Ideally, if we merge this, there will be no breaking changes at all as we add support for AGP 9. But I'm not sure I know how to test to ensure that's true.

Tasks now store required values as `Property<String>` or other inputs during provideInput, and read those in `taskAction`
@dfabulich dfabulich force-pushed the fix-agp-9-provider-refactor branch from a48a4ff to f4857ef Compare February 12, 2026 00:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant