Cleanup Legacy App Logo Artifacts Task
One-shot migration helper: removes app-logo files that would otherwise sit as orphans or actively break the resource merge after adopting the FG+BG pipeline.
Files migrated (only when present):
${androidResDir}/drawable/ic_launcher.xml: pre-FG/BG generated artifact.${androidResDir}/values/ic_launcher_background.xml: pre-FG/BG artifact.template launcher icons under each
mipmap-<density>dir (typicallyic_launcher.webpfrom the Android Studio wizard) that collide with the generated.pngof the same stem and fail AAPT2's merge.on first contact only, any existing file at a path the current installer will claim, including Android Studio's adaptive-icon XML wrappers and same-name PNGs. Once an ownership manifest exists, current managed outputs are preserved and only the sync task may validate or replace them.
This task never assumes a familiar filename implies plugin ownership. Every candidate is copied to a checksummed durable .kiteconfig/recovery backup and recorded in a provenance manifest before the original is removed. Honors dryRun (lists what it would migrate, writes/removes nothing).
Safety rails on every source-writing task
| Rail | Behaviour |
|---|---|
| Explicit only | never runs as part of an ordinary build; you invoke it by name |
| Authorized | the matching DSL block must be configured, or the task is skipped |
-Pkiteconfig.dryRun=true | reports what it would write and remove, changes nothing |
-Pkiteconfig.backups=true | keeps a recovery copy before replacing anything (default) |
| Ownership | refuses to overwrite or delete a file it does not own |
| Atomic | staged then swapped, so an interrupted run leaves the tree intact |
Both -P switches accept exactly true or false; anything else fails the build rather than being read as false.