Skip to content

Commit c260811

Browse files
committed
feat: Add relevant tracking information
1 parent e4681e0 commit c260811

File tree

3 files changed

+42
-0
lines changed

3 files changed

+42
-0
lines changed

auth/build.gradle.kts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ android {
1313
minSdk = Config.SdkVersions.min
1414
targetSdk = Config.SdkVersions.target
1515

16+
buildConfigField("String", "LIBRARY_NAME", "\"Firebase-UI-Android\"")
1617
buildConfigField("String", "VERSION_NAME", "\"${Config.version}\"")
1718

1819
resourcePrefix("fui_")
@@ -68,6 +69,7 @@ android {
6869
}
6970
buildFeatures {
7071
compose = true
72+
buildConfig = true
7173
}
7274
}
7375

auth/src/main/AndroidManifest.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@
1919

2020
<application>
2121

22+
<service android:name="com.google.firebase.components.ComponentDiscoveryService">
23+
<meta-data
24+
android:name="com.google.firebase.components:com.firebase.ui.auth.compose.FirebaseUIComposeRegistrar"
25+
android:value="com.google.firebase.components.ComponentRegistrar" />
26+
</service>
27+
2228
<meta-data
2329
android:name="com.google.android.gms.version"
2430
android:value="@integer/google_play_services_version" />
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
// Copyright 2025 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
package com.firebase.ui.auth.compose
16+
17+
import androidx.annotation.Keep
18+
import com.firebase.ui.auth.BuildConfig
19+
import com.google.firebase.components.Component
20+
import com.google.firebase.components.ComponentRegistrar
21+
import com.google.firebase.platforminfo.LibraryVersionComponent
22+
23+
/**
24+
* Registers the FirebaseUI-Android Compose library with Firebase Analytics.
25+
* This enables Firebase to track which versions of FirebaseUI are being used.
26+
*/
27+
@Keep
28+
class FirebaseUIComposeRegistrar : ComponentRegistrar {
29+
override fun getComponents(): List<Component<*>> {
30+
return listOf(
31+
LibraryVersionComponent.create(BuildConfig.LIBRARY_NAME, BuildConfig.VERSION_NAME)
32+
)
33+
}
34+
}

0 commit comments

Comments
 (0)