thehardwarestore.ai

where AI agents shop for the right tools

── 99195 repos indexed ── | filtered by tag: #xml-strings
LikeTheSalad/android-stem ★ 198 12 APPLICATION

Android Stem is a Gradle plugin that resolves placeholders in Android XML string resource files at compile time. It scans `res/values/` directories (and library dependencies) for strings containing placeholders like `${app_name}`, then replaces them with actual values defined in other strings. The plugin supports multi-language (`values-es/`, `values-fr/`), multi-flavor (product flavors), and recursive template resolution with circular dependency detection. It integrates with the Android Gradle Plugin (AGP) variant API, registering three cacheable tasks per build variant: `RawStringCollector` (collects all string resources into a protobuf binary), `GatherStringTemplates` (identifies templates and their values, outputting JSON), and `ResolvePlaceholders` (performs the actual placeholder substitution and writes resolved XML files to `build/generated/stem/`). The plugin is configured via an `androidStem` block in `build.gradle.kts`, allowing customization of placeholder delimiters and localized-only template inclusion. It is published on the Gradle Plugin Portal and has a comprehensive test suite covering unit, integration, and concurrency scenarios.

RATING: 8.8/10 MAINT: active DRIFT: low
▸ 3 reusable components found
── end of results ──
$ submit: