diff --git a/admob/app/build.gradle b/admob/app/build.gradle index 31978c13a3..823250b0ad 100644 --- a/admob/app/build.gradle +++ b/admob/app/build.gradle @@ -7,17 +7,20 @@ plugins { check.dependsOn 'assembleDebugAndroidTest' android { - compileSdkVersion 33 + compileSdk 33 defaultConfig { applicationId "com.google.samples.quickstart.admobexample" - minSdkVersion 19 - targetSdkVersion 33 + minSdk 21 // minSdk would be 19 without compose + targetSdk 33 versionCode 1 versionName "1.0" multiDexEnabled true testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" + vectorDrawables { + useSupportLibrary true + } } buildTypes { @@ -35,6 +38,17 @@ android { buildFeatures { viewBinding = true + compose true + } + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + kotlinOptions { + jvmTarget = '1.8' + } + composeOptions { + kotlinCompilerExtensionVersion '1.3.0' } } @@ -46,6 +60,7 @@ dependencies { implementation 'androidx.browser:browser:1.0.0' implementation 'androidx.navigation:navigation-fragment-ktx:2.5.2' implementation 'androidx.navigation:navigation-ui-ktx:2.5.2' + implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.5.1' implementation 'com.google.android.gms:play-services-ads:21.2.0' @@ -56,9 +71,18 @@ dependencies { // for Google Analytics. This is recommended, but not required. implementation 'com.google.firebase:firebase-analytics' + // Jetpack Compose + implementation "androidx.compose.ui:ui:$compose_version" + implementation "androidx.compose.material:material:$compose_version" + implementation "androidx.compose.ui:ui-tooling-preview:$compose_version" + implementation 'androidx.activity:activity-compose:1.5.1' + androidTestImplementation "androidx.compose.ui:ui-test-junit4:$compose_version" + debugImplementation "androidx.fragment:fragment-testing:1.5.2" androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' androidTestImplementation 'androidx.test:rules:1.4.0' androidTestImplementation 'androidx.test:runner:1.4.0' androidTestImplementation 'androidx.test.ext:junit:1.1.3' + debugImplementation "androidx.compose.ui:ui-tooling:$compose_version" + debugImplementation "androidx.compose.ui:ui-test-manifest:$compose_version" } diff --git a/analytics/app/build.gradle b/analytics/app/build.gradle index 15ac986a2e..d8d62acd1b 100644 --- a/analytics/app/build.gradle +++ b/analytics/app/build.gradle @@ -7,16 +7,19 @@ plugins { check.dependsOn 'assembleDebugAndroidTest' android { - compileSdkVersion 33 + compileSdk 33 defaultConfig { applicationId "com.google.firebase.quickstart.analytics" - minSdkVersion 19 - targetSdkVersion 33 + minSdk 21 // minSdk would be 19 without compose + targetSdk 33 versionCode 1 versionName "1.0" testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' multiDexEnabled true + vectorDrawables { + useSupportLibrary true + } } buildTypes { @@ -28,6 +31,22 @@ android { buildFeatures { viewBinding = true + compose true + } + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + kotlinOptions { + jvmTarget = '1.8' + } + composeOptions { + kotlinCompilerExtensionVersion '1.3.0' + } + packagingOptions { + resources { + excludes += '/META-INF/{AL2.0,LGPL2.1}' + } } } @@ -40,6 +59,7 @@ dependencies { implementation "androidx.preference:preference-ktx:1.2.0" // Needed to override the version used by preference-ktx implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.1" + implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.5.1' // Import the Firebase BoM (see: https://firebase.google.com/docs/android/learn-more#bom) implementation platform('com.google.firebase:firebase-bom:30.4.1') @@ -50,8 +70,17 @@ dependencies { // Firebase Analytics (Kotlin) implementation 'com.google.firebase:firebase-analytics-ktx' + // Jetpack Compose + implementation "androidx.compose.ui:ui:$compose_version" + implementation "androidx.compose.material:material:$compose_version" + implementation "androidx.compose.ui:ui-tooling-preview:$compose_version" + implementation 'androidx.activity:activity-compose:1.5.1' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' androidTestImplementation 'androidx.test:rules:1.4.0' androidTestImplementation 'androidx.test:runner:1.4.0' androidTestImplementation 'androidx.test.ext:junit:1.1.3' + androidTestImplementation "androidx.compose.ui:ui-test-junit4:$compose_version" + debugImplementation "androidx.compose.ui:ui-tooling:$compose_version" + debugImplementation "androidx.compose.ui:ui-test-manifest:$compose_version" } diff --git a/appdistribution/app/build.gradle b/appdistribution/app/build.gradle index c28f92a1ff..51efaeabf0 100644 --- a/appdistribution/app/build.gradle +++ b/appdistribution/app/build.gradle @@ -5,15 +5,18 @@ plugins { } android { - compileSdkVersion 33 + compileSdk 33 defaultConfig { applicationId "com.google.firebase.appdistributionquickstart" - minSdkVersion 19 - targetSdkVersion 33 + minSdk 21 // minSdk would be 19 without compose + targetSdk 33 versionCode 1 versionName "1.0" multiDexEnabled true + vectorDrawables { + useSupportLibrary true + } testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } @@ -27,6 +30,22 @@ android { buildFeatures { viewBinding = true + compose true + } + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + kotlinOptions { + jvmTarget = '1.8' + } + composeOptions { + kotlinCompilerExtensionVersion '1.3.0' + } + packagingOptions { + resources { + excludes += '/META-INF/{AL2.0,LGPL2.1}' + } } lint { warning 'InvalidPackage' @@ -40,6 +59,7 @@ dependencies { implementation 'com.google.android.material:material:1.6.1' implementation 'androidx.constraintlayout:constraintlayout:2.1.4' implementation 'androidx.multidex:multidex:2.0.1' + implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.5.1' // Import the Firebase BoM (see: https://firebase.google.com/docs/android/learn-more#bom) implementation platform('com.google.firebase:firebase-bom:30.4.1') @@ -51,8 +71,17 @@ dependencies { // for Google Analytics. This is recommended, but not required. implementation 'com.google.firebase:firebase-analytics' + // Jetpack Compose + implementation "androidx.compose.ui:ui:$compose_version" + implementation "androidx.compose.material:material:$compose_version" + implementation "androidx.compose.ui:ui-tooling-preview:$compose_version" + implementation 'androidx.activity:activity-compose:1.5.1' + androidTestImplementation 'androidx.test:runner:1.4.0' androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' androidTestImplementation 'androidx.test:rules:1.4.0' androidTestImplementation 'androidx.test.uiautomator:uiautomator:2.2.0' + androidTestImplementation "androidx.compose.ui:ui-test-junit4:$compose_version" + debugImplementation "androidx.compose.ui:ui-tooling:$compose_version" + debugImplementation "androidx.compose.ui:ui-test-manifest:$compose_version" } diff --git a/auth/app/build.gradle b/auth/app/build.gradle index 118af27676..676ccdb3ae 100644 --- a/auth/app/build.gradle +++ b/auth/app/build.gradle @@ -12,11 +12,14 @@ android { defaultConfig { applicationId "com.google.firebase.quickstart.auth" - minSdkVersion 19 - targetSdkVersion 33 + minSdk 21 // minSdk would be 19 without compose + targetSdk 33 versionCode 1 versionName "1.0" multiDexEnabled true + vectorDrawables { + useSupportLibrary true + } testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' } @@ -27,13 +30,24 @@ android { } } - compileOptions { - sourceCompatibility 1.8 - targetCompatibility 1.8 - } - buildFeatures { viewBinding = true + compose true + } + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + kotlinOptions { + jvmTarget = '1.8' + } + composeOptions { + kotlinCompilerExtensionVersion '1.3.0' + } + packagingOptions { + resources { + excludes += '/META-INF/{AL2.0,LGPL2.1}' + } } } @@ -48,6 +62,14 @@ dependencies { implementation 'com.google.android.material:material:1.6.1' implementation 'androidx.navigation:navigation-fragment-ktx:2.5.2' implementation 'androidx.navigation:navigation-ui-ktx:2.5.2' + implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.1" + implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.5.1' + + // Jetpack Compose + implementation "androidx.compose.ui:ui:$compose_version" + implementation "androidx.compose.material:material:$compose_version" + implementation "androidx.compose.ui:ui-tooling-preview:$compose_version" + implementation 'androidx.activity:activity-compose:1.5.1' // Import the Firebase BoM (see: https://firebase.google.com/docs/android/learn-more#bom) implementation platform('com.google.firebase:firebase-bom:30.4.1') @@ -73,4 +95,7 @@ dependencies { androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' androidTestImplementation 'androidx.test:rules:1.4.0' androidTestImplementation 'androidx.test:runner:1.4.0' + androidTestImplementation "androidx.compose.ui:ui-test-junit4:$compose_version" + debugImplementation "androidx.compose.ui:ui-tooling:$compose_version" + debugImplementation "androidx.compose.ui:ui-test-manifest:$compose_version" } diff --git a/build.gradle b/build.gradle index 140a2c37c5..687f6de113 100644 --- a/build.gradle +++ b/build.gradle @@ -1,4 +1,7 @@ buildscript { + ext { + compose_version = '1.2.1' + } repositories { google() mavenCentral() diff --git a/crash/app/build.gradle b/crash/app/build.gradle index e466ec4e42..cc37ea276e 100644 --- a/crash/app/build.gradle +++ b/crash/app/build.gradle @@ -8,14 +8,17 @@ plugins { check.dependsOn 'assembleDebugAndroidTest' android { - compileSdkVersion 33 + compileSdk 33 defaultConfig { applicationId "com.google.samples.quickstart.crash" - minSdkVersion 19 - targetSdkVersion 33 + minSdk 21 // minSdk would be 19 without compose + targetSdk 33 versionCode 1 versionName "1.0" + vectorDrawables { + useSupportLibrary true + } testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' } @@ -33,6 +36,22 @@ android { buildFeatures { viewBinding = true + compose true + } + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + kotlinOptions { + jvmTarget = '1.8' + } + composeOptions { + kotlinCompilerExtensionVersion '1.3.0' + } + packagingOptions { + resources { + excludes += '/META-INF/{AL2.0,LGPL2.1}' + } } } @@ -41,6 +60,8 @@ dependencies { implementation project(":internal:chooserx") implementation 'com.google.android.material:material:1.6.1' implementation "androidx.activity:activity-ktx:1.5.1" + implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.1" + implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.5.1' // Import the Firebase BoM (see: https://firebase.google.com/docs/android/learn-more#bom) implementation platform('com.google.firebase:firebase-bom:30.4.1') @@ -55,9 +76,18 @@ dependencies { // For use in the CustomKeySamples -- for testing Google Api Availability. implementation 'com.google.android.gms:play-services-base:18.1.0' + // Jetpack Compose + implementation "androidx.compose.ui:ui:$compose_version" + implementation "androidx.compose.material:material:$compose_version" + implementation "androidx.compose.ui:ui-tooling-preview:$compose_version" + implementation 'androidx.activity:activity-compose:1.5.1' + testImplementation 'junit:junit:4.13.2' androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' androidTestImplementation 'androidx.test:rules:1.4.0' androidTestImplementation 'androidx.test:runner:1.4.0' androidTestImplementation 'androidx.test.ext:junit:1.1.3' + androidTestImplementation "androidx.compose.ui:ui-test-junit4:$compose_version" + debugImplementation "androidx.compose.ui:ui-tooling:$compose_version" + debugImplementation "androidx.compose.ui:ui-test-manifest:$compose_version" } diff --git a/database/app/build.gradle b/database/app/build.gradle index 67c29b2e82..9c1b5ef28d 100644 --- a/database/app/build.gradle +++ b/database/app/build.gradle @@ -7,15 +7,18 @@ plugins { check.dependsOn 'assembleDebugAndroidTest' android { - compileSdkVersion 33 + compileSdk 33 defaultConfig { applicationId "com.google.firebase.quickstart.database" - minSdkVersion 19 - targetSdkVersion 33 + minSdk 21 // minSdk would be 19 without compose + targetSdk 33 versionCode 1 versionName "1.0" multiDexEnabled true + vectorDrawables { + useSupportLibrary true + } testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' } @@ -29,6 +32,22 @@ android { buildFeatures { viewBinding = true + compose true + } + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + kotlinOptions { + jvmTarget = '1.8' + } + composeOptions { + kotlinCompilerExtensionVersion '1.3.0' + } + packagingOptions { + resources { + excludes += '/META-INF/{AL2.0,LGPL2.1}' + } } } @@ -41,6 +60,8 @@ dependencies { implementation 'com.google.android.material:material:1.6.1' implementation 'androidx.navigation:navigation-fragment-ktx:2.5.2' implementation 'androidx.navigation:navigation-ui-ktx:2.5.2' + implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.1" + implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.5.1' // Import the Firebase BoM (see: https://firebase.google.com/docs/android/learn-more#bom) implementation platform('com.google.firebase:firebase-bom:30.4.1') @@ -59,6 +80,12 @@ dependencies { implementation 'com.firebaseui:firebase-ui-database:8.0.1' + // Jetpack Compose + implementation "androidx.compose.ui:ui:$compose_version" + implementation "androidx.compose.material:material:$compose_version" + implementation "androidx.compose.ui:ui-tooling-preview:$compose_version" + implementation 'androidx.activity:activity-compose:1.5.1' + // Needed to fix a dependency conflict with FirebaseUI' implementation 'androidx.arch.core:core-runtime:2.1.0' @@ -66,4 +93,7 @@ dependencies { androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' androidTestImplementation 'androidx.test:rules:1.4.0' androidTestImplementation 'androidx.test:runner:1.4.0' + androidTestImplementation "androidx.compose.ui:ui-test-junit4:$compose_version" + debugImplementation "androidx.compose.ui:ui-tooling:$compose_version" + debugImplementation "androidx.compose.ui:ui-test-manifest:$compose_version" } diff --git a/dynamiclinks/app/build.gradle b/dynamiclinks/app/build.gradle index 9e7804af81..7b7b3bf268 100644 --- a/dynamiclinks/app/build.gradle +++ b/dynamiclinks/app/build.gradle @@ -7,16 +7,19 @@ plugins { check.dependsOn 'assembleMainFlavorDebugAndroidTest' android { - compileSdkVersion 33 + compileSdk 33 flavorDimensions "irrelevant" defaultConfig { applicationId "com.google.firebase.quickstart.deeplinks" - minSdkVersion 19 - targetSdkVersion 33 + minSdk 21 // minSdk would be 19 without compose + targetSdk 33 versionCode 1 versionName "1.0" - + multiDexEnabled true + vectorDrawables { + useSupportLibrary true + } testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } @@ -41,6 +44,22 @@ android { buildFeatures { viewBinding = true + compose = true + } + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + kotlinOptions { + jvmTarget = '1.8' + } + composeOptions { + kotlinCompilerExtensionVersion '1.3.0' + } + packagingOptions { + resources { + excludes += '/META-INF/{AL2.0,LGPL2.1}' + } } } @@ -49,6 +68,7 @@ dependencies { implementation project(":internal:chooserx") implementation 'com.google.android.material:material:1.6.1' + implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.5.1' // Import the Firebase BoM (see: https://firebase.google.com/docs/android/learn-more#bom) implementation platform('com.google.firebase:firebase-bom:30.4.1') @@ -63,8 +83,17 @@ dependencies { // for Google Analytics. This is recommended, but not required. implementation 'com.google.firebase:firebase-analytics' + // Jetpack Compose + implementation "androidx.compose.ui:ui:$compose_version" + implementation "androidx.compose.material:material:$compose_version" + implementation "androidx.compose.ui:ui-tooling-preview:$compose_version" + implementation 'androidx.activity:activity-compose:1.5.1' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' androidTestImplementation 'androidx.test:rules:1.4.0' androidTestImplementation 'androidx.test:runner:1.4.0' androidTestImplementation 'androidx.test.ext:junit:1.1.3' + androidTestImplementation "androidx.compose.ui:ui-test-junit4:$compose_version" + debugImplementation "androidx.compose.ui:ui-tooling:$compose_version" + debugImplementation "androidx.compose.ui:ui-test-manifest:$compose_version" } diff --git a/firestore/app/build.gradle b/firestore/app/build.gradle index e8599be4ae..b83c913a28 100644 --- a/firestore/app/build.gradle +++ b/firestore/app/build.gradle @@ -7,16 +7,18 @@ plugins { android { testBuildType "release" - compileSdkVersion 33 + compileSdk 33 defaultConfig { applicationId "com.google.firebase.example.fireeats" - minSdkVersion 19 - targetSdkVersion 33 + minSdk 21 // minSdk would be 19 without compose + targetSdk 33 versionCode 1 versionName "1.0" multiDexEnabled true - + vectorDrawables { + useSupportLibrary true + } vectorDrawables.useSupportLibrary true lintOptions { @@ -36,6 +38,22 @@ android { buildFeatures { viewBinding = true + compose = true + } + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + kotlinOptions { + jvmTarget = '1.8' + } + composeOptions { + kotlinCompilerExtensionVersion '1.3.0' + } + packagingOptions { + resources { + excludes += '/META-INF/{AL2.0,LGPL2.1}' + } } } @@ -83,6 +101,12 @@ dependencies { implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0' annotationProcessor 'androidx.lifecycle:lifecycle-compiler:2.5.1' + // Jetpack Compose + implementation "androidx.compose.ui:ui:$compose_version" + implementation "androidx.compose.material:material:$compose_version" + implementation "androidx.compose.ui:ui-tooling-preview:$compose_version" + implementation 'androidx.activity:activity-compose:1.5.1' + // Third-party libraries implementation 'me.zhanghai.android.materialratingbar:library:1.4.0' implementation 'com.github.bumptech.glide:glide:4.12.0' @@ -95,5 +119,8 @@ dependencies { androidTestImplementation 'junit:junit:4.13.2' androidTestImplementation 'org.hamcrest:hamcrest-library:2.2' androidTestImplementation 'com.google.firebase:firebase-auth' + androidTestImplementation "androidx.compose.ui:ui-test-junit4:$compose_version" + debugImplementation "androidx.compose.ui:ui-tooling:$compose_version" + debugImplementation "androidx.compose.ui:ui-test-manifest:$compose_version" } diff --git a/functions/app/build.gradle b/functions/app/build.gradle index e4128ae0b4..73dec1bfe6 100644 --- a/functions/app/build.gradle +++ b/functions/app/build.gradle @@ -7,15 +7,18 @@ plugins { android { // Changes the test build type for instrumented tests to "stage". testBuildType "release" - compileSdkVersion 33 + compileSdk 33 defaultConfig { applicationId "com.google.samples.quickstart.functions" - minSdkVersion 19 - targetSdkVersion 33 + minSdk 21 // minSdk would be 19 without compose + targetSdk 33 versionCode 1 versionName "1.0" multiDexEnabled true + vectorDrawables { + useSupportLibrary true + } testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' } @@ -30,6 +33,22 @@ android { buildFeatures { viewBinding = true + compose = true + } + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + kotlinOptions { + jvmTarget = '1.8' + } + composeOptions { + kotlinCompilerExtensionVersion '1.3.0' + } + packagingOptions { + resources { + excludes += '/META-INF/{AL2.0,LGPL2.1}' + } } } @@ -41,6 +60,7 @@ dependencies { implementation 'androidx.fragment:fragment-ktx:1.5.2' implementation 'androidx.appcompat:appcompat:1.5.1' implementation 'com.google.android.material:material:1.6.1' + implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.5.1' // Import the Firebase BoM (see: https://firebase.google.com/docs/android/learn-more#bom) implementation platform('com.google.firebase:firebase-bom:30.4.1') @@ -66,9 +86,18 @@ dependencies { // Google Play services implementation 'com.google.android.gms:play-services-auth:20.3.0' + // Jetpack Compose + implementation "androidx.compose.ui:ui:$compose_version" + implementation "androidx.compose.material:material:$compose_version" + implementation "androidx.compose.ui:ui-tooling-preview:$compose_version" + implementation 'androidx.activity:activity-compose:1.5.1' + testImplementation 'junit:junit:4.13.2' androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' androidTestImplementation 'androidx.test:rules:1.4.0' androidTestImplementation 'androidx.test:runner:1.4.0' androidTestImplementation 'androidx.test.uiautomator:uiautomator:2.2.0' + androidTestImplementation "androidx.compose.ui:ui-test-junit4:$compose_version" + debugImplementation "androidx.compose.ui:ui-tooling:$compose_version" + debugImplementation "androidx.compose.ui:ui-test-manifest:$compose_version" } diff --git a/inappmessaging/app/build.gradle b/inappmessaging/app/build.gradle index d9df028a08..763f07360c 100644 --- a/inappmessaging/app/build.gradle +++ b/inappmessaging/app/build.gradle @@ -5,15 +5,18 @@ plugins { } android { - compileSdkVersion 33 + compileSdk 33 defaultConfig { applicationId "com.google.firebase.fiamquickstart" - minSdkVersion 19 - targetSdkVersion 33 + minSdk 21 // minSdk would be 19 without compose + targetSdk 33 versionCode 1 versionName "1.0" multiDexEnabled true + vectorDrawables { + useSupportLibrary true + } testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } @@ -27,6 +30,22 @@ android { buildFeatures { viewBinding = true + compose = true + } + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + kotlinOptions { + jvmTarget = '1.8' + } + composeOptions { + kotlinCompilerExtensionVersion '1.3.0' + } + packagingOptions { + resources { + excludes += '/META-INF/{AL2.0,LGPL2.1}' + } } lint { warning 'InvalidPackage' @@ -40,6 +59,7 @@ dependencies { implementation 'com.google.android.material:material:1.6.1' implementation 'androidx.constraintlayout:constraintlayout:2.1.4' implementation 'androidx.multidex:multidex:2.0.1' + implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.5.1' // Import the Firebase BoM (see: https://firebase.google.com/docs/android/learn-more#bom) implementation platform('com.google.firebase:firebase-bom:30.4.1') @@ -59,8 +79,17 @@ dependencies { implementation 'com.google.firebase:firebase-installations-ktx:17.0.2' + // Jetpack Compose + implementation "androidx.compose.ui:ui:$compose_version" + implementation "androidx.compose.material:material:$compose_version" + implementation "androidx.compose.ui:ui-tooling-preview:$compose_version" + implementation 'androidx.activity:activity-compose:1.5.1' + androidTestImplementation 'androidx.test:runner:1.4.0' androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' androidTestImplementation 'androidx.test:rules:1.4.0' androidTestImplementation 'androidx.test.uiautomator:uiautomator:2.2.0' + androidTestImplementation "androidx.compose.ui:ui-test-junit4:$compose_version" + debugImplementation "androidx.compose.ui:ui-tooling:$compose_version" + debugImplementation "androidx.compose.ui:ui-test-manifest:$compose_version" } diff --git a/messaging/app/build.gradle b/messaging/app/build.gradle index 67e7f41421..f3c8323b94 100644 --- a/messaging/app/build.gradle +++ b/messaging/app/build.gradle @@ -7,16 +7,18 @@ plugins { check.dependsOn 'assembleDebugAndroidTest' android { - compileSdkVersion 33 + compileSdk 33 defaultConfig { applicationId "com.google.firebase.quickstart.fcm" - minSdkVersion 19 - targetSdkVersion 33 + minSdk 21 // minSdk would be 19 without compose + targetSdk 33 versionCode 1 versionName "1.0" multiDexEnabled true - + vectorDrawables { + useSupportLibrary true + } testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } @@ -35,6 +37,22 @@ android { buildFeatures { viewBinding = true + compose = true + } + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + kotlinOptions { + jvmTarget = '1.8' + } + composeOptions { + kotlinCompilerExtensionVersion '1.3.0' + } + packagingOptions { + resources { + excludes += '/META-INF/{AL2.0,LGPL2.1}' + } } lint { abortOnError false @@ -51,6 +69,7 @@ dependencies { // Required when asking for permission to post notifications (starting in Android 13) implementation 'androidx.activity:activity-ktx:1.5.1' implementation 'androidx.fragment:fragment-ktx:1.5.2' + implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.5.1' implementation 'com.google.android.material:material:1.6.1' @@ -71,9 +90,18 @@ dependencies { implementation 'androidx.work:work-runtime:2.7.1' + // Jetpack Compose + implementation "androidx.compose.ui:ui:$compose_version" + implementation "androidx.compose.material:material:$compose_version" + implementation "androidx.compose.ui:ui-tooling-preview:$compose_version" + implementation 'androidx.activity:activity-compose:1.5.1' + // Testing dependencies androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' androidTestImplementation 'androidx.test:runner:1.4.0' androidTestImplementation 'androidx.test:rules:1.4.0' androidTestImplementation 'androidx.annotation:annotation:1.4.0' + androidTestImplementation "androidx.compose.ui:ui-test-junit4:$compose_version" + debugImplementation "androidx.compose.ui:ui-tooling:$compose_version" + debugImplementation "androidx.compose.ui:ui-test-manifest:$compose_version" } diff --git a/perf/app/build.gradle b/perf/app/build.gradle index ec843ccb94..c02b6a5307 100644 --- a/perf/app/build.gradle +++ b/perf/app/build.gradle @@ -8,14 +8,17 @@ plugins { check.dependsOn 'assembleDebugAndroidTest' android { - compileSdkVersion 33 + compileSdk 33 defaultConfig { applicationId "com.google.firebase.quickstart.perfmon" - minSdkVersion 19 - targetSdkVersion 33 + minSdk 21 // minSdk would be 19 without compose + targetSdk 33 versionCode 1 versionName "1.0" multiDexEnabled true + vectorDrawables { + useSupportLibrary true + } testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } buildTypes { @@ -34,6 +37,22 @@ android { } buildFeatures { viewBinding = true + compose = true + } + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + kotlinOptions { + jvmTarget = '1.8' + } + composeOptions { + kotlinCompilerExtensionVersion '1.3.0' + } + packagingOptions { + resources { + excludes += '/META-INF/{AL2.0,LGPL2.1}' + } } } @@ -56,6 +75,15 @@ dependencies { implementation 'com.github.bumptech.glide:glide:4.12.0' + // Jetpack Compose + implementation "androidx.compose.ui:ui:$compose_version" + implementation "androidx.compose.material:material:$compose_version" + implementation "androidx.compose.ui:ui-tooling-preview:$compose_version" + implementation 'androidx.activity:activity-compose:1.5.1' + testImplementation 'junit:junit:4.13.2' androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' + androidTestImplementation "androidx.compose.ui:ui-test-junit4:$compose_version" + debugImplementation "androidx.compose.ui:ui-tooling:$compose_version" + debugImplementation "androidx.compose.ui:ui-test-manifest:$compose_version" } diff --git a/storage/app/build.gradle b/storage/app/build.gradle index b09a0fe902..624a880272 100644 --- a/storage/app/build.gradle +++ b/storage/app/build.gradle @@ -7,15 +7,18 @@ plugins { check.dependsOn 'assembleDebugAndroidTest' android { - compileSdkVersion 33 + compileSdk 33 defaultConfig { applicationId "com.google.firebase.quickstart.firebasestorage" - minSdkVersion 19 - targetSdkVersion 33 + minSdk 21 // minSdk would be 19 without compose + targetSdk 33 versionCode 1 versionName "1.0" multiDexEnabled true + vectorDrawables { + useSupportLibrary true + } testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' } @@ -28,6 +31,22 @@ android { buildFeatures { viewBinding = true + compose = true + } + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + kotlinOptions { + jvmTarget = '1.8' + } + composeOptions { + kotlinCompilerExtensionVersion '1.3.0' + } + packagingOptions { + resources { + excludes += '/META-INF/{AL2.0,LGPL2.1}' + } } } @@ -50,11 +69,21 @@ dependencies { // Firebase Authentication (Kotlin) implementation 'com.google.firebase:firebase-auth-ktx' + // Jetpack Compose + implementation "androidx.compose.ui:ui:$compose_version" + implementation "androidx.compose.material:material:$compose_version" + implementation "androidx.compose.ui:ui-tooling-preview:$compose_version" + implementation 'androidx.activity:activity-compose:1.5.1' + implementation 'androidx.activity:activity-ktx:1.5.1' implementation 'androidx.appcompat:appcompat:1.5.1' implementation 'com.google.android.material:material:1.6.1' + implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.5.1' androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' androidTestImplementation 'androidx.test.espresso:espresso-intents:3.4.0' androidTestImplementation 'androidx.test:rules:1.4.0' androidTestImplementation 'androidx.test:runner:1.4.0' + androidTestImplementation "androidx.compose.ui:ui-test-junit4:$compose_version" + debugImplementation "androidx.compose.ui:ui-tooling:$compose_version" + debugImplementation "androidx.compose.ui:ui-test-manifest:$compose_version" }