1
1
// NOTE: this project uses Gradle Kotlin DSL. More common build.gradle instructions can be found in
2
2
// the main README.
3
3
plugins {
4
- id(" com.android.application" )
4
+ id(" com.android.application" )
5
+ id(" org.jetbrains.kotlin.android" )
6
+ id(" org.jetbrains.kotlin.plugin.compose" )
7
+ id(" org.jetbrains.compose" )
8
+ id(" com.google.gms.google-services" )
9
+ id(" kotlin-kapt" ) // ← kapt drives annotation processors
5
10
}
6
11
7
12
android {
13
+ namespace = " com.firebase.uidemo"
8
14
compileSdk = Config .SdkVersions .compile
9
15
10
- namespace = " com.firebase.uidemo"
11
-
12
16
defaultConfig {
13
- minSdk = Config .SdkVersions .min
14
- targetSdk = Config .SdkVersions .target
15
-
16
- versionName = Config .version
17
- versionCode = 1
18
-
17
+ minSdk = Config .SdkVersions .min
18
+ targetSdk = Config .SdkVersions .target
19
+ versionName = Config .version
20
+ versionCode = 1
21
+ multiDexEnabled = true
19
22
resourcePrefix(" fui_" )
20
23
vectorDrawables.useSupportLibrary = true
21
24
}
22
25
23
- defaultConfig {
24
- multiDexEnabled = true
25
- }
26
-
27
26
buildTypes {
28
- named( " release" ).configure {
27
+ release {
29
28
// For the purposes of the sample, allow testing of a proguarded release build
30
29
// using the debug key
31
30
signingConfig = signingConfigs[" debug" ]
32
-
33
31
postprocessing {
34
- isRemoveUnusedCode = true
32
+ isRemoveUnusedCode = true
35
33
isRemoveUnusedResources = true
36
- isObfuscate = true
37
- isOptimizeCode = true
34
+ isObfuscate = true
35
+ isOptimizeCode = true
38
36
}
39
37
}
40
38
}
41
39
42
- lint {
40
+ compileOptions {
41
+ sourceCompatibility = JavaVersion .VERSION_17
42
+ targetCompatibility = JavaVersion .VERSION_17
43
+ }
44
+
45
+ buildFeatures {
46
+ viewBinding = true
47
+ compose = true
48
+ }
49
+
50
+ lint {
43
51
// Common lint options across all modules
44
52
45
53
disable + = mutableSetOf (
@@ -59,16 +67,7 @@ android {
59
67
abortOnError = true
60
68
61
69
baseline = file(" $rootDir /library/quality/lint-baseline.xml" )
62
- }
63
-
64
- compileOptions {
65
- sourceCompatibility = JavaVersion .VERSION_17
66
- targetCompatibility = JavaVersion .VERSION_17
67
- }
68
-
69
- buildFeatures {
70
- viewBinding = true
71
- }
70
+ }
72
71
}
73
72
74
73
dependencies {
@@ -80,23 +79,33 @@ dependencies {
80
79
implementation(project(" :database" ))
81
80
implementation(project(" :storage" ))
82
81
82
+ implementation(Config .Libs .Misc .glide)
83
+ kapt(Config .Libs .Misc .glideCompiler)
84
+
83
85
implementation(Config .Libs .Provider .facebook)
84
86
// Needed to override Facebook
85
- implementation(Config .Libs .Androidx .cardView)
87
+ implementation(Config .Libs .Androidx .cardView)
86
88
implementation(Config .Libs .Androidx .customTabs)
87
-
88
- implementation(Config .Libs .Misc .glide)
89
- annotationProcessor(Config .Libs .Misc .glideCompiler)
90
-
91
89
// Used for FirestorePagingActivity
92
90
implementation(Config .Libs .Androidx .paging)
93
91
94
92
// The following dependencies are not required to use the Firebase UI library.
95
93
// They are used to make some aspects of the demo app implementation simpler for
96
94
// demonstrative purposes, and you may find them useful in your own apps; YMMV.
95
+
97
96
implementation(Config .Libs .Misc .permissions)
98
97
implementation(Config .Libs .Androidx .constraint)
99
98
debugImplementation(Config .Libs .Misc .leakCanary)
99
+
100
+ val composeBom = platform(" androidx.compose:compose-bom:2025.02.00" )
101
+ implementation(composeBom)
102
+ androidTestImplementation(composeBom)
103
+
104
+ implementation(" androidx.compose.material3:material3" )
105
+ implementation(" androidx.activity:activity-compose:1.10.0" )
106
+ implementation(" androidx.lifecycle:lifecycle-viewmodel-compose:2.8.5" )
107
+ debugImplementation(" androidx.compose.ui:ui-tooling" )
108
+ releaseImplementation(" androidx.compose.ui:ui-tooling-preview" )
100
109
}
101
110
102
- apply (plugin = " com.google.gms.google-services " )
111
+ kapt { correctErrorTypes = true } // optional but avoids some kapt warnings
0 commit comments