Fix plugin-artifacts.zip compression for release builds#801
Fix plugin-artifacts.zip compression for release builds#801Daniel-ADFA merged 2 commits intostagefrom
Conversation
📝 WalkthroughRelease Notes - Fix plugin-artifacts.zip compression for release buildsChanges
Risks & Concerns
Recommended mitigations
WalkthroughRemoved 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 Changes
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
Poem
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 📜 Recent review detailsConfiguration used: Organization UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
💤 Files with no reviewable changes (1)
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. Comment |
There was a problem hiding this comment.
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
registerCoGoPluginApiJarCopierTaskand 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
📒 Files selected for processing (3)
.github/workflows/generate_assets.ymlapp/build.gradle.ktscomposite-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
bundlePluginArtifactsForReleasedependency is correct, as plugin artifacts are now handled through theAndroidIDEAssetsPlugincopy 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:bundlePluginArtifactsForReleaseis 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.zipcompression is correct and aligns with the refactored approach. Thecompress_filefunction safely handles the case where the source file may not exist (line 192 check), ensuring robustness. The file will be available from thecreatePluginArtifactsZiptask that runs as part ofassembleAssets(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
registerPluginArtifactsCopierTaskis correctly placed in the variant processing flow with appropriate asset handling:AddBrotliFileToAssetsTaskfor bundled (release) builds andAddFileToAssetsTaskfor standard builds. The oldbundlePluginArtifactsForReleasetask has been fully removed with no remaining references.
No description provided.