Skip to content

Commit 40158ea

Browse files
committed
repository clean up
1 parent 6efd979 commit 40158ea

File tree

366 files changed

+445
-22896
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

366 files changed

+445
-22896
lines changed
File renamed without changes.

app/build.gradle.kts

Lines changed: 41 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -1,102 +1,72 @@
1-
// NOTE: this project uses Gradle Kotlin DSL. More common build.gradle instructions can be found in
2-
// the main README.
31
plugins {
4-
id("com.android.application")
2+
id("com.android.application")
3+
id("org.jetbrains.kotlin.android")
4+
id("org.jetbrains.kotlin.plugin.compose")
5+
id("com.google.gms.google-services")
56
}
67

78
android {
8-
compileSdk = Config.SdkVersions.compile
9-
109
namespace = "com.firebase.uidemo"
10+
compileSdk = Config.SdkVersions.compile
1111

1212
defaultConfig {
13+
applicationId = "com.firebase.uidemo"
1314
minSdk = Config.SdkVersions.min
1415
targetSdk = Config.SdkVersions.target
15-
16-
versionName = Config.version
1716
versionCode = 1
17+
versionName = "1.0"
1818

19-
resourcePrefix("fui_")
20-
vectorDrawables.useSupportLibrary = true
21-
}
22-
23-
defaultConfig {
24-
multiDexEnabled = true
19+
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
2520
}
2621

2722
buildTypes {
28-
named("release").configure {
29-
// For the purposes of the sample, allow testing of a proguarded release build
30-
// using the debug key
31-
signingConfig = signingConfigs["debug"]
32-
33-
postprocessing {
34-
isRemoveUnusedCode = true
35-
isRemoveUnusedResources = true
36-
isObfuscate = true
37-
isOptimizeCode = true
23+
release {
24+
isMinifyEnabled = false
25+
proguardFiles(
26+
getDefaultProguardFile("proguard-android-optimize.txt"),
27+
"proguard-rules.pro"
28+
)
29+
// Only sign with debug keystore if it exists (for local testing)
30+
val debugKeystoreFile = file("${System.getProperty("user.home")}/.android/debug.keystore")
31+
if (debugKeystoreFile.exists()) {
32+
signingConfig = signingConfigs.getByName("debug")
3833
}
3934
}
4035
}
41-
42-
lint {
43-
// Common lint options across all modules
44-
45-
disable += mutableSetOf(
46-
"IconExpectedSize",
47-
"InvalidPackage", // Firestore uses GRPC which makes lint mad
48-
"NewerVersionAvailable", "GradleDependency", // For reproducible builds
49-
"SelectableText", "SyntheticAccessor", // We almost never care about this
50-
"UnusedIds", "MediaCapabilities" // TODO(rosariopfernandes): remove this once we confirm
51-
// it builds successfully
52-
)
53-
54-
// Module-specific
55-
disable += mutableSetOf("ResourceName", "MissingTranslation", "DuplicateStrings")
56-
57-
checkAllWarnings = true
58-
warningsAsErrors = true
59-
abortOnError = true
60-
61-
baseline = file("$rootDir/library/quality/lint-baseline.xml")
62-
}
63-
6436
compileOptions {
65-
sourceCompatibility = JavaVersion.VERSION_17
66-
targetCompatibility = JavaVersion.VERSION_17
37+
sourceCompatibility = JavaVersion.VERSION_11
38+
targetCompatibility = JavaVersion.VERSION_11
39+
}
40+
kotlinOptions {
41+
jvmTarget = "11"
6742
}
68-
6943
buildFeatures {
70-
viewBinding = true
44+
compose = true
7145
}
7246
}
7347

7448
dependencies {
75-
implementation(Config.Libs.Androidx.materialDesign)
76-
implementation(Config.Libs.Androidx.multidex)
77-
7849
implementation(project(":auth"))
79-
implementation(project(":firestore"))
80-
implementation(project(":database"))
81-
implementation(project(":storage"))
8250

51+
implementation(Config.Libs.Kotlin.jvm)
52+
implementation(Config.Libs.Androidx.lifecycleRuntime)
53+
implementation(Config.Libs.Androidx.Compose.activityCompose)
54+
implementation(platform(Config.Libs.Androidx.Compose.bom))
55+
implementation(Config.Libs.Androidx.Compose.ui)
56+
implementation(Config.Libs.Androidx.Compose.uiGraphics)
57+
implementation(Config.Libs.Androidx.Compose.toolingPreview)
58+
implementation(Config.Libs.Androidx.Compose.material3)
59+
60+
61+
// Facebook
8362
implementation(Config.Libs.Provider.facebook)
84-
// Needed to override Facebook
85-
implementation(Config.Libs.Androidx.cardView)
86-
implementation(Config.Libs.Androidx.customTabs)
8763

88-
implementation(Config.Libs.Misc.glide)
89-
annotationProcessor(Config.Libs.Misc.glideCompiler)
64+
testImplementation(Config.Libs.Test.junit)
65+
androidTestImplementation(Config.Libs.Test.junitExt)
66+
androidTestImplementation(platform(Config.Libs.Androidx.Compose.bom))
67+
androidTestImplementation(Config.Libs.Test.composeUiTestJunit4)
9068

91-
// Used for FirestorePagingActivity
92-
implementation(Config.Libs.Androidx.paging)
69+
debugImplementation(Config.Libs.Androidx.Compose.tooling)
9370

94-
// The following dependencies are not required to use the Firebase UI library.
95-
// They are used to make some aspects of the demo app implementation simpler for
96-
// demonstrative purposes, and you may find them useful in your own apps; YMMV.
97-
implementation(Config.Libs.Misc.permissions)
98-
implementation(Config.Libs.Androidx.constraint)
99-
debugImplementation(Config.Libs.Misc.leakCanary)
71+
implementation(platform(Config.Libs.Firebase.bom))
10072
}
101-
102-
apply(plugin = "com.google.gms.google-services")
File renamed without changes.

app/src/main/AndroidManifest.xml

Lines changed: 35 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,77 +1,60 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<manifest
3-
xmlns:android="http://schemas.android.com/apk/res/android"
4-
xmlns:tools="http://schemas.android.com/tools"
5-
>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
xmlns:tools="http://schemas.android.com/tools">
64

7-
<uses-permission android:name="android.permission.INTERNET" />
8-
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
5+
<uses-permission android:name="android.permission.INTERNET"/>
96

107
<application
11-
android:name=".FirebaseUIDemo"
128
android:label="@string/app_name"
139
android:allowBackup="true"
14-
android:fullBackupContent="true"
1510
android:icon="@mipmap/ic_launcher"
1611
android:roundIcon="@mipmap/ic_launcher_round"
1712
android:supportsRtl="true"
18-
android:theme="@style/AppTheme"
19-
tools:ignore="GoogleAppIndexingWarning,UnusedAttribute"
13+
android:theme="@style/Theme.FirebaseUIAndroid"
2014
android:usesCleartextTraffic="true">
21-
22-
<activity android:name=".ChooserActivity"
23-
android:exported="true">
15+
<activity
16+
android:name=".MainActivity"
17+
android:label="@string/app_name"
18+
android:exported="true"
19+
android:theme="@style/Theme.FirebaseUIAndroid">
2420
<intent-filter>
2521
<action android:name="android.intent.action.MAIN" />
2622

2723
<category android:name="android.intent.category.LAUNCHER" />
2824
</intent-filter>
2925

30-
<meta-data
31-
android:name="android.app.shortcuts"
32-
android:resource="@xml/shortcuts" />
26+
<!-- Email Link Sign-In Handler Activity for Compose -->
27+
<!-- This activity handles deep links for passwordless email authentication -->
28+
<!-- The host is automatically read from firebase_web_host in config.xml -->
29+
<!-- NOTE: firebase_web_host must be lowercase (e.g., project-id.firebaseapp.com) -->
30+
<intent-filter android:autoVerify="true">
31+
<action android:name="android.intent.action.VIEW" />
32+
<category android:name="android.intent.category.DEFAULT" />
33+
<category android:name="android.intent.category.BROWSABLE" />
34+
<data
35+
android:scheme="https"
36+
android:host="@string/firebase_web_host"
37+
android:pathPattern="/__/auth/links" />
38+
</intent-filter>
3339
</activity>
3440

35-
<!-- Auth UI demo -->
36-
<activity
37-
android:name=".auth.AuthUiActivity"
38-
android:label="@string/title_auth_activity" />
39-
<activity
40-
android:name=".auth.SignedInActivity"
41-
android:label="@string/title_auth_activity" />
42-
<activity
43-
android:name=".auth.AnonymousUpgradeActivity"
44-
android:label="@string/title_anonymous_upgrade" />
45-
46-
<!-- Firestore demo -->
4741
<activity
48-
android:name=".database.firestore.FirestoreChatActivity"
49-
android:label="@string/title_firestore_activity" />
42+
android:name=".HighLevelApiDemoActivity"
43+
android:label="High-Level API Demo"
44+
android:exported="false"
45+
android:theme="@style/Theme.FirebaseUIAndroid" />
5046

51-
<!-- Firestore paging demo -->
5247
<activity
53-
android:name=".database.firestore.FirestorePagingActivity"
54-
android:label="@string/title_firestore_paging_activity" />
48+
android:name=".AuthFlowControllerDemoActivity"
49+
android:label="Low-Level API Demo"
50+
android:exported="false"
51+
android:theme="@style/Theme.FirebaseUIAndroid" />
5552

56-
<!-- Realtime database demo -->
5753
<activity
58-
android:name=".database.realtime.RealtimeDbChatActivity"
59-
android:label="@string/title_realtime_database_activity" />
60-
61-
<!-- Realtime database paging demo -->
62-
<activity
63-
android:name=".database.realtime.FirebaseDbPagingActivity"
64-
android:label="@string/title_realtime_database_paging_activity" />
65-
66-
<activity
67-
android:name=".database.realtime.RealtimeDbChatIndexActivity"
68-
android:label="@string/title_realtime_database_activity" />
69-
70-
<!-- Storage UI demo -->
71-
<activity
72-
android:name=".storage.ImageActivity"
73-
android:label="@string/title_storage_activity" />
74-
54+
android:name=".CustomSlotsThemingDemoActivity"
55+
android:label="Custom Slots &amp; Theming Demo"
56+
android:exported="false"
57+
android:theme="@style/Theme.FirebaseUIAndroid" />
7558
</application>
7659

77-
</manifest>
60+
</manifest>
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.firebase.composeapp
1+
package com.firebase.uidemo
22

33
import android.app.Activity
44
import android.content.Context
@@ -86,7 +86,7 @@ class AuthFlowControllerDemoActivity : ComponentActivity() {
8686
url = "https://temp-test-aa342.firebaseapp.com"
8787
handleCodeInApp = true
8888
setAndroidPackageName(
89-
"com.firebase.composeapp",
89+
"com.firebase.uidemo",
9090
true,
9191
null
9292
)
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.firebase.composeapp
1+
package com.firebase.uidemo
22

33
import android.os.Bundle
44
import android.util.Log
@@ -25,9 +25,9 @@ import com.firebase.ui.auth.compose.configuration.auth_provider.AuthProvider
2525
import com.firebase.ui.auth.compose.configuration.string_provider.LocalAuthUIStringProvider
2626
import com.firebase.ui.auth.compose.configuration.theme.AuthUIAsset
2727
import com.firebase.ui.auth.compose.configuration.theme.AuthUITheme
28-
import com.firebase.ui.auth.compose.ui.screens.EmailAuthContentState
29-
import com.firebase.ui.auth.compose.ui.screens.EmailAuthMode
30-
import com.firebase.ui.auth.compose.ui.screens.EmailAuthScreen
28+
import com.firebase.ui.auth.compose.ui.screens.email.EmailAuthContentState
29+
import com.firebase.ui.auth.compose.ui.screens.email.EmailAuthMode
30+
import com.firebase.ui.auth.compose.ui.screens.email.EmailAuthScreen
3131
import com.firebase.ui.auth.compose.ui.screens.phone.PhoneAuthContentState
3232
import com.firebase.ui.auth.compose.ui.screens.phone.PhoneAuthScreen
3333
import com.firebase.ui.auth.compose.ui.screens.phone.PhoneAuthStep

composeapp/src/main/java/com/firebase/composeapp/HighLevelApiDemoActivity.kt renamed to app/src/main/java/com/firebase/composeapp/HighLevelApiDemoActivity.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.firebase.composeapp
1+
package com.firebase.uidemo
22

33
import android.os.Bundle
44
import android.util.Log
@@ -65,7 +65,7 @@ class HighLevelApiDemoActivity : ComponentActivity() {
6565
url = "https://temp-test-aa342.firebaseapp.com"
6666
handleCodeInApp = true
6767
setAndroidPackageName(
68-
"com.firebase.composeapp",
68+
"com.firebase.uidemo",
6969
true,
7070
null
7171
)

composeapp/src/main/java/com/firebase/composeapp/MainActivity.kt renamed to app/src/main/java/com/firebase/composeapp/MainActivity.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.firebase.composeapp
1+
package com.firebase.uidemo
22

33
import android.content.Intent
44
import android.os.Bundle

composeapp/src/main/java/com/firebase/composeapp/ui/theme/Color.kt renamed to app/src/main/java/com/firebase/composeapp/ui/theme/Color.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.firebase.composeapp.ui.theme
1+
package com.firebase.uidemo.ui.theme
22

33
import androidx.compose.ui.graphics.Color
44

0 commit comments

Comments
 (0)