Skip to content

Commit 560d081

Browse files
authored
Merge bd3621c into e6226b7
2 parents e6226b7 + bd3621c commit 560d081

File tree

2 files changed

+16
-11
lines changed

2 files changed

+16
-11
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 & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,25 +18,26 @@ plugins {
1818
}
1919

2020
android {
21-
compileSdkVersion 30
21+
compileSdkVersion 31
2222

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

3030
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
3131
}
3232

3333
buildTypes {
34-
// This is so we can build the "release" variant for the "dev-app" (and the SDK) without
34+
// This is so we can build the "release" variant for the "test-app" (and the SDK) without
3535
// needing to have the app signed.
3636
release {
3737
initWith debug
3838
}
3939
}
40+
4041
compileOptions {
4142
sourceCompatibility JavaVersion.VERSION_1_8
4243
targetCompatibility JavaVersion.VERSION_1_8
@@ -50,15 +51,18 @@ dependencies {
5051
// TODO(rachelprince): Add flag to build with public version of SDK
5152
println("Building with HEAD version ':firebase-appdistribution' of SDK")
5253

53-
// Debug variant uses full SDK
54-
debugImplementation project(':firebase-appdistribution-api') // TODO(lkellogg): why doesn't this get picked up transitively?
55-
debugImplementation project(':firebase-appdistribution')
56-
57-
// Release variant just uses the API, as if publishing to Play
58-
releaseImplementation project(':firebase-appdistribution-api')
54+
// All variants use the API
55+
implementation project(':firebase-appdistribution-api:ktx')
5956

57+
// In this test project we also need to explicitly declare these dependencies
58+
implementation project(':firebase-appdistribution-api')
59+
implementation project(':firebase-common:ktx')
6060
implementation "com.google.android.gms:play-services-tasks:18.0.1"
6161

62+
// Debug uses the full implementation
63+
debugImplementation project(':firebase-appdistribution')
64+
65+
// Other dependencies
6266
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion"
6367
implementation 'androidx.core:core-ktx:1.5.0'
6468
implementation "androidx.core:core:1.6.0"

0 commit comments

Comments
 (0)