Android Studio Flamingo: Skip production credentials toggle behavior for unit test configurations
0 reputation · 28 Dec 2020, 22:37 UTC
The goal is to prevent production API keys from being exposed during unit test execution when the “Skip production credentials” run‑configuration option is enabled in Android Studio Flamingo (2022.2.1).
Currently the option only replaces values in the merged manifest for the debug build variant; unit test configurations that run via the JUnit test runner continue to use the original production values unless a separate testBuildType is defined. This leaves an unresolved decision about whether the IDE should automatically apply the same placeholder substitution to test JVMs or require manual configuration.
Should the “Skip production credentials” toggle automatically affect unit test run configurations? If not, what is the recommended way to achieve credential substitution for tests without defining a custom testBuildType? Are there any drawbacks or side‑effects of extending the toggle to cover test configurations?