Android
AuraScore 81/100

White-Label Enterprise Android Build and Variant Verification Engine

Construct a Gradle and Shell build matrix script to automate multi-tenant white-label Android APK/AAB packaging and symbol obfuscation.

Use this template when building multi-tenant or white-label Android solutions for professional services clients. It delivers an automated build engine that signs variants, injects configurations, and verifies R8 obfuscation.

Template

Role: Enterprise Mobile Systems Architect specializing in multi-tenant Android build systems and release engineering.

Context

  • Client solution suite: {{firm_portfolio_name}}
  • Tenant flavor configuration: {{flavor_matrix_config}}
  • Secure vault key URI: {{signing_config_vault_uri}}
  • Custom ProGuard dictionary path: {{obfuscation_dictionary_path}}
  • Target Gradle distribution: {{target_gradle_version}}
  • Artifact distribution channel: {{distribution_channel}}

Task

Develop an enterprise Gradle Kotlin DSL plugin and accompanying bash driver script that compiles, signs, verifies, and packages multi-tenant white-label variants of {{firm_portfolio_name}} based on {{flavor_matrix_config}}, pulls signing credentials securely from {{signing_config_vault_uri}}, applies dictionary obfuscation via {{obfuscation_dictionary_path}}, and validates artifact readiness for {{distribution_channel}}.

Method

  1. Parse {{flavor_matrix_config}} to dynamically generate Android Product Flavors and Dimension matrices in Gradle.
  2. Fetch cryptographic signing materials dynamically from {{signing_config_vault_uri}} into in-memory keystore configurations.
  3. Configure R8 full-mode optimization rules applying class and method renaming using {{obfuscation_dictionary_path}}.
  4. Execute parallel compilation tasks using {{target_gradle_version}} for all defined tenant flavors.
  5. Run an automated post-build verification script that unzips generated APK/AAB artifacts to assert tenant asset isolation.
  6. Inspect mapping.txt and seed.txt to mathematically verify that proprietary corporate SDKs are obfuscated.
  7. Package verified bundles and upload status metadata directly to {{distribution_channel}}.

Constraints

  • MUST provide fully working Gradle KTS configuration code compatible with {{target_gradle_version}}.
  • MUST NOT write signing keys, keystore passwords, or tenant tokens to disk or standard logs.
  • Build verification steps MUST fail the build if unexpected cross-tenant assets leak across product flavors.
  • Gradle configuration MUST maintain configuration cache compatibility throughout the execution.

Output format

  • Section 1: Dynamic Gradle KTS Multi-Flavor Configuration (60-90 lines)
  • Section 2: ProGuard and R8 Optimization Verification Script (Python, 40-60 lines)
  • Section 3: Master Shell Automation Orchestrator (Bash, 50-80 lines)
  • Section 4: Quality Gate and Asset Leak Checklist (5-8 numbered items)

Self-review

  • Ensure {{firm_portfolio_name}}, {{flavor_matrix_config}}, {{signing_config_vault_uri}}, {{obfuscation_dictionary_path}}, {{target_gradle_version}}, and {{distribution_channel}} are referenced.
  • Verify that dynamic signing logic avoids storing credentials in static Gradle build files.
  • Confirm that cross-tenant asset assertion logic systematically inspects res/ and assets/ folders.
AuraScore breakdown
81/100Provisional
Instruction clarity15/15 · Strong

Explicit role, a named task, and discrete steps the model can follow.

Context architecture12/12 · Strong

Background, inputs and variables the model needs before it starts.

Constraint engineering12/12 · Strong

Hard boundaries — what the model must and must not do.

Output specification6/14 · Thin

A named, field-level shape for the response.

Reasoning structure10/10 · Strong

Ordered work items that force analysis before an answer.

Model compatibility10/10 · Strong

Length and structure that travel across frontier models.

Token efficiency5/10 · Thin

Signal density — instruction weight without padding.

Reusability7/7 · Strong

Documented variables so the scaffold adapts to new inputs.

Robustness3/5 · Adequate

Quality bar, assumptions and behaviour when inputs are thin.

Observed performance1/5 · Thin

How much real usage the template has behind it.

developers
developers-android
professional-services
android
gradle
whitelabel