Skip to content

Commit 18f6f50

Browse files
authored
Minor updates to the App Distribution test app. (#4088) (#4089)
1 parent 9baaf72 commit 18f6f50

File tree

2 files changed

+16
-9
lines changed

2 files changed

+16
-9
lines changed

firebase-appdistribution/test-app/src/main/java/com/googletest/firebase/appdistribution/testapp/MainActivity.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,14 @@ import androidx.appcompat.app.AppCompatActivity
1212
import androidx.appcompat.widget.AppCompatButton
1313
import com.google.android.gms.tasks.Task
1414
import com.google.firebase.appdistribution.AppDistributionRelease
15-
import com.google.firebase.appdistribution.FirebaseAppDistribution
1615
import com.google.firebase.appdistribution.UpdateProgress
16+
import com.google.firebase.appdistribution.ktx.appDistribution
17+
import com.google.firebase.ktx.Firebase
1718
import java.util.concurrent.ExecutorService
1819
import java.util.concurrent.Executors
1920

2021
class MainActivity : AppCompatActivity() {
21-
var firebaseAppDistribution: FirebaseAppDistribution = FirebaseAppDistribution.getInstance()
22+
var firebaseAppDistribution = Firebase.appDistribution
2223
var updateTask: Task<Void>? = null
2324
var release: AppDistributionRelease? = null
2425
val executorService: ExecutorService = Executors.newFixedThreadPool(1)

firebase-appdistribution/test-app/test-app.gradle

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ plugins {
1919
}
2020

2121
android {
22-
compileSdkVersion 30
22+
compileSdkVersion 31
2323

2424
defaultConfig {
2525
applicationId "com.googletest.firebase.appdistribution.testapp"
2626
minSdkVersion 19
27-
targetSdkVersion 30
27+
targetSdkVersion 31
2828
versionName "1.0"
2929
versionCode 1
3030

@@ -33,7 +33,7 @@ android {
3333

3434
buildTypes {
3535
release {
36-
// This is so we can build the "release" variant for the "dev-app" (and the SDK) without
36+
// This is so we can build the "release" variant for the "test-app" (and the SDK) without
3737
// needing to have the app signed.
3838
initWith debug
3939
}
@@ -45,6 +45,7 @@ android {
4545
}
4646
}
4747
}
48+
4849
compileOptions {
4950
sourceCompatibility JavaVersion.VERSION_1_8
5051
targetCompatibility JavaVersion.VERSION_1_8
@@ -58,13 +59,18 @@ dependencies {
5859
// TODO(rachelprince): Add flag to build with public version of SDK
5960
println("Building with HEAD version ':firebase-appdistribution' of SDK")
6061

61-
// Include the API in all variants
62-
implementation project(':firebase-appdistribution-api')
63-
// Only include the full SDK implementation in the debug variant
64-
debugImplementation project(':firebase-appdistribution')
62+
// All variants use the API
63+
implementation project(':firebase-appdistribution-api:ktx')
6564

65+
// In this test project we also need to explicitly declare these dependencies
66+
implementation project(':firebase-appdistribution-api')
67+
implementation project(':firebase-common:ktx')
6668
implementation "com.google.android.gms:play-services-tasks:18.0.1"
6769

70+
// Debug uses the full implementation
71+
debugImplementation project(':firebase-appdistribution')
72+
73+
// Other dependencies
6874
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion"
6975
implementation 'androidx.core:core-ktx:1.5.0'
7076
implementation "androidx.core:core:1.6.0"

0 commit comments

Comments
 (0)