// Injected at build time with `--init-script` so it survives `expo prebuild` // regenerating android/. Overrides the release signing config to use the // keystore + credentials supplied via environment variables in CI. gradle.projectsLoaded { rootProject.subprojects { sub -> sub.afterEvaluate { if (sub.plugins.hasPlugin('com.android.application')) { def storeFilePath = System.getenv('CAMPSCAN_STORE_FILE') if (storeFilePath == null || storeFilePath.isEmpty()) { return } sub.android { signingConfigs { campscanRelease { storeFile file(storeFilePath) storePassword System.getenv('CAMPSCAN_STORE_PASSWORD') keyAlias System.getenv('CAMPSCAN_KEY_ALIAS') keyPassword System.getenv('CAMPSCAN_KEY_PASSWORD') } } buildTypes { release { signingConfig signingConfigs.campscanRelease } } } } } } }