@@ -8,14 +8,17 @@ plugins {
88check. dependsOn ' assembleDebugAndroidTest'
99
1010android {
11- compileSdkVersion 33
11+ compileSdk 33
1212
1313 defaultConfig {
1414 applicationId " com.google.samples.quickstart.crash"
15- minSdkVersion 19
16- targetSdkVersion 33
15+ minSdk 21 // minSdk would be 19 without compose
16+ targetSdk 33
1717 versionCode 1
1818 versionName " 1.0"
19+ vectorDrawables {
20+ useSupportLibrary true
21+ }
1922 testInstrumentationRunner ' androidx.test.runner.AndroidJUnitRunner'
2023 }
2124
@@ -33,6 +36,22 @@ android {
3336
3437 buildFeatures {
3538 viewBinding = true
39+ compose true
40+ }
41+ compileOptions {
42+ sourceCompatibility JavaVersion . VERSION_1_8
43+ targetCompatibility JavaVersion . VERSION_1_8
44+ }
45+ kotlinOptions {
46+ jvmTarget = ' 1.8'
47+ }
48+ composeOptions {
49+ kotlinCompilerExtensionVersion ' 1.3.0'
50+ }
51+ packagingOptions {
52+ resources {
53+ excludes + = ' /META-INF/{AL2.0,LGPL2.1}'
54+ }
3655 }
3756}
3857
@@ -41,6 +60,8 @@ dependencies {
4160 implementation project(" :internal:chooserx" )
4261 implementation ' com.google.android.material:material:1.6.1'
4362 implementation " androidx.activity:activity-ktx:1.5.1"
63+ implementation " androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.1"
64+ implementation ' androidx.lifecycle:lifecycle-runtime-ktx:2.5.1'
4465
4566 // Import the Firebase BoM (see: https://firebase.google.com/docs/android/learn-more#bom)
4667 implementation platform(' com.google.firebase:firebase-bom:30.4.1' )
@@ -55,9 +76,18 @@ dependencies {
5576 // For use in the CustomKeySamples -- for testing Google Api Availability.
5677 implementation ' com.google.android.gms:play-services-base:18.1.0'
5778
79+ // Jetpack Compose
80+ implementation " androidx.compose.ui:ui:$compose_version "
81+ implementation " androidx.compose.material:material:$compose_version "
82+ implementation " androidx.compose.ui:ui-tooling-preview:$compose_version "
83+ implementation ' androidx.activity:activity-compose:1.5.1'
84+
5885 testImplementation ' junit:junit:4.13.2'
5986 androidTestImplementation ' androidx.test.espresso:espresso-core:3.4.0'
6087 androidTestImplementation ' androidx.test:rules:1.4.0'
6188 androidTestImplementation ' androidx.test:runner:1.4.0'
6289 androidTestImplementation ' androidx.test.ext:junit:1.1.3'
90+ androidTestImplementation " androidx.compose.ui:ui-test-junit4:$compose_version "
91+ debugImplementation " androidx.compose.ui:ui-tooling:$compose_version "
92+ debugImplementation " androidx.compose.ui:ui-test-manifest:$compose_version "
6393}
0 commit comments