ADFA-4186 Remove obsolete template assets from the APK#1467
Conversation
The legacy code-driven template engine was replaced by the .cgt archive system (TemplateProviderImpl loads core.cgt at runtime), leaving the old base template resources under templates-api/src/main/assets/templates/base as dead weight shipped in every APK. Delete the orphaned asset tree (20 files) and the now-unused baseAsset() helper. No callers remain and no behavior changes; new-project creation is driven by core.cgt. Verified: :app:assembleV8Debug builds; the APK no longer contains assets/templates/base/* while the live assets/templates/xml/* and assets/widgetclasses.json remain.
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review to trigger a review and subscribe this PR to future pushes, or @claude review once for a one-time review.
Tip: disable this comment in your organization's Code Review settings.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (21)
💤 Files with no reviewable changes (10)
📝 Walkthrough
WalkthroughThis PR removes legacy Android base template asset files (ProGuard rules, drawable icons, adaptive icon XMLs, backup/data extraction rules, gitignore, gradle.properties) and deletes the unused ChangesLegacy Template Asset Removal
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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 |
Summary
The legacy code-driven template engine was replaced by the
.cgtarchive system (TemplateProviderImplloadscore.cgtat runtime). Its old base template resources undertemplates-api/src/main/assets/templates/base/are dead weight shipped in every APK. This deletes the orphaned asset tree (20 files) and the now-unusedbaseAsset()helper.No behavior change — new-project creation is driven by
core.cgt, not these assets.Per the ticket discussion (@joelmenchavez), the
templates-api/src/main/assetsfiles are removable; the layout-editor / XML-template assets are still in use and are left untouched.Changes
git rm -r templates-api/src/main/assets/templates/base— 20 files; this empties the module'sassets/dir entirely.baseAsset()function fromtemplates-api/.../base/util/utils.kt(no callers; imports unchanged).Evidence it's dead
baseAsset()had zero callers (only false positive:getDatabaseAsset(...)).templates/basereference was insidebaseAsset()'s own body.Verification
./gradlew :app:assembleV8Debug→ BUILD SUCCESSFUL.assets/templates/base/*, whileassets/templates/xml/{drawable,layout,menu}.xmlandassets/widgetclasses.jsonremain present.Not touched (still live)
app/src/main/assets/templates/xml/*(read viaProjectWriter.XML_TEMPLATE_PATH)layouteditor/src/main/assets/widgetclasses.json(read viaConvertImportedXml.kt)Closes ADFA-4186.