Skip to content

Commit e29d93d

Browse files
authored
firebase#2 Compose Infra + Auth Compose Module
2 parents 303d15c + 6a20a38 commit e29d93d

File tree

7 files changed

+81
-3
lines changed

7 files changed

+81
-3
lines changed

app/build.gradle.kts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
android {
55
defaultConfig {
66
multiDexEnabled = true
7+
8+
// Set to 21 to support Compose samples
9+
minSdk = 21
710
}
811

912
buildTypes {
@@ -36,6 +39,7 @@ dependencies {
3639
implementation(Config.Libs.Androidx.multidex)
3740

3841
implementation(project(":auth"))
42+
implementation(project(":auth-compose"))
3943
implementation(project(":firestore"))
4044
implementation(project(":database"))
4145
implementation(project(":storage"))

auth-compose/README.md

Whitespace-only changes.

auth-compose/auth-compose-proguard.pro

Whitespace-only changes.

auth-compose/build.gradle.kts

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
android {
2+
buildTypes {
3+
named("release").configure {
4+
isMinifyEnabled = false
5+
consumerProguardFiles("auth-compose-proguard.pro")
6+
}
7+
}
8+
9+
lint {
10+
disable("UnusedQuantity")
11+
disable("UnknownNullness") // TODO fix in future PR
12+
disable("TypographyQuotes") // Straight versus directional quotes
13+
disable("DuplicateStrings")
14+
disable("LocaleFolder")
15+
disable("IconLocation")
16+
disable("VectorPath")
17+
}
18+
19+
testOptions {
20+
unitTests {
21+
isIncludeAndroidResources = true
22+
}
23+
}
24+
25+
buildFeatures {
26+
compose = true
27+
}
28+
29+
composeOptions {
30+
kotlinCompilerExtensionVersion = Config.Libs.Androidx.Compose.composeVersion
31+
}
32+
}
33+
34+
dependencies {
35+
implementation(project(":auth"))
36+
37+
implementation(Config.Libs.Androidx.activity)
38+
// The new activity result APIs force us to include Fragment 1.3.0
39+
// See https://issuetracker.google.com/issues/152554847
40+
implementation(Config.Libs.Androidx.fragment)
41+
42+
implementation(Config.Libs.Androidx.Compose.ui)
43+
implementation(Config.Libs.Androidx.Compose.ui_tooling)
44+
implementation(Config.Libs.Androidx.Compose.foundation)
45+
implementation(Config.Libs.Androidx.Compose.material)
46+
implementation(Config.Libs.Androidx.Compose.activity)
47+
48+
testImplementation(Config.Libs.Test.junit)
49+
testImplementation(Config.Libs.Test.truth)
50+
testImplementation(Config.Libs.Test.mockito)
51+
testImplementation(Config.Libs.Test.core)
52+
testImplementation(Config.Libs.Test.robolectric)
53+
54+
debugImplementation(project(":internal:lintchecks"))
55+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
package="com.firebase.ui.auth.compose" />

buildSrc/src/main/kotlin/Config.kt

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
object Config {
22
const val version = "7.2.0-SNAPSHOT"
3-
val submodules = listOf("auth", "common", "firestore", "database", "storage")
3+
val submodules = listOf("auth", "auth-compose", "common", "firestore", "database", "storage")
44

5-
private const val kotlinVersion = "1.3.72"
5+
private const val kotlinVersion = "1.4.30"
66

77
object SdkVersions {
88
const val compile = 29
@@ -41,6 +41,22 @@ object Config {
4141
const val recyclerView = "androidx.recyclerview:recyclerview:1.1.0"
4242

4343
const val design = "com.google.android.material:material:1.2.1"
44+
45+
46+
object Compose {
47+
const val composeVersion = "1.0.0-beta01"
48+
const val ui = "androidx.compose.ui:ui:$composeVersion"
49+
// Tooling support (Previews, etc.)
50+
const val ui_tooling = "androidx.compose.ui:ui-tooling:$composeVersion"
51+
// Foundation (Border, Background, Box, Image, Scroll, shapes, animations, etc.)
52+
const val foundation = "androidx.compose.foundation:foundation:$composeVersion"
53+
// Material Design
54+
const val material = "androidx.compose.material:material:$composeVersion"
55+
// Integration with activities
56+
const val activity = "androidx.activity:activity-compose:1.3.0-alpha03"
57+
// Integration with ViewModels
58+
const val viewmodel = "androidx.lifecycle:lifecycle-viewmodel-compose:1.0.0-alpha02"
59+
}
4460
}
4561

4662
object Firebase {

settings.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ rootProject.buildFileName = 'build.gradle.kts'
1515
include(
1616
":app", ":library",
1717

18-
":auth",
18+
":auth", ":auth-compose",
1919
":common", ":firestore", ":database",
2020
":storage",
2121

0 commit comments

Comments
 (0)