|
1 | 1 | import com.android.build.OutputFile |
2 | 2 |
|
3 | 3 | apply plugin: 'com.android.application' |
| 4 | +apply plugin: 'com.google.firebase.appdistribution' |
4 | 5 | apply plugin: 'com.google.android.gms.oss-licenses-plugin' |
5 | 6 | apply plugin: 'kotlin-android' |
6 | 7 | apply plugin: 'kotlin-parcelize' |
@@ -229,10 +230,10 @@ android { |
229 | 230 | storePassword 'android' |
230 | 231 | } |
231 | 232 | nightly { |
232 | | - keyAlias project.property("signing.element.nightly.keyId") |
233 | | - keyPassword project.property("signing.element.nightly.keyPassword") |
| 233 | + keyAlias System.env.ELEMENT_ANDROID_NIGHTLY_KEYID ?: project.property("signing.element.nightly.keyId") |
| 234 | + keyPassword System.env.ELEMENT_ANDROID_NIGHTLY_KEYPASSWORD ?: project.property("signing.element.nightly.keyPassword") |
234 | 235 | storeFile file('./signature/nightly.keystore') |
235 | | - storePassword project.property("signing.element.nightly.storePassword") |
| 236 | + storePassword System.env.ELEMENT_ANDROID_NIGHTLY_STOREPASSWORD ?: project.property("signing.element.nightly.storePassword") |
236 | 237 | } |
237 | 238 | release { |
238 | 239 | keyAlias project.property("signing.element.keyId") |
@@ -285,6 +286,19 @@ android { |
285 | 286 | resValue "color", "launcher_background", "#07007E" |
286 | 287 | matchingFallbacks = ['release'] |
287 | 288 | signingConfig signingConfigs.nightly |
| 289 | + firebaseAppDistribution { |
| 290 | + artifactType = "APK" |
| 291 | + // We upload the universal APK to fix this error: |
| 292 | + // "App Distribution found more than 1 output file for this variant. |
| 293 | + // Please contact [email protected] for help using APK splits with App Distribution." |
| 294 | + artifactPath = "$rootDir/vector/build/outputs/apk/gplay/nightly/vector-gplay-universal-nightly.apk" |
| 295 | + // This file will be generated by the GitHub action |
| 296 | + releaseNotesFile = "CHANGES_NIGHTLY.md" |
| 297 | + groups = "external-testers" |
| 298 | + // This should not be required, but if I do not add the appId, I get this error: |
| 299 | + // "App Distribution halted because it had a problem uploading the APK: [404] Requested entity was not found." |
| 300 | + appId = "1:912726360885:android:efd8545af52a9f9300427c" |
| 301 | + } |
288 | 302 | } |
289 | 303 | } |
290 | 304 |
|
|
0 commit comments