From 4146e40f0eb4f79c7b48cbf158acfc0ab9dd3535 Mon Sep 17 00:00:00 2001 From: Lee Kellogg Date: Wed, 14 Sep 2022 13:28:37 -0400 Subject: [PATCH 1/2] Minor updates to the App Distribution test app. (#4088) --- .../appdistribution/testapp/MainActivity.kt | 5 +++-- .../test-app/test-app.gradle | 22 +++++++++++-------- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/firebase-appdistribution/test-app/src/main/java/com/googletest/firebase/appdistribution/testapp/MainActivity.kt b/firebase-appdistribution/test-app/src/main/java/com/googletest/firebase/appdistribution/testapp/MainActivity.kt index 8165362dacd..1269b8def4c 100644 --- a/firebase-appdistribution/test-app/src/main/java/com/googletest/firebase/appdistribution/testapp/MainActivity.kt +++ b/firebase-appdistribution/test-app/src/main/java/com/googletest/firebase/appdistribution/testapp/MainActivity.kt @@ -12,13 +12,14 @@ import androidx.appcompat.app.AppCompatActivity import androidx.appcompat.widget.AppCompatButton import com.google.android.gms.tasks.Task import com.google.firebase.appdistribution.AppDistributionRelease -import com.google.firebase.appdistribution.FirebaseAppDistribution import com.google.firebase.appdistribution.UpdateProgress +import com.google.firebase.appdistribution.ktx.appDistribution +import com.google.firebase.ktx.Firebase import java.util.concurrent.ExecutorService import java.util.concurrent.Executors class MainActivity : AppCompatActivity() { - var firebaseAppDistribution: FirebaseAppDistribution = FirebaseAppDistribution.getInstance() + var firebaseAppDistribution = Firebase.appDistribution var updateTask: Task? = null var release: AppDistributionRelease? = null val executorService: ExecutorService = Executors.newFixedThreadPool(1) diff --git a/firebase-appdistribution/test-app/test-app.gradle b/firebase-appdistribution/test-app/test-app.gradle index 36cf33372ca..d8a0517ab9e 100644 --- a/firebase-appdistribution/test-app/test-app.gradle +++ b/firebase-appdistribution/test-app/test-app.gradle @@ -18,12 +18,12 @@ plugins { } android { - compileSdkVersion 30 + compileSdkVersion 31 defaultConfig { applicationId "com.googletest.firebase.appdistribution.testapp" minSdkVersion 19 - targetSdkVersion 30 + targetSdkVersion 31 versionName "1.0" versionCode 1 @@ -31,12 +31,13 @@ android { } buildTypes { - // This is so we can build the "release" variant for the "dev-app" (and the SDK) without + // This is so we can build the "release" variant for the "test-app" (and the SDK) without // needing to have the app signed. release { initWith debug } } + compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 @@ -50,15 +51,18 @@ dependencies { // TODO(rachelprince): Add flag to build with public version of SDK println("Building with HEAD version ':firebase-appdistribution' of SDK") - // Debug variant uses full SDK - debugImplementation project(':firebase-appdistribution-api') // TODO(lkellogg): why doesn't this get picked up transitively? - debugImplementation project(':firebase-appdistribution') - - // Release variant just uses the API, as if publishing to Play - releaseImplementation project(':firebase-appdistribution-api') + // All variants use the API + implementation project(':firebase-appdistribution-api:ktx') + // In this test project we also need to explicitly declare these dependencies + implementation project(':firebase-appdistribution-api') + implementation project(':firebase-common:ktx') implementation "com.google.android.gms:play-services-tasks:18.0.1" + // Debug uses the full implementation + debugImplementation project(':firebase-appdistribution') + + // Other dependencies implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion" implementation 'androidx.core:core-ktx:1.5.0' implementation "androidx.core:core:1.6.0" From a6c709bb7fe50c9d067a340502a1121cd2ddf0b2 Mon Sep 17 00:00:00 2001 From: Kai Bolay Date: Thu, 15 Sep 2022 09:30:50 -0400 Subject: [PATCH 2/2] Update various versions (#4090) * Updated various versions (dependencies and SDK to fix Android resource linking failure (AAPT: error: resource android:attr/lStar not found.) * Update compileSdk/targetSdkVersion from 31 to 33 --- .../test-app/test-app.gradle | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/firebase-appdistribution/test-app/test-app.gradle b/firebase-appdistribution/test-app/test-app.gradle index d8a0517ab9e..f1cd4436e38 100644 --- a/firebase-appdistribution/test-app/test-app.gradle +++ b/firebase-appdistribution/test-app/test-app.gradle @@ -18,12 +18,12 @@ plugins { } android { - compileSdkVersion 31 + compileSdk 33 defaultConfig { applicationId "com.googletest.firebase.appdistribution.testapp" minSdkVersion 19 - targetSdkVersion 31 + targetSdkVersion 33 versionName "1.0" versionCode 1 @@ -57,18 +57,18 @@ dependencies { // In this test project we also need to explicitly declare these dependencies implementation project(':firebase-appdistribution-api') implementation project(':firebase-common:ktx') - implementation "com.google.android.gms:play-services-tasks:18.0.1" + implementation "com.google.android.gms:play-services-tasks:18.0.2" // Debug uses the full implementation debugImplementation project(':firebase-appdistribution') // Other dependencies implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion" - implementation 'androidx.core:core-ktx:1.5.0' - implementation "androidx.core:core:1.6.0" - implementation 'androidx.appcompat:appcompat:1.3.0' - implementation 'com.google.android.material:material:1.2.1' - implementation 'androidx.constraintlayout:constraintlayout:2.0.4' + implementation 'androidx.core:core-ktx:1.9.0' + implementation "androidx.core:core:1.9.0" + implementation 'androidx.appcompat:appcompat:1.5.1' + implementation 'com.google.android.material:material:1.6.1' + implementation 'androidx.constraintlayout:constraintlayout:2.1.4' testImplementation 'junit:junit:4.+' }