Skip to content

Commit 11b2cd3

Browse files
committed
Configure Firebase appdistribution plugin
1 parent 388a380 commit 11b2cd3

File tree

2 files changed

+18
-3
lines changed

2 files changed

+18
-3
lines changed

build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ buildscript {
2424
classpath libs.gradle.gradlePlugin
2525
classpath libs.gradle.kotlinPlugin
2626
classpath libs.gradle.hiltPlugin
27+
classpath 'com.google.firebase:firebase-appdistribution-gradle:3.0.2'
2728
classpath 'com.google.gms:google-services:4.3.13'
2829
classpath 'org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:3.4.0.2513'
2930
classpath 'com.google.android.gms:oss-licenses-plugin:0.10.5'

vector/build.gradle

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import com.android.build.OutputFile
22

33
apply plugin: 'com.android.application'
4+
apply plugin: 'com.google.firebase.appdistribution'
45
apply plugin: 'com.google.android.gms.oss-licenses-plugin'
56
apply plugin: 'kotlin-android'
67
apply plugin: 'kotlin-parcelize'
@@ -229,10 +230,10 @@ android {
229230
storePassword 'android'
230231
}
231232
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")
234235
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")
236237
}
237238
release {
238239
keyAlias project.property("signing.element.keyId")
@@ -285,6 +286,19 @@ android {
285286
resValue "color", "launcher_background", "#07007E"
286287
matchingFallbacks = ['release']
287288
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+
}
288302
}
289303
}
290304

0 commit comments

Comments
 (0)