Skip to content

fix(android): migrate CargoKit to Android Components - #22

Merged
iota9star merged 2 commits into
fluttercandies:mainfrom
ClosedHarmony:fix/agp9-compile-sdk-and-variants
Sep 30, 2026
Merged

iota9star merged 2 commits into
fluttercandies:mainfrom
ClosedHarmony:fix/agp9-compile-sdk-and-variants

Conversation

@HsukqiLee

@HsukqiLee HsukqiLee commented Aug 19, 2026 •

Copy link
Copy Markdown
Contributor

What changed

  • migrate CargoKit from legacy applicationVariants/libraryVariants to AndroidComponentsExtension.onVariants
  • parse the numeric component of compileSdkVersion so AGP values such as android-37.0 remain supported

Validation

  • verified fjs CargoKit debug/profile/release tasks under AGP 9.4.0-rc01 and Gradle 9.6.0
  • verified app configuration completes without the AGP applicationVariants/newDsl warning after suppression settings are applied

Copilot AI lite review requested due to automatic review settings August 19, 2026 15:40

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@iota9star

Copy link
Copy Markdown
Member

Hi @HsukqiLee — thanks for the PR. A note on the CI you're seeing here: that run never actually started any jobs. Since the secret passthrough landed on main (Aug 13), every Build All Platforms run has failed at startup because precompile-binaries.yml didn't declare PRECOMPILE_BINARIES_PRIVATE_KEY under workflow_call while the caller passes it explicitly — GitHub rejects the workflow with "Invalid secret, PRECOMPILE_BINARIES_PRIVATE_KEY is not defined in the referenced workflow." Your run then sat queued for 30 days until GitHub force-failed it. It's unrelated to your changes.

The startup fix is up in #25 (verified by dispatching the workflow). Once that merges, please rebase this PR so CI can actually validate the Android Components migration. The migration itself looks right to me on read-through — onVariants + numeric compileSdkVersion parsing keeps both the AGP 8.7.3 and 9.0.1 compatibility legs in scope. The main thing CI needs to prove is that the no-cargokit-warnings gate still holds on both legs and that jniLibs wiring from inside onVariants is picked up.

@HsukqiLee

Copy link
Copy Markdown
Contributor Author

Thanks for the detailed rundown and for merging main into the branch, @iota9star — the workflow now actually starts (prepare is green and the quality gates are running). I'll keep an eye on the no-cargokit-warnings gate across both AGP legs and the jniLibs wiring from inside onVariants.

Also, with #25/#26/#27 now on main, the changes we were carrying in our fork for the secret declaration, the h2/rustls security bumps, the flaky close-wins-while-initializing test, and the FRB 2.13 upgrade are all superseded upstream — nothing further needed from us there.

One more independent fix carried in our fork, split out as its own PR: #29 (keeps precompiled snapshot staging paths under the Windows MAX_PATH limit).

@iota9star
iota9star merged commit 1359833 into fluttercandies:main Sep 30, 2026
14 checks passed
@HsukqiLee
HsukqiLee deleted the fix/agp9-compile-sdk-and-variants branch September 30, 2026 13:34
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.

3 participants