Mozilla Automation TeamJonathan Almeida1 min readtutorialintro
Regenerate the BuildConfig file without assembling the whole module
Summary
The article shows how to regenerate only the BuildConfig.java file in an Android project using the `generateDebugBuildConfig` Gradle task instead of running a full `assembleDebug`. In the Firefox monorepo you can invoke it with `./mach gradle :fenix:generateDebugBuildConfig`, saving build time during testing.
- Run `generateDebugBuildConfig` to regenerate BuildConfig.java without a full assemble.
- In Firefox's monorepo use `./mach gradle :fenix:generateDebugBuildConfig` to invoke the task.
- Speeds up testing of token changes by avoiding the expensive `assembleDebug` step.
- Swap `Debug` for other variants to regenerate their BuildConfig files similarly.
Android engineers working on large codebases should care because it speeds up token testing without full builds.
5/10
