Skip to content

ADFA-4762: Restore per-ABI assets zip generation for generate_assets workflow#1573

Merged
jomen-adfa merged 2 commits into
stagefrom
task/ADFA-4762-generate-assets-fix
Jul 25, 2026
Merged

ADFA-4762: Restore per-ABI assets zip generation for generate_assets workflow#1573
jomen-adfa merged 2 commits into
stagefrom
task/ADFA-4762-generate-assets-fix

Conversation

@jomen-adfa

@jomen-adfa jomen-adfa commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Problem

The "Generate Assets Zips and Upload to Google Drive" workflow (generate_assets.yml) has failed at the Drive upload step on every run since Jul 7 (curl exit 26: can't open app/build/outputs/assets/assets-arm64-v8a.zip). PR #1441 (ADFA-4423) removed createAssetsZip() while extracting the AI plugins, so assembleV8Assets/assembleV7Assets were reduced to createPluginArtifactsZip and no longer produce the per-ABI zips the workflow uploads.

Debug APKs don't bundle assets — SplitAssetsInstaller opens Download/assets-<arch>.zip on-device — so QA hasn't been able to get refreshed assets since the task was removed.

Fix

Restore a trimmed createAssetsZip(arch) in app/build.gradle.kts: the original repackaging loop only, without the llama.aar extraction / D8 dexing / dynamic_libs/llama.aar entry (legitimately removed in #1441 — the installer no longer expects them). Wire it back into assembleV8Assets / assembleV7Assets via doLast, keeping the existing createPluginArtifactsZip dependency and not restoring the :llama-impl dependencies.

Zip entries match the installer contract in AssetsInstallationHelper.expectedEntries:
android-sdk.zip, localMvnRepository.zip, gradle-8.14.3-bin.zip, gradle-api-8.14.3.jar.zip, documentation.db, bootstrap.zip, plugin-artifacts.zip, core.cgt (per-ABI sources android-sdk-<arch>.zip / bootstrap-<arch>.zip are renamed on entry).

No workflow changes needed — generate_assets.yml already runs :app:assembleAssets and expects app/build/outputs/assets/assets-<abi>.zip.

Verification

  • GITHUB_ACTIONS=true ./gradlew :app:assembleAssets (the CI code path): build succeeds, both zips produced.
  • unzip -l on both zips: exactly the 8 expected entries, correct names.
  • spotlessCheck passes.
  • After merge: manual dispatch of the Generate Assets workflow to confirm Drive upload + Slack notification end-to-end.

Jira: ADFA-4762

🤖 Generated with Claude Code

…workflow

PR #1441 (ADFA-4423) removed createAssetsZip() while extracting the AI
plugins, so assembleV8Assets/assembleV7Assets stopped producing
app/build/outputs/assets/assets-<abi>.zip and the "Generate Assets Zips
and Upload to Google Drive" workflow has failed at the Drive upload step
ever since. Debug APKs still need these zips on-device
(SplitAssetsInstaller).

Restore a trimmed createAssetsZip(arch) - the original repackaging logic
minus the llama.aar/D8 handling the installer no longer expects - and
wire it back into assembleV8Assets/assembleV7Assets. Entry names match
the installer contract in AssetsInstallationHelper.expectedEntries.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

@claude claude Bot 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.

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.

Tip: disable this comment in your organization's Code Review settings.

@coderabbitai

coderabbitai Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: de08be3e-266c-463f-a95f-187134a17a90

📥 Commits

Reviewing files that changed from the base of the PR and between 870ed53 and ec34e39.

📒 Files selected for processing (1)
  • app/build.gradle.kts

📝 Walkthrough
  • Restored per-ABI ZIP generation for generate_assets.
  • Added required-file validation and installer-compatible entry-name remapping.
  • Wired ZIP creation into V8 and V7 asset assembly tasks.
  • Preserved existing asset-download dependencies.
  • Risk: ZIP inputs and outputs are not explicitly declared as Gradle task properties, which may limit incremental-build and caching behavior.

Walkthrough

Gradle now validates required asset inputs, packages them into architecture-specific ZIP files with installer-compatible entry names, and invokes packaging from the V8 and V7 assembly tasks.

Changes

ABI assets packaging

Layer / File(s) Summary
Validated asset ZIP construction
app/build.gradle.kts
Adds createAssetsZip(arch) to validate required files, remap bootstrap and Android SDK entry names, and write assets-<arch>.zip outputs.
ABI assembly task integration
app/build.gradle.kts
Updates V8 and V7 assembly tasks to generate their respective asset ZIP artifacts.
Estimated code review effort: 3 (Moderate) ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant GradleBuild
  participant createAssetsZip
  participant AssetsDirectory
  participant AssetsZipOutput
  GradleBuild->>createAssetsZip: createAssetsZip(arch)
  createAssetsZip->>AssetsDirectory: validate and read required payload files
  createAssetsZip->>AssetsZipOutput: write assets-<arch>.zip with mapped entries
Loading

Suggested reviewers: itsaky-adfa, daniel-adfa, hal-eisen-adfa

Poem

A rabbit packs the assets tight,
With bootstrap names made just right.
V8 hops first, V7 follows,
ZIPs emerge from build-path hollows.
Missing files? The hare will cry! 🐇

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly states the main change: restoring per-ABI assets zip generation for the generate_assets workflow.
Description check ✅ Passed The description directly explains the problem, fix, and verification for the same assets zip generation change.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch task/ADFA-4762-generate-assets-fix

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@jomen-adfa
jomen-adfa merged commit 6a2656e into stage Jul 25, 2026
4 of 5 checks passed
@jomen-adfa
jomen-adfa deleted the task/ADFA-4762-generate-assets-fix branch July 25, 2026 03:14
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.

2 participants