Skip to content

Fix plugin-artifacts.zip compression for release builds#801

Merged
Daniel-ADFA merged 2 commits intostagefrom
ADFA-2496-fix-plugin-artifact
Jan 7, 2026
Merged

Fix plugin-artifacts.zip compression for release builds#801
Daniel-ADFA merged 2 commits intostagefrom
ADFA-2496-fix-plugin-artifact

Conversation

@Daniel-ADFA
Copy link
Contributor

No description provided.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 7, 2026

📝 Walkthrough

Release Notes - Fix plugin-artifacts.zip compression for release builds

Changes

  • Removed CI release packaging steps in .github/workflows/generate_assets.yml:
    • Deleted the previous "Create Release Assets" and "Compress and Prepare Release Assets" phases (no more Brotli compression, MD5 generation, or SCP upload in that workflow).
  • Gradle cleanup:
    • Removed the bundlePluginArtifactsForRelease task from app/build.gradle.kts.
    • Removed plugin-artifacts.zip.br from the releaseAssets list.
    • Removed task dependencies that previously wired bundlePluginArtifactsForRelease into assembleV8Release / assembleV7Release and related lint tasks.
  • Plugin integration:
    • Added AndroidIDEAssetsPlugin.registerPluginArtifactsCopierTask(variant, variantName) to register copy{Variant}PluginArtifacts, which copies createPluginArtifactsZip output from :app into assets and conditionally uses Brotli-wrapping AddBrotliFileToAssetsTask or AddFileToAssetsTask based on variant bundling.
    • The new task moves plugin-artifacts handling into the composite build plugin’s variant flow (copy-if-present + conditional compression).

Risks & Concerns

  • ⚠️ Build reproducibility: Removal of compression/upload steps from the workflow and relocation of artifact handling increases risk of divergence between local, CI, and release behaviors—developers may not reproduce CI/release artifacts exactly.
  • ⚠️ Missing-artifact masking: Copy tasks are conditional ("if source exists"); absent plugin-artifacts.zip may be silently skipped, leading to releases missing plugins without failing the build.
  • ⚠️ Verification gap: MD5 generation and explicit integrity checks for plugin-artifacts were removed from the release pipeline, reducing automated verification of artifact integrity.
  • ⚠️ Separation-of-concerns & complexity: Compression/packaging logic is split between Gradle (artifact creation) and a new plugin-level copying/compression flow, increasing maintenance complexity and potential for coordination bugs.
  • ⚠️ Backward compatibility: Consumers or release processes that relied on plugin-artifacts.zip.br being present in releaseAssets will need updating; automation expecting that asset must be adapted.

Recommended mitigations

  • Reintroduce explicit failure or warnings when expected plugin-artifacts.zip is missing for release variants.
  • Restore or replace integrity checks (e.g., MD5/SHA) for plugin-artifacts in the release pipeline.
  • Document the new artifact flow and update CI/release docs so maintainers and contributors can reproduce releases locally.

Walkthrough

Removed release-time bundling, compression, checksum generation, and upload of plugin-artifacts; removed the Gradle bundling task; added an assets-plugin-registered copy task to pull plugin-artifacts.zip into app assets during variant setup.

Changes

Cohort / File(s) Summary
Release Workflow
\.github/workflows/generate_assets.yml
Deleted the "Create Release Assets" and "Compress and Prepare Release Assets" phases: no longer compresses, MD5s, or SCP-uploads plugin-artifacts as part of the workflow.
Gradle Build Configuration
app/build.gradle.kts
Removed bundlePluginArtifactsForRelease task, removed its wiring from lint/assemble V7/V8 release variants, and removed the plugin-artifacts.zip.br entry from releaseAssets.
Assets Build Plugin
composite-builds/build-logic/plugins/src/main/java/.../AndroidIDEAssetsPlugin.kt
Added registerPluginArtifactsCopierTask(variant, variantName) and invoked it in variant processing to register a copy task that triggers :app:createPluginArtifactsZip and places (optionally brotli-wrapped) plugin-artifacts.zip into app assets.

Sequence Diagram(s)

(Skipped — changes are localized and do not require a multi-component sequential visualization.)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • hal-eisen-adfa
  • jomen-adfa
  • jatezzz

Poem

🐰 I copied artifacts with a hop and a skip,

plugin zip snug in the app's little ship.
No release bundler dangling on trees,
Just tidy assets, compressed if you please.
Hooray — a leaner build, a joyful nip! 🎉

🚥 Pre-merge checks | ✅ 1 | ❌ 2
❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Description check ❓ Inconclusive No pull request description was provided by the author, making it impossible to assess relevance to the changeset. Add a description explaining the purpose of relocating plugin artifacts handling from the release workflow to the asset plugin and how this fixes the compression issue.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Fix plugin-artifacts.zip compression for release builds' directly aligns with the main changes: removing the old release asset packaging/compression workflow and relocating plugin artifacts copying to the asset plugin.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


📜 Recent review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9baf423 and 61976ac.

📒 Files selected for processing (1)
  • .github/workflows/generate_assets.yml
💤 Files with no reviewable changes (1)
  • .github/workflows/generate_assets.yml

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 and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
composite-builds/build-logic/plugins/src/main/java/com/itsaky/androidide/plugins/AndroidIDEAssetsPlugin.kt (1)

87-88: Consider using the task output provider for better maintainability.

The current implementation hardcodes the file path. For consistency with registerCoGoPluginApiJarCopierTask and better robustness, consider using the task output provider:

{ project -> project.tasks.named("createPluginArtifactsZip", Zip::class.java).flatMap { it.archiveFile } }

This approach:

  • Explicitly references the task output
  • Adapts automatically if the task output location changes
  • Maintains consistency with similar patterns in the codebase
♻️ Proposed refactor
 	val inputFile: (Project) -> Provider<RegularFile> =
-		{ _ -> rootProject.providers.provider { rootProject.layout.projectDirectory.file("assets/plugin-artifacts.zip") } }
+		{ project -> project.tasks.named("createPluginArtifactsZip", Zip::class.java).flatMap { it.archiveFile } }
📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f57a6b0 and 9baf423.

📒 Files selected for processing (3)
  • .github/workflows/generate_assets.yml
  • app/build.gradle.kts
  • composite-builds/build-logic/plugins/src/main/java/com/itsaky/androidide/plugins/AndroidIDEAssetsPlugin.kt
🧰 Additional context used
🧬 Code graph analysis (1)
composite-builds/build-logic/plugins/src/main/java/com/itsaky/androidide/plugins/AndroidIDEAssetsPlugin.kt (1)
composite-builds/build-logic/plugins/src/main/java/com/itsaky/androidide/plugins/conf/AndroidModuleConf.kt (1)
  • hasBundledAssets (66-66)
⏰ Context from checks skipped due to timeout of 300000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Build Universal APK
🔇 Additional comments (5)
app/build.gradle.kts (2)

722-726: LGTM! Release task dependencies correctly updated.

The removal of bundlePluginArtifactsForRelease dependency is correct, as plugin artifacts are now handled through the AndroidIDEAssetsPlugin copy task mechanism. The remaining dependencies on llama assets and optional release asset downloads are appropriate.


739-743: LGTM! Consistent with V8 release task changes.

The V7 release task dependencies mirror the V8 changes correctly, maintaining consistency across architectures.

.github/workflows/generate_assets.yml (2)

164-168: LGTM! Workflow correctly updated for refactored plugin artifacts handling.

Removing :app:bundlePluginArtifactsForRelease is correct since that task no longer exists. The llama assets tasks remain, which is appropriate for this workflow phase.


210-210: LGTM! Plugin artifacts now compressed via standard release asset flow.

The addition of plugin-artifacts.zip compression is correct and aligns with the refactored approach. The compress_file function safely handles the case where the source file may not exist (line 192 check), ensuring robustness. The file will be available from the createPluginArtifactsZip task that runs as part of assembleAssets (line 154-160).

composite-builds/build-logic/plugins/src/main/java/com/itsaky/androidide/plugins/AndroidIDEAssetsPlugin.kt (1)

74-75: Plugin artifacts handling properly integrated.

The registerPluginArtifactsCopierTask is correctly placed in the variant processing flow with appropriate asset handling: AddBrotliFileToAssetsTask for bundled (release) builds and AddFileToAssetsTask for standard builds. The old bundlePluginArtifactsForRelease task has been fully removed with no remaining references.

@Daniel-ADFA Daniel-ADFA merged commit 3ec19ad into stage Jan 7, 2026
2 checks passed
@Daniel-ADFA Daniel-ADFA deleted the ADFA-2496-fix-plugin-artifact branch January 7, 2026 14:27
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