File tree Expand file tree Collapse file tree 3 files changed +13
-1
lines changed
Expand file tree Collapse file tree 3 files changed +13
-1
lines changed Original file line number Diff line number Diff line change 55 push :
66 branches : [ "main" ]
77
8+ env :
9+ EMAIL_API_KEY : ' FAKE_KEY_TO_PASS_CI'
10+
811jobs :
912 android-post-check :
1013
Original file line number Diff line number Diff line change 66 pull_request :
77 branches : [ "main" ]
88
9+ env :
10+ EMAIL_API_KEY : ' FAKE_KEY_TO_PASS_CI'
11+
912jobs :
1013 android-build :
1114 runs-on : ubuntu-latest
Original file line number Diff line number Diff line change @@ -33,7 +33,13 @@ android {
3333 project.rootProject.file(" local.properties" ).takeIf { it.exists() }?.inputStream()?.use {
3434 Properties ().apply { load(it) }
3535 }
36- val apiKey = localProperties?.getProperty(" EMAIL_API_KEY" ) ? : " MISSING-KEY"
36+ val apiKey = System .getenv(" EMAIL_API_KEY" ) ? : localProperties?.getProperty(" EMAIL_API_KEY" ) ? : " "
37+ if (apiKey.isBlank()) {
38+ error("""
39+ EMAIL_API_KEY is not set in `local.properties`
40+ Please add 'EMAIL_API_KEY=your_api_key' to `local.properties` file.
41+ """ .trimIndent())
42+ }
3743 buildConfigField(" String" , " EMAIL_API_KEY" , " \" $apiKey \" " )
3844
3945 // Git commit hash to identify build source
You can’t perform that action at this time.
0 commit comments