diff --git a/appcheck/firebase-appcheck-playintegrity/firebase-appcheck-playintegrity.gradle b/appcheck/firebase-appcheck-playintegrity/firebase-appcheck-playintegrity.gradle
index 975401af098..82a4ba07e2d 100644
--- a/appcheck/firebase-appcheck-playintegrity/firebase-appcheck-playintegrity.gradle
+++ b/appcheck/firebase-appcheck-playintegrity/firebase-appcheck-playintegrity.gradle
@@ -52,7 +52,6 @@ dependencies {
api project(':appcheck:firebase-appcheck')
api 'com.google.firebase:firebase-annotations:16.2.0'
api 'com.google.firebase:firebase-common:21.0.0'
- api 'com.google.firebase:firebase-common-ktx:21.0.0'
api 'com.google.firebase:firebase-components:18.0.0'
implementation libs.playservices.base
diff --git a/appcheck/firebase-appcheck/api.txt b/appcheck/firebase-appcheck/api.txt
index fe214cd0b66..557c950dd0e 100644
--- a/appcheck/firebase-appcheck/api.txt
+++ b/appcheck/firebase-appcheck/api.txt
@@ -41,14 +41,3 @@ package com.google.firebase.appcheck {
}
-package com.google.firebase.appcheck.ktx {
-
- public final class FirebaseAppCheckKt {
- method @Deprecated public static com.google.firebase.appcheck.FirebaseAppCheck appCheck(com.google.firebase.ktx.Firebase, com.google.firebase.FirebaseApp app);
- method @Deprecated public static operator String component1(com.google.firebase.appcheck.AppCheckToken);
- method @Deprecated public static operator long component2(com.google.firebase.appcheck.AppCheckToken);
- method @Deprecated public static com.google.firebase.appcheck.FirebaseAppCheck getAppCheck(com.google.firebase.ktx.Firebase);
- }
-
-}
-
diff --git a/appcheck/firebase-appcheck/ktx/api.txt b/appcheck/firebase-appcheck/ktx/api.txt
deleted file mode 100644
index da4f6cc18fe..00000000000
--- a/appcheck/firebase-appcheck/ktx/api.txt
+++ /dev/null
@@ -1 +0,0 @@
-// Signature format: 3.0
diff --git a/appcheck/firebase-appcheck/ktx/gradle.properties b/appcheck/firebase-appcheck/ktx/gradle.properties
deleted file mode 100644
index 9eff84e6c72..00000000000
--- a/appcheck/firebase-appcheck/ktx/gradle.properties
+++ /dev/null
@@ -1 +0,0 @@
-android.enableUnitTestBinaryResources=true
diff --git a/appcheck/firebase-appcheck/ktx/ktx.gradle b/appcheck/firebase-appcheck/ktx/ktx.gradle
deleted file mode 100644
index ed498a84e28..00000000000
--- a/appcheck/firebase-appcheck/ktx/ktx.gradle
+++ /dev/null
@@ -1,73 +0,0 @@
-// Copyright 2022 Google LLC
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-plugins {
- id 'firebase-library'
- id("kotlin-android")
-}
-
-firebaseLibrary {
- libraryGroup = "appcheck"
- testLab.enabled = true
- publishJavadoc = false
- releaseNotes {
- enabled.set(false)
- }
-}
-
-android {
- namespace "com.google.firebase.appcheck.ktx"
- compileSdkVersion project.compileSdkVersion
- defaultConfig {
- minSdkVersion project.minSdkVersion
- multiDexEnabled true
- targetSdkVersion project.targetSdkVersion
- versionName version
- testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
- }
- sourceSets {
- main.java.srcDirs += 'src/main/kotlin'
- test.java {
- srcDir 'src/test/kotlin'
- }
- androidTest.java.srcDirs += 'src/androidTest/kotlin'
- }
- compileOptions {
- sourceCompatibility JavaVersion.VERSION_1_8
- targetCompatibility JavaVersion.VERSION_1_8
- }
- kotlinOptions {
- jvmTarget = '1.8'
- }
- testOptions.unitTests.includeAndroidResources = true
-}
-
-dependencies {
- api(project(":appcheck:firebase-appcheck"))
- api("com.google.firebase:firebase-common:21.0.0")
- api("com.google.firebase:firebase-common-ktx:21.0.0")
-
- implementation("com.google.firebase:firebase-components:18.0.0")
-
- testImplementation libs.truth
- testImplementation libs.junit
- testImplementation libs.mockito.core
- testImplementation libs.robolectric
-
- androidTestImplementation libs.androidx.test.core
- androidTestImplementation libs.androidx.test.runner
- androidTestImplementation 'com.google.firebase:firebase-appcheck-interop:17.1.0'
- androidTestImplementation libs.truth
- androidTestImplementation libs.junit
-}
diff --git a/appcheck/firebase-appcheck/ktx/src/androidTest/AndroidManifest.xml b/appcheck/firebase-appcheck/ktx/src/androidTest/AndroidManifest.xml
deleted file mode 100644
index 1b0d1dff1e4..00000000000
--- a/appcheck/firebase-appcheck/ktx/src/androidTest/AndroidManifest.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/appcheck/firebase-appcheck/ktx/src/androidTest/kotlin/com/google/firebase/appcheck/ktx/FirebaseAppCheckTests.kt b/appcheck/firebase-appcheck/ktx/src/androidTest/kotlin/com/google/firebase/appcheck/ktx/FirebaseAppCheckTests.kt
deleted file mode 100644
index 2989924a2c5..00000000000
--- a/appcheck/firebase-appcheck/ktx/src/androidTest/kotlin/com/google/firebase/appcheck/ktx/FirebaseAppCheckTests.kt
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * Copyright 2022 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.google.firebase.appcheck.ktx
-
-import androidx.test.core.app.ApplicationProvider
-import androidx.test.internal.runner.junit4.AndroidJUnit4ClassRunner
-import com.google.common.truth.Truth.assertThat
-import com.google.firebase.FirebaseApp
-import com.google.firebase.FirebaseOptions
-import com.google.firebase.appcheck.AppCheckToken
-import com.google.firebase.appcheck.FirebaseAppCheck
-import com.google.firebase.ktx.Firebase
-import com.google.firebase.ktx.app
-import com.google.firebase.ktx.initialize
-import com.google.firebase.platforminfo.UserAgentPublisher
-import org.junit.After
-import org.junit.Before
-import org.junit.Test
-import org.junit.runner.RunWith
-
-const val APP_ID = "APP_ID"
-const val API_KEY = "API_KEY"
-
-const val EXISTING_APP = "existing"
-
-@RunWith(AndroidJUnit4ClassRunner::class)
-abstract class BaseTestCase {
- @Before
- fun setUp() {
- Firebase.initialize(
- ApplicationProvider.getApplicationContext(),
- FirebaseOptions.Builder()
- .setApplicationId(APP_ID)
- .setApiKey(API_KEY)
- .setProjectId("123")
- .build()
- )
-
- Firebase.initialize(
- ApplicationProvider.getApplicationContext(),
- FirebaseOptions.Builder()
- .setApplicationId(APP_ID)
- .setApiKey(API_KEY)
- .setProjectId("123")
- .build(),
- EXISTING_APP
- )
- }
-
- @After
- fun cleanUp() {
- FirebaseApp.clearInstancesForTest()
- }
-}
-
-@RunWith(AndroidJUnit4ClassRunner::class)
-class FirebaseAppCheckTests : BaseTestCase() {
- @Test
- fun appCheck_default_callsDefaultGetInstance() {
- assertThat(Firebase.appCheck).isSameInstanceAs(FirebaseAppCheck.getInstance())
- }
-
- @Test
- fun appCheck_with_custom_firebaseapp_calls_GetInstance() {
- val app = Firebase.app(EXISTING_APP)
- assertThat(Firebase.appCheck(app)).isSameInstanceAs(FirebaseAppCheck.getInstance(app))
- }
-
- @Test
- fun appCheckToken_destructuring_declaration_works() {
- val mockAppCheckToken =
- object : AppCheckToken() {
- override fun getToken(): String = "randomToken"
-
- override fun getExpireTimeMillis(): Long = 23121997
- }
-
- val (token, expiration) = mockAppCheckToken
-
- assertThat(token).isEqualTo(mockAppCheckToken.token)
- assertThat(expiration).isEqualTo(mockAppCheckToken.expireTimeMillis)
- }
-}
-
-internal const val LIBRARY_NAME: String = "fire-app-check-ktx"
-
-@RunWith(AndroidJUnit4ClassRunner::class)
-class LibraryVersionTest : BaseTestCase() {
- @Test
- fun libraryRegistrationAtRuntime() {
- val publisher = Firebase.app.get(UserAgentPublisher::class.java)
- assertThat(publisher.userAgent).contains(LIBRARY_NAME)
- }
-}
diff --git a/appcheck/firebase-appcheck/ktx/src/main/AndroidManifest.xml b/appcheck/firebase-appcheck/ktx/src/main/AndroidManifest.xml
deleted file mode 100644
index e2af9507263..00000000000
--- a/appcheck/firebase-appcheck/ktx/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/appcheck/firebase-appcheck/ktx/src/main/kotlin/com/google/firebase/appcheck/ktx/Logging.kt b/appcheck/firebase-appcheck/ktx/src/main/kotlin/com/google/firebase/appcheck/ktx/Logging.kt
deleted file mode 100644
index 56050655f1f..00000000000
--- a/appcheck/firebase-appcheck/ktx/src/main/kotlin/com/google/firebase/appcheck/ktx/Logging.kt
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright 2023 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.google.firebase.appcheck.ktx
-
-import androidx.annotation.Keep
-import com.google.firebase.appcheck.BuildConfig
-import com.google.firebase.components.Component
-import com.google.firebase.components.ComponentRegistrar
-import com.google.firebase.platforminfo.LibraryVersionComponent
-
-internal const val LIBRARY_NAME: String = "fire-app-check-ktx"
-
-/** @suppress */
-@Keep
-class FirebaseAppcheckLegacyRegistrar : ComponentRegistrar {
- override fun getComponents(): List> {
- return listOf(LibraryVersionComponent.create(LIBRARY_NAME, BuildConfig.VERSION_NAME))
- }
-}
diff --git a/appcheck/firebase-appcheck/src/androidTest/java/com/google/firebase/appcheck/ktx/FirebaseAppCheckTests.kt b/appcheck/firebase-appcheck/src/androidTest/java/com/google/firebase/appcheck/ktx/FirebaseAppCheckTests.kt
deleted file mode 100644
index 969b0230ed5..00000000000
--- a/appcheck/firebase-appcheck/src/androidTest/java/com/google/firebase/appcheck/ktx/FirebaseAppCheckTests.kt
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * Copyright 2022 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.google.firebase.appcheck.ktx
-
-import androidx.test.core.app.ApplicationProvider
-import androidx.test.internal.runner.junit4.AndroidJUnit4ClassRunner
-import com.google.common.truth.Truth.assertThat
-import com.google.firebase.FirebaseApp
-import com.google.firebase.FirebaseOptions
-import com.google.firebase.appcheck.AppCheckToken
-import com.google.firebase.appcheck.FirebaseAppCheck
-import com.google.firebase.ktx.Firebase
-import com.google.firebase.ktx.app
-import com.google.firebase.ktx.initialize
-import com.google.firebase.platforminfo.UserAgentPublisher
-import org.junit.After
-import org.junit.Before
-import org.junit.Test
-import org.junit.runner.RunWith
-
-const val APP_ID = "APP_ID"
-const val API_KEY = "API_KEY"
-
-const val EXISTING_APP = "existing"
-
-@RunWith(AndroidJUnit4ClassRunner::class)
-abstract class BaseTestCase {
- @Before
- fun setUp() {
- Firebase.initialize(
- ApplicationProvider.getApplicationContext(),
- FirebaseOptions.Builder()
- .setApplicationId(APP_ID)
- .setApiKey(API_KEY)
- .setProjectId("123")
- .build()
- )
-
- Firebase.initialize(
- ApplicationProvider.getApplicationContext(),
- FirebaseOptions.Builder()
- .setApplicationId(APP_ID)
- .setApiKey(API_KEY)
- .setProjectId("123")
- .build(),
- EXISTING_APP
- )
- }
-
- @After
- fun cleanUp() {
- FirebaseApp.clearInstancesForTest()
- }
-}
-
-@RunWith(AndroidJUnit4ClassRunner::class)
-class FirebaseAppCheckTests : BaseTestCase() {
- @Test
- fun appCheck_default_callsDefaultGetInstance() {
- assertThat(Firebase.appCheck).isSameInstanceAs(FirebaseAppCheck.getInstance())
- }
-
- @Test
- fun appCheck_with_custom_firebaseapp_calls_GetInstance() {
- val app = Firebase.app(EXISTING_APP)
- assertThat(Firebase.appCheck(app)).isSameInstanceAs(FirebaseAppCheck.getInstance(app))
- }
-
- @Test
- fun appCheckToken_destructuring_declaration_works() {
- val mockAppCheckToken =
- object : AppCheckToken() {
- override fun getToken(): String = "randomToken"
-
- override fun getExpireTimeMillis(): Long = 23121997
- }
-
- val (token, expiration) = mockAppCheckToken
-
- assertThat(token).isEqualTo(mockAppCheckToken.token)
- assertThat(expiration).isEqualTo(mockAppCheckToken.expireTimeMillis)
- }
-}
-
-@RunWith(AndroidJUnit4ClassRunner::class)
-class LibraryVersionTest : BaseTestCase() {
- @Test
- fun libraryRegistrationAtRuntime() {
- val publisher = Firebase.app.get(UserAgentPublisher::class.java)
- }
-}
diff --git a/appcheck/firebase-appcheck/src/main/java/com/google/firebase/appcheck/ktx/FirebaseAppCheck.kt b/appcheck/firebase-appcheck/src/main/java/com/google/firebase/appcheck/ktx/FirebaseAppCheck.kt
deleted file mode 100644
index 15e1f5b2189..00000000000
--- a/appcheck/firebase-appcheck/src/main/java/com/google/firebase/appcheck/ktx/FirebaseAppCheck.kt
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * Copyright 2022 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.google.firebase.appcheck.ktx
-
-import com.google.firebase.FirebaseApp
-import com.google.firebase.appcheck.AppCheckToken
-import com.google.firebase.appcheck.FirebaseAppCheck
-import com.google.firebase.components.Component
-import com.google.firebase.components.ComponentRegistrar
-import com.google.firebase.ktx.Firebase
-import com.google.firebase.ktx.app
-
-/**
- * Accessing this object for Kotlin apps has changed; see the
- * [migration guide](https://firebase.google.com/docs/android/kotlin-migration).
- *
- * Returns the [FirebaseAppCheck] instance of the default [FirebaseApp].
- * @deprecated **Deprecation Notice:** The Kotlin extensions (KTX) APIs have been added to their
- * respective main modules, and the Kotlin extension (KTX) APIs in
- * `com.google.firebase.firebase-appcheck-ktx` are now deprecated. As early as April 2024, we'll no
- * longer release KTX modules. For details, see the
- * [FAQ about this initiative.](https://firebase.google.com/docs/android/kotlin-migration)
- */
-val Firebase.appCheck: FirebaseAppCheck
- get() = FirebaseAppCheck.getInstance()
-
-/**
- * Accessing this object for Kotlin apps has changed; see the
- * [migration guide](https://firebase.google.com/docs/android/kotlin-migration).
- *
- * Returns the [FirebaseAppCheck] instance of a given [FirebaseApp].
- * @deprecated **Deprecation Notice:** The Kotlin extensions (KTX) APIs have been added to their
- * respective main modules, and the Kotlin extension (KTX) APIs in
- * `com.google.firebase.firebase-appcheck-ktx` are now deprecated. As early as April 2024, we'll no
- * longer release KTX modules. For details, see the
- * [FAQ about this initiative.](https://firebase.google.com/docs/android/kotlin-migration)
- */
-fun Firebase.appCheck(app: FirebaseApp) = FirebaseAppCheck.getInstance(app)
-
-/**
- * Destructuring declaration for [AppCheckToken] to provide token.
- *
- * @return the token of the [AppCheckToken]
- * @deprecated **Deprecation Notice:** The Kotlin extensions (KTX) APIs have been added to their
- * respective main modules, and the Kotlin extension (KTX) APIs in
- * `com.google.firebase.firebase-appcheck-ktx` are now deprecated. As early as April 2024, we'll no
- * longer release KTX modules. For details, see the
- * [FAQ about this initiative.](https://firebase.google.com/docs/android/kotlin-migration)
- */
-@Deprecated(
- "Migrate to use the KTX API from the main module: https://firebase.google.com/docs/android/kotlin-migration.",
- ReplaceWith("")
-)
-operator fun AppCheckToken.component1() = token
-
-/**
- * Destructuring declaration for [AppCheckToken] to provide expireTimeMillis.
- *
- * @return the expireTimeMillis of the [AppCheckToken]
- * @deprecated **Deprecation Notice:** The Kotlin extensions (KTX) APIs have been added to their
- * respective main modules, and the Kotlin extension (KTX) APIs in
- * `com.google.firebase.firebase-appcheck-ktx` are now deprecated. As early as April 2024, we'll no
- * longer release KTX modules. For details, see the
- * [FAQ about this initiative.](https://firebase.google.com/docs/android/kotlin-migration)
- */
-@Deprecated(
- "Migrate to use the KTX API from the main module: https://firebase.google.com/docs/android/kotlin-migration.",
- ReplaceWith("")
-)
-operator fun AppCheckToken.component2() = expireTimeMillis
-
-/**
- * @suppress
- * @deprecated **Deprecation Notice:** The Kotlin extensions (KTX) APIs have been added to their
- * respective main modules, and the Kotlin extension (KTX) APIs in
- * `com.google.firebase.firebase-appcheck-ktx` are now deprecated. As early as April 2024, we'll no
- * longer release KTX modules. For details, see the
- * [FAQ about this initiative.](https://firebase.google.com/docs/android/kotlin-migration)
- */
-@Deprecated(
- "Migrate to use the KTX API from the main module: https://firebase.google.com/docs/android/kotlin-migration.",
- ReplaceWith("")
-)
-class FirebaseAppCheckKtxRegistrar : ComponentRegistrar {
- override fun getComponents(): List> = listOf()
-}
diff --git a/docs/ktx/common.md b/docs/ktx/common.md
deleted file mode 100644
index 3935c9e1b9c..00000000000
--- a/docs/ktx/common.md
+++ /dev/null
@@ -1,42 +0,0 @@
-# Firebase Common Kotlin Extensions
-
-## Getting Started
-
-To use the Firebase Common Android SDK with Kotlin Extensions, add the following
-to your app's `build.gradle` file:
-
-```groovy
-// See maven.google.com for the latest versions
-// This library transitively includes the firebase-common library
-implementation 'com.google.firebase:firebase-common-ktx:$VERSION'
-```
-
-## Features
-
-### Get the default FirebaseApp and FirebaseOptions
-
-**Kotlin**
-```kotlin
-val defaultApp = FirebaseApp.getInstance()
-val defaultOptions = defaultApp.options
-```
-
-**Kotlin + KTX**
-```kotlin
-val defaultApp = Firebase.app
-val defaultOptions = Firebase.options
-```
-
-### Initialize a FirebaseApp
-
-**Kotlin**
-```kotlin
-val options = FirebaseApp.getInstance().options
-val anotherApp = FirebaseApp.initializeApp(context, options, "myApp")
-```
-
-**Kotlin + KTX**
-```kotlin
-var anotherApp = Firebase.initialize(context, Firebase.options, "myApp")
-```
-
diff --git a/docs/ktx/crashlytics.md b/docs/ktx/crashlytics.md
deleted file mode 100644
index 687944ba2e4..00000000000
--- a/docs/ktx/crashlytics.md
+++ /dev/null
@@ -1,50 +0,0 @@
-# Crashlytics Kotlin Extensions
-
-## Getting Started
-
-To use the Firebase Crashlytics Android SDK with Kotlin Extensions, add the following
-to your app's `build.gradle` file:
-
-```groovy
-// See maven.google.com for the latest versions
-// This library transitively includes the firebase-crashlytics library
-implementation 'com.google.firebase:firebase-crashlytics-ktx:$VERSION'
-```
-
-## Features
-
-### Get an instance of FirebaseCrashlytics
-
-**Kotlin**
-```kotlin
-val crashlytics = FirebaseCrashlytics.getInstance()
-```
-
-**Kotlin + KTX**
-```kotlin
-val crashlytics = Firebase.crashlytics
-```
-
-### Set custom keys
-
-**Kotlin**
-```kotlin
-crashlytics.setCustomKey("str_key", "hello")
-crashlytics.setCustomKey("bool_key", true)
-crashlytics.setCustomKey("int_key", 1)
-crashlytics.setCustomKey("long_key", 1L)
-crashlytics.setCustomKey("float_key", 1.0f)
-crashlytics.setCustomKey("double_key", 1.0)
-```
-
-**Kotlin + KTX**
-```kotlin
-crashlytics.setCustomKeys {
- key("str_key", "hello")
- key("bool_key", true)
- key("int_key", 1)
- key("long_key", 1L)
- key("float_key", 1.0f)
- key("double_key", 1.0)
-}
-```
diff --git a/docs/ktx/database.md b/docs/ktx/database.md
deleted file mode 100644
index d54d3497c84..00000000000
--- a/docs/ktx/database.md
+++ /dev/null
@@ -1,100 +0,0 @@
-# Realtime Database Kotlin Extensions
-
-## Getting Started
-
-To use the Firebase Realtime Database Android SDK with Kotlin Extensions, add the following
-to your app's `build.gradle` file:
-
-```groovy
-// See maven.google.com for the latest versions
-// This library transitively includes the firebase-database library
-implementation 'com.google.firebase:firebase-database-ktx:$VERSION'
-```
-
-## Features
-
-### Get an instance of FirebaseDatabase
-
-**Kotlin**
-```kotlin
-val database = FirebaseDatabase.getInstance()
-val anotherDatabase = FirebaseDatabase.getInstance(FirebaseApp.getInstance("myApp"))
-```
-
-**Kotlin + KTX**
-```kotlin
-val database = Firebase.database
-val anotherDatabase = Firebase.database(Firebase.app("myApp"))
-```
-
-### Get the FirebaseDatabase for the specified url
-
-**Kotlin**
-```kotlin
-val database = FirebaseDatabase.getInstance(url)
-```
-
-**Kotlin + KTX**
-```kotlin
-val database = Firebase.database(url)
-```
-
-
-### Get the FirebaseDatabase of the given FirebaseApp and url
-
-**Kotlin**
-```kotlin
-val database = FirebaseDatabase.getInstance(app, url)
-```
-
-**Kotlin + KTX**
-```kotlin
-val database = Firebase.database(app, url)
-```
-
-### Convert a DataSnapshot to a POJO
-
-**Kotlin**
-```kotlin
-val snapshot: DataSnapshot = ...
-val myObject = snapshot.getValue(MyClass::class.java)
-```
-
-**Kotlin + KTX**
-```kotlin
-val snapshot: DocumentSnapshot = ...
-val myObject = snapshot.getValue()
-```
-
-### Convert a DataSnapshot to generic types such as List or Map
-
-**Kotlin**
-```kotlin
-val snapshot: DataSnapshot = ...
-val typeIndicator = object : GenericTypeIndicator>() {}
-val messages: List = snapshot.getValue(typeIndicator)
-```
-
-**Kotlin + KTX**
-```kotlin
-val snapshot: DocumentSnapshot = ...
-val messages: List = snapshot.getValue>()
-```
-
-### Convert a MutableData to a POJO in a Transaction
-
-**Kotlin**
-```kotlin
-override fun doTransaction(mutableData: MutableData): Transaction.Result {
- val post = mutableData.getValue(Post::class.java)
- // ...
-}
-```
-
-**Kotlin + KTX**
-```kotlin
-override fun doTransaction(mutableData: MutableData): Transaction.Result {
- val post = mutableData.getValue()
- // ...
-}
-```
diff --git a/docs/ktx/firestore.md b/docs/ktx/firestore.md
deleted file mode 100644
index 276f6bc0820..00000000000
--- a/docs/ktx/firestore.md
+++ /dev/null
@@ -1,150 +0,0 @@
-# Firestore Kotlin Extensions
-
-## Getting Started
-
-To use the Cloud Firestore Android SDK with Kotlin Extensions, add the following
-to your app's `build.gradle` file:
-
-```groovy
-// See maven.google.com for the latest versions
-// This library transitively includes the firebase-firestore library
-implementation 'com.google.firebase:firebase-firestore-ktx:$VERSION'
-```
-
-## Features
-
-### Get an instance of FirebaseFirestore
-
-**Kotlin**
-```kotlin
-val firestore = FirebaseFirestore.getInstance()
-val anotherFirestore = FirebaseFirestore.getInstance(FirebaseApp.getInstance("myApp"))
-```
-
-**Kotlin + KTX**
-```kotlin
-val firestore = Firebase.firestore
-val anotherFirestore = Firebase.firestore(Firebase.app("myApp"))
-```
-
-### Get a document
-
-**Kotlin**
-```kotlin
-firestore.collection("cities")
- .document("LON")
- .addSnapshotListener { document: DocumentSnapshot?, error: ->
- if (error != null) {
- // Handle error
- return@addSnapshotListener
- }
- if (document != null) {
- // Use document
- }
- }
-```
-
-**Kotlin + KTX**
-```kotlin
-firestore.collection("cities")
- .document("LON")
- .snapshots()
- .collect { document: DocumentSnapshot ->
- // Use document
- }
-```
-
-### Query documents
-
-**Kotlin**
-```kotlin
-firestore.collection("cities")
- .whereEqualTo("capital", true)
- .addSnapshotListener { documents: QuerySnapshot?, error ->
- if (error != null) {
- // Handle error
- return@addSnapshotListener
- }
- if (documents != null) {
- for (document in documents) {
- // Use document
- }
- }
- }
-```
-
-**Kotlin + KTX**
-```kotlin
-firestore.collection("cities")
- .whereEqualTo("capital", true)
- .snapshots()
- .collect { documents: QuerySnapshot ->
- for (document in documents) {
- // Use document
- }
- }
-```
-
-### Convert a DocumentSnapshot field to a POJO
-
-**Kotlin**
-```kotlin
-val snapshot: DocumentSnapshot = ...
-val myObject = snapshot.get("fieldPath", MyClass::class.java)
-```
-
-**Kotlin + KTX**
-```kotlin
-val snapshot: DocumentSnapshot = ...
-val myObject = snapshot.get("fieldPath")
-```
-
-### Convert a DocumentSnapshot to a POJO
-
-**Kotlin**
-```kotlin
-val snapshot: DocumentSnapshot = ...
-val myObject = snapshot.toObject(MyClass::class.java)
-```
-
-**Kotlin + KTX**
-```kotlin
-val snapshot: DocumentSnapshot = ...
-val myObject = snapshot.toObject()
-```
-
-### Convert a QuerySnapshot to a list of POJOs
-
-**Kotlin**
-```kotlin
-val snapshot: QuerySnapshot = ...
-val objectList = snapshot.toObjects(MyClass::class.java)
-```
-
-**Kotlin + KTX**
-```kotlin
-val snapshot: QuerySnapshot = ...
-val objectList = snapshot.toObjects()
-```
-
-### Setup Firestore with a local emulator
-
-**Kotlin**
-```kotlin
-val settings = FirebaseFirestoreSettings.Builder()
- .setHost("10.0.2.2:8080")
- .setSslEnabled(false)
- .setPersistenceEnabled(false)
- .build()
-
-firestore.setFirestoreSettings(settings)
-```
-
-**Kotlin + KTX**
-```kotlin
-firestore.firestoreSettings = firestoreSettings {
- host = "http://10.0.2.2:8080"
- isSslEnabled = false
- isPersistenceEnabled = false
-}
-```
diff --git a/docs/ktx/functions.md b/docs/ktx/functions.md
deleted file mode 100644
index 6de19ce53ed..00000000000
--- a/docs/ktx/functions.md
+++ /dev/null
@@ -1,62 +0,0 @@
-# Cloud Functions Kotlin Extensions
-
-## Getting Started
-
-To use the Cloud Functions Android SDK with Kotlin Extensions, add the following
-to your app's `build.gradle` file:
-
-```groovy
-// See maven.google.com for the latest versions
-// This library transitively includes the firebase-functions library
-implementation 'com.google.firebase:firebase-functions-ktx:$VERSION'
-```
-
-## Features
-
-### Get the FirebaseFunctions instance of the default app
-
-**Kotlin**
-```kotlin
-val functions = FirebaseFunctions.getInstance()
-```
-
-**Kotlin + KTX**
-```kotlin
-val functions = Firebase.functions
-```
-
-### Get the FirebaseFunctions of a given region
-
-**Kotlin**
-```kotlin
-val functions = FirebaseFunctions.getInstance(region)
-```
-
-**Kotlin + KTX**
-```kotlin
-val functions = Firebase.functions(region)
-```
-
-### Get the FirebaseFunctions of a given FirebaseApp
-
-**Kotlin**
-```kotlin
-val functions = FirebaseFunctions.getInstance(app)
-```
-
-**Kotlin + KTX**
-```kotlin
-val functions = Firebase.functions(app)
-```
-
-### Get the FirebaseFunctions of a given region and FirebaseApp
-
-**Kotlin**
-```kotlin
-val functions = FirebaseFunctions.getInstance(app, region)
-```
-
-**Kotlin + KTX**
-```kotlin
-val functions = Firebase.functions(app, region)
-```
diff --git a/docs/ktx/inappmessaging-display.md b/docs/ktx/inappmessaging-display.md
deleted file mode 100644
index 82a6d3702cc..00000000000
--- a/docs/ktx/inappmessaging-display.md
+++ /dev/null
@@ -1,26 +0,0 @@
-# In-App Messaging Display Kotlin Extensions
-
-## Getting Started
-
-To use the Firebase In-App Messaging Display Android SDK with Kotlin Extensions, add the following
-to your app's `build.gradle` file:
-
-```groovy
-// See maven.google.com for the latest versions
-// This library transitively includes the firebase-inappmessaging-display library
-implementation 'com.google.firebase:firebase-inappmessaging-display-ktx:$VERSION'
-```
-
-## Features
-
-### Get an instance of FirebaseInAppMessagingDisplay
-
-**Kotlin**
-```kotlin
-val fiamUI = FirebaseInAppMessagingDisplay.getInstance()
-```
-
-**Kotlin + KTX**
-```kotlin
-val fiamUI = Firebase.inAppMessagingDisplay
-```
diff --git a/docs/ktx/inappmessaging.md b/docs/ktx/inappmessaging.md
deleted file mode 100644
index 13f90d7d84f..00000000000
--- a/docs/ktx/inappmessaging.md
+++ /dev/null
@@ -1,26 +0,0 @@
-# In-App Messaging Kotlin Extensions
-
-## Getting Started
-
-To use the Firebase In-App Messaging Android SDK with Kotlin Extensions, add the following
-to your app's `build.gradle` file:
-
-```groovy
-// See maven.google.com for the latest versions
-// This library transitively includes the firebase-inappmessaging library
-implementation 'com.google.firebase:firebase-inappmessaging-ktx:$VERSION'
-```
-
-## Features
-
-### Get an instance of FirebaseInAppMessaging
-
-**Kotlin**
-```kotlin
-val fiamUI = FirebaseInAppMessaging.getInstance()
-```
-
-**Kotlin + KTX**
-```kotlin
-val fiamUI = Firebase.inAppMessaging
-```
diff --git a/docs/ktx/remote-config.md b/docs/ktx/remote-config.md
deleted file mode 100644
index 4f685cea793..00000000000
--- a/docs/ktx/remote-config.md
+++ /dev/null
@@ -1,86 +0,0 @@
-# Remote Config Kotlin Extensions
-
-## Getting Started
-
-To use the Firebase Remote Config Android SDK with Kotlin Extensions, add the following
-to your app's `build.gradle` file:
-
-```groovy
-// See maven.google.com for the latest versions
-// This library transitively includes the firebase-config library
-implementation 'com.google.firebase:firebase-config-ktx:$VERSION'
-```
-
-## Features
-
-### Get the FirebaseRemoteConfig instance of the default app
-
-**Kotlin**
-```kotlin
-val remoteConfig = FirebaseRemoteConfig.getInstance()
-```
-
-**Kotlin + KTX**
-```kotlin
-val remoteConfig = Firebase.remoteConfig
-```
-
-### Get the FirebaseRemoteConfig of a given FirebaseApp
-
-**Kotlin**
-```kotlin
-val remoteConfig = FirebaseRemoteConfig.getInstance(app)
-```
-
-**Kotlin + KTX**
-```kotlin
-val remoteConfig = Firebase.remoteConfig(app)
-```
-
-### Get parameter values from FirebaseRemoteConfig
-
-**Kotlin**
-```kotlin
-val isEnabled = remoteConfig.getBoolean("is_enabled")
-
-val fileBytes = remoteConfig.getByteArray("file_bytes")
-
-val audioVolume = remoteConfig.getDouble("audio_volume")
-
-val maxCharacters = remoteConfig.getLong("max_characters")
-
-val accessKey = remoteConfig.getString("access_key")
-```
-
-**Kotlin + KTX**
-```kotlin
-val isEnabled = remoteConfig["is_enabled"].asBoolean()
-
-val fileBytes = remoteConfig["file_bytes"].asByteArray()
-
-val audioVolume = remoteConfig["audio_volume"].asDouble()
-
-val maxCharacters = remoteConfig["max_characters"].asLong()
-
-val accessKey = remoteConfig["access_key"].asString()
-```
-
-### Set Remote Config Settings
-
-**Kotlin**
-```kotlin
-val configSettings = FirebaseRemoteConfigSettings.Builder()
- .setMinimumFetchIntervalInSeconds(3600)
- .setFetchTimeoutInSeconds(60)
- .build()
-remoteConfig.setConfigSettingsAsync(configSettings)
-```
-
-**Kotlin + KTX**
-```kotlin
-val configSettings = remoteConfigSettings {
- minimumFetchIntervalInSeconds = 3600
- fetchTimeoutInSeconds = 60
-}
-remoteConfig.setConfigSettingsAsync(configSettings)
-```
\ No newline at end of file
diff --git a/docs/ktx/storage.md b/docs/ktx/storage.md
deleted file mode 100644
index 5854723fe6e..00000000000
--- a/docs/ktx/storage.md
+++ /dev/null
@@ -1,62 +0,0 @@
-# Storage Kotlin Extensions
-
-## Getting Started
-
-To use the Cloud Storage Android SDK with Kotlin Extensions, add the following
-to your app's `build.gradle` file:
-
-```groovy
-// See maven.google.com for the latest versions
-// This library transitively includes the firebase-storage library
-implementation 'com.google.firebase:firebase-storage-ktx:$VERSION'
-```
-
-## Features
-
-### Get an instance of FirebaseStorage
-
-**Kotlin**
-```kotlin
-val storage = FirebaseStorage.getInstance()
-val anotherStorage = FirebaseStorage.getInstance(FirebaseApp.getInstance("myApp"))
-```
-
-**Kotlin + KTX**
-```kotlin
-val storage = Firebase.storage
-val anotherStorage = Firebase.storage(Firebase.app("myApp"))
-```
-
-### Get the FirebaseStorage for a custom storage bucket url
-
-**Kotlin**
-```kotlin
-val storage = FirebaseStorage.getInstance("gs://my-custom-bucket")
-val anotherStorage = FirebaseStorage.getInstance(FirebaseApp.getInstance("myApp"), "gs://my-custom-bucket")
-```
-
-**Kotlin + KTX**
-```kotlin
-val storage = Firebase.storage("gs://my-custom-bucket")
-val anotherStorage = Firebase.storage(Firebase.app("myApp"), "gs://my-custom-bucket")
-```
-
-### Create file metadata
-
-**Kotlin**
-```kotlin
-val metadata = StorageMetadata.Builder()
- .setContentType("image/jpg")
- .setContentDisposition("attachment")
- .setCustomMetadata("location", "Maputo, MOZ")
- .build()
-```
-
-**Kotlin + KTX**
-```kotlin
-val metadata = storageMetadata {
- contentType = "image/jpg"
- contentDisposition = "attachment"
- setCustomMetadata("location", "Maputo, MOZ")
-}
-```
diff --git a/firebase-appdistribution-api/api.txt b/firebase-appdistribution-api/api.txt
index 4e823a730f8..94c06f1068f 100644
--- a/firebase-appdistribution-api/api.txt
+++ b/firebase-appdistribution-api/api.txt
@@ -99,18 +99,3 @@ package com.google.firebase.appdistribution {
}
-package com.google.firebase.appdistribution.ktx {
-
- public final class FirebaseAppDistributionKt {
- method @Deprecated public static operator com.google.firebase.appdistribution.BinaryType component1(com.google.firebase.appdistribution.AppDistributionRelease);
- method @Deprecated public static operator long component1(com.google.firebase.appdistribution.UpdateProgress);
- method @Deprecated public static operator String component2(com.google.firebase.appdistribution.AppDistributionRelease);
- method @Deprecated public static operator long component2(com.google.firebase.appdistribution.UpdateProgress);
- method @Deprecated public static operator long component3(com.google.firebase.appdistribution.AppDistributionRelease);
- method @Deprecated public static operator com.google.firebase.appdistribution.UpdateStatus component3(com.google.firebase.appdistribution.UpdateProgress);
- method @Deprecated public static operator String? component4(com.google.firebase.appdistribution.AppDistributionRelease);
- method @Deprecated public static com.google.firebase.appdistribution.FirebaseAppDistribution getAppDistribution(com.google.firebase.ktx.Firebase);
- }
-
-}
-
diff --git a/firebase-appdistribution-api/firebase-appdistribution-api.gradle b/firebase-appdistribution-api/firebase-appdistribution-api.gradle
index 71416c85e58..c3959df12db 100644
--- a/firebase-appdistribution-api/firebase-appdistribution-api.gradle
+++ b/firebase-appdistribution-api/firebase-appdistribution-api.gradle
@@ -54,7 +54,6 @@ android {
dependencies {
api libs.playservices.tasks
api("com.google.firebase:firebase-common:21.0.0")
- api("com.google.firebase:firebase-common-ktx:21.0.0")
api("com.google.firebase:firebase-components:18.0.0")
implementation libs.androidx.annotation
diff --git a/firebase-appdistribution-api/ktx/api.txt b/firebase-appdistribution-api/ktx/api.txt
deleted file mode 100644
index da4f6cc18fe..00000000000
--- a/firebase-appdistribution-api/ktx/api.txt
+++ /dev/null
@@ -1 +0,0 @@
-// Signature format: 3.0
diff --git a/firebase-appdistribution-api/ktx/gradle.properties b/firebase-appdistribution-api/ktx/gradle.properties
deleted file mode 100644
index 9eff84e6c72..00000000000
--- a/firebase-appdistribution-api/ktx/gradle.properties
+++ /dev/null
@@ -1 +0,0 @@
-android.enableUnitTestBinaryResources=true
diff --git a/firebase-appdistribution-api/ktx/ktx.gradle b/firebase-appdistribution-api/ktx/ktx.gradle
deleted file mode 100644
index 12398b0347c..00000000000
--- a/firebase-appdistribution-api/ktx/ktx.gradle
+++ /dev/null
@@ -1,73 +0,0 @@
-// Copyright 2021 Google LLC
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-plugins {
- id 'firebase-library'
- id("kotlin-android")
-}
-
-firebaseLibrary {
- libraryGroup = "appdistribution"
- testLab.enabled = true
- publishJavadoc = false
- releaseNotes {
- enabled.set(false)
- }
- previewMode = "beta"
-}
-
-android {
- namespace "com.google.firebase.appdistribution.ktx"
- compileSdkVersion project.compileSdkVersion
- defaultConfig {
- minSdkVersion project.minSdkVersion
- multiDexEnabled true
- targetSdkVersion project.targetSdkVersion
- versionName version
- testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
- }
- sourceSets {
- main.java.srcDirs += 'src/main/kotlin'
- test.java {
- srcDir 'src/test/kotlin'
- }
- androidTest.java.srcDirs += 'src/androidTest/kotlin'
- }
- compileOptions {
- sourceCompatibility JavaVersion.VERSION_1_8
- targetCompatibility JavaVersion.VERSION_1_8
- }
- kotlinOptions {
- jvmTarget = '1.8'
- }
- testOptions.unitTests.includeAndroidResources = true
-}
-
-dependencies {
- api(project(":firebase-appdistribution-api"))
- api("com.google.firebase:firebase-common:21.0.0")
- api("com.google.firebase:firebase-common-ktx:21.0.0")
-
- implementation("com.google.firebase:firebase-components:18.0.0")
-
- testImplementation libs.truth
- testImplementation 'junit:junit:4.12'
- testImplementation 'org.mockito:mockito-core:2.25.0'
- testImplementation libs.robolectric
-
- androidTestImplementation libs.androidx.test.core
- androidTestImplementation 'androidx.test:runner:1.2.0'
- androidTestImplementation libs.truth
- androidTestImplementation 'junit:junit:4.12'
-}
diff --git a/firebase-appdistribution-api/ktx/src/androidTest/AndroidManifest.xml b/firebase-appdistribution-api/ktx/src/androidTest/AndroidManifest.xml
deleted file mode 100644
index b8b4e405e38..00000000000
--- a/firebase-appdistribution-api/ktx/src/androidTest/AndroidManifest.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/firebase-appdistribution-api/ktx/src/androidTest/kotlin/com/google/firebase/app/distribution/ktx/FirebaseAppDistributionTests.kt b/firebase-appdistribution-api/ktx/src/androidTest/kotlin/com/google/firebase/app/distribution/ktx/FirebaseAppDistributionTests.kt
deleted file mode 100644
index a818396f7c6..00000000000
--- a/firebase-appdistribution-api/ktx/src/androidTest/kotlin/com/google/firebase/app/distribution/ktx/FirebaseAppDistributionTests.kt
+++ /dev/null
@@ -1,129 +0,0 @@
-/*
- * Copyright 2021 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.google.firebase.appdistribution.ktx
-
-import androidx.test.core.app.ApplicationProvider
-import androidx.test.internal.runner.junit4.AndroidJUnit4ClassRunner
-import com.google.common.truth.Truth.assertThat
-import com.google.firebase.FirebaseApp
-import com.google.firebase.FirebaseOptions
-import com.google.firebase.appdistribution.AppDistributionRelease
-import com.google.firebase.appdistribution.BinaryType
-import com.google.firebase.appdistribution.FirebaseAppDistribution
-import com.google.firebase.appdistribution.UpdateProgress
-import com.google.firebase.appdistribution.UpdateStatus
-import com.google.firebase.ktx.Firebase
-import com.google.firebase.ktx.app
-import com.google.firebase.ktx.initialize
-import com.google.firebase.platforminfo.UserAgentPublisher
-import org.junit.After
-import org.junit.Before
-import org.junit.Test
-import org.junit.runner.RunWith
-
-const val APP_ID = "APP_ID"
-const val API_KEY = "API_KEY"
-
-const val EXISTING_APP = "existing"
-
-@RunWith(AndroidJUnit4ClassRunner::class)
-abstract class BaseTestCase {
- @Before
- fun setUp() {
- Firebase.initialize(
- ApplicationProvider.getApplicationContext(),
- FirebaseOptions.Builder()
- .setApplicationId(APP_ID)
- .setApiKey(API_KEY)
- .setProjectId("123")
- .build()
- )
-
- Firebase.initialize(
- ApplicationProvider.getApplicationContext(),
- FirebaseOptions.Builder()
- .setApplicationId(APP_ID)
- .setApiKey(API_KEY)
- .setProjectId("123")
- .build(),
- EXISTING_APP
- )
- }
-
- @After
- fun cleanUp() {
- FirebaseApp.clearInstancesForTest()
- }
-}
-
-@RunWith(AndroidJUnit4ClassRunner::class)
-class FirebaseAppDistributionTests : BaseTestCase() {
- @Test
- fun appDistribution_default_callsDefaultGetInstance() {
- assertThat(Firebase.appDistribution).isSameInstanceAs(FirebaseAppDistribution.getInstance())
- }
-
- @Test
- fun appDistributionReleaseDestructuringDeclarationsWork() {
- val mockAppDistributionRelease =
- object : AppDistributionRelease {
- override fun getDisplayVersion(): String = "1.0.0"
-
- override fun getVersionCode(): Long = 1L
-
- override fun getReleaseNotes(): String = "Changelog..."
-
- override fun getBinaryType(): BinaryType = BinaryType.AAB
- }
-
- val (type, displayVersion, versionCode, notes) = mockAppDistributionRelease
-
- assertThat(type).isEqualTo(mockAppDistributionRelease.binaryType)
- assertThat(displayVersion).isEqualTo(mockAppDistributionRelease.displayVersion)
- assertThat(versionCode).isEqualTo(mockAppDistributionRelease.versionCode)
- assertThat(notes).isEqualTo(mockAppDistributionRelease.releaseNotes)
- }
-
- @Test
- fun updateProgressDestructuringDeclarationsWork() {
- val mockUpdateProgress =
- object : UpdateProgress {
- override fun getApkBytesDownloaded(): Long = 1200L
-
- override fun getApkFileTotalBytes(): Long = 9000L
-
- override fun getUpdateStatus(): UpdateStatus = UpdateStatus.DOWNLOADING
- }
-
- val (downloaded, total, status) = mockUpdateProgress
-
- assertThat(downloaded).isEqualTo(mockUpdateProgress.apkBytesDownloaded)
- assertThat(total).isEqualTo(mockUpdateProgress.apkFileTotalBytes)
- assertThat(status).isEqualTo(mockUpdateProgress.updateStatus)
- }
-}
-
-internal const val LIBRARY_NAME: String = "fire-appdistribution-ktx"
-
-@RunWith(AndroidJUnit4ClassRunner::class)
-class LibraryVersionTest : BaseTestCase() {
- @Test
- fun libraryRegistrationAtRuntime() {
- val publisher = Firebase.app.get(UserAgentPublisher::class.java)
- assertThat(publisher.userAgent).contains(LIBRARY_NAME)
- }
-}
diff --git a/firebase-appdistribution-api/ktx/src/main/AndroidManifest.xml b/firebase-appdistribution-api/ktx/src/main/AndroidManifest.xml
deleted file mode 100644
index 45c1bb0580b..00000000000
--- a/firebase-appdistribution-api/ktx/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/firebase-appdistribution-api/ktx/src/main/kotlin/com/google/firebase/appdistribution/ktx/Logging.kt b/firebase-appdistribution-api/ktx/src/main/kotlin/com/google/firebase/appdistribution/ktx/Logging.kt
deleted file mode 100644
index e0e7e27519b..00000000000
--- a/firebase-appdistribution-api/ktx/src/main/kotlin/com/google/firebase/appdistribution/ktx/Logging.kt
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright 2023 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.google.firebase.appdistribution.ktx
-
-import androidx.annotation.Keep
-import com.google.firebase.appdistribution.BuildConfig
-import com.google.firebase.components.Component
-import com.google.firebase.components.ComponentRegistrar
-import com.google.firebase.platforminfo.LibraryVersionComponent
-
-internal const val LIBRARY_NAME: String = "fire-appdistribution-ktx"
-
-/** @suppress */
-@Keep
-class FirebaseAppdistributionApiLegacyRegistrar : ComponentRegistrar {
- override fun getComponents(): List> {
- return listOf(LibraryVersionComponent.create(LIBRARY_NAME, BuildConfig.VERSION_NAME))
- }
-}
diff --git a/firebase-appdistribution-api/src/main/java/com/google/firebase/appdistribution/ktx/FirebaseAppDistribution.kt b/firebase-appdistribution-api/src/main/java/com/google/firebase/appdistribution/ktx/FirebaseAppDistribution.kt
deleted file mode 100644
index ccee214d131..00000000000
--- a/firebase-appdistribution-api/src/main/java/com/google/firebase/appdistribution/ktx/FirebaseAppDistribution.kt
+++ /dev/null
@@ -1,169 +0,0 @@
-/*
- * Copyright 2021 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.google.firebase.appdistribution.ktx
-
-import androidx.annotation.Keep
-import com.google.firebase.FirebaseApp
-import com.google.firebase.appdistribution.AppDistributionRelease
-import com.google.firebase.appdistribution.FirebaseAppDistribution
-import com.google.firebase.appdistribution.UpdateProgress
-import com.google.firebase.components.Component
-import com.google.firebase.components.ComponentRegistrar
-import com.google.firebase.ktx.Firebase
-
-/**
- * Accessing this object for Kotlin apps has changed; see the
- * [migration guide](https://firebase.google.com/docs/android/kotlin-migration).
- *
- * Returns the [FirebaseAppDistribution] instance of the default [FirebaseApp].
- * @deprecated **Deprecation Notice:** The Kotlin extensions (KTX) APIs have been added to their
- * respective main modules, and the Kotlin extension (KTX) APIs in
- * `com.google.firebase:firebase-appdistribution-api-ktx` are now deprecated. As early as April
- * 2024, we'll no longer release KTX modules. For details, see the
- * [FAQ about this initiative.](https://firebase.google.com/docs/android/kotlin-migration)
- */
-val Firebase.appDistribution: FirebaseAppDistribution
- get() = FirebaseAppDistribution.getInstance()
-
-/**
- * Destructuring declaration for [AppDistributionRelease] to provide binaryType.
- *
- * @return the binaryType of the [AppDistributionRelease]
- * @deprecated **Deprecation Notice:** The Kotlin extensions (KTX) APIs have been added to their
- * respective main modules, and the Kotlin extension (KTX) APIs in
- * `com.google.firebase:firebase-appdistribution-api-ktx` are now deprecated. As early as April
- * 2024, we'll no longer release KTX modules. For details, see the
- * [FAQ about this initiative.](https://firebase.google.com/docs/android/kotlin-migration)
- */
-@Deprecated(
- "Migrate to use the KTX API from the main module: https://firebase.google.com/docs/android/kotlin-migration.",
- ReplaceWith("")
-)
-operator fun AppDistributionRelease.component1() = binaryType
-
-/**
- * Destructuring declaration for [AppDistributionRelease] to provide displayVersion.
- *
- * @return the displayVersion of the [AppDistributionRelease]
- * @deprecated **Deprecation Notice:** The Kotlin extensions (KTX) APIs have been added to their
- * respective main modules, and the Kotlin extension (KTX) APIs in
- * `com.google.firebase:firebase-appdistribution-api-ktx` are now deprecated. As early as April
- * 2024, we'll no longer release KTX modules. For details, see the
- * [FAQ about this initiative.](https://firebase.google.com/docs/android/kotlin-migration)
- */
-@Deprecated(
- "Migrate to use the KTX API from the main module: https://firebase.google.com/docs/android/kotlin-migration.",
- ReplaceWith("")
-)
-operator fun AppDistributionRelease.component2() = displayVersion
-
-/**
- * Destructuring declaration for [AppDistributionRelease] to provide versionCode.
- *
- * @return the versionCode of the [AppDistributionRelease]
- * @deprecated **Deprecation Notice:** The Kotlin extensions (KTX) APIs have been added to their
- * respective main modules, and the Kotlin extension (KTX) APIs in
- * `com.google.firebase:firebase-appdistribution-api-ktx` are now deprecated. As early as April
- * 2024, we'll no longer release KTX modules. For details, see the
- * [FAQ about this initiative.](https://firebase.google.com/docs/android/kotlin-migration)
- */
-@Deprecated(
- "Migrate to use the KTX API from the main module: https://firebase.google.com/docs/android/kotlin-migration.",
- ReplaceWith("")
-)
-operator fun AppDistributionRelease.component3() = versionCode
-
-/**
- * Destructuring declaration for [AppDistributionRelease] to provide releaseNotes.
- *
- * @return the releaseNotes of the [AppDistributionRelease]
- * @deprecated **Deprecation Notice:** The Kotlin extensions (KTX) APIs have been added to their
- * respective main modules, and the Kotlin extension (KTX) APIs in
- * `com.google.firebase:firebase-appdistribution-api-ktx` are now deprecated. As early as April
- * 2024, we'll no longer release KTX modules. For details, see the
- * [FAQ about this initiative.](https://firebase.google.com/docs/android/kotlin-migration)
- */
-@Deprecated(
- "Migrate to use the KTX API from the main module: https://firebase.google.com/docs/android/kotlin-migration.",
- ReplaceWith("")
-)
-operator fun AppDistributionRelease.component4() = releaseNotes
-
-/**
- * Destructuring declaration for [UpdateProgress] to provide apkBytesDownloaded.
- *
- * @return the apkBytesDownloaded of the [UpdateProgress]
- * @deprecated **Deprecation Notice:** The Kotlin extensions (KTX) APIs have been added to their
- * respective main modules, and the Kotlin extension (KTX) APIs in
- * `com.google.firebase:firebase-appdistribution-api-ktx` are now deprecated. As early as April
- * 2024, we'll no longer release KTX modules. For details, see the
- * [FAQ about this initiative.](https://firebase.google.com/docs/android/kotlin-migration)
- */
-@Deprecated(
- "Migrate to use the KTX API from the main module: https://firebase.google.com/docs/android/kotlin-migration.",
- ReplaceWith("")
-)
-operator fun UpdateProgress.component1() = apkBytesDownloaded
-
-/**
- * Destructuring declaration for [UpdateProgress] to provide apkFileTotalBytes.
- *
- * @return the apkFileTotalBytes of the [UpdateProgress]
- * @deprecated **Deprecation Notice:** The Kotlin extensions (KTX) APIs have been added to their
- * respective main modules, and the Kotlin extension (KTX) APIs in
- * `com.google.firebase:firebase-appdistribution-api-ktx` are now deprecated. As early as April
- * 2024, we'll no longer release KTX modules. For details, see the
- * [FAQ about this initiative.](https://firebase.google.com/docs/android/kotlin-migration)
- */
-@Deprecated(
- "Migrate to use the KTX API from the main module: https://firebase.google.com/docs/android/kotlin-migration.",
- ReplaceWith("")
-)
-operator fun UpdateProgress.component2() = apkFileTotalBytes
-
-/**
- * Destructuring declaration for [UpdateProgress] to provide updateStatus.
- *
- * @return the updateStatus of the [UpdateProgress]
- * @deprecated **Deprecation Notice:** The Kotlin extensions (KTX) APIs have been added to their
- * respective main modules, and the Kotlin extension (KTX) APIs in
- * `com.google.firebase:firebase-appdistribution-api-ktx` are now deprecated. As early as April
- * 2024, we'll no longer release KTX modules. For details, see the
- * [FAQ about this initiative.](https://firebase.google.com/docs/android/kotlin-migration)
- */
-@Deprecated(
- "Migrate to use the KTX API from the main module: https://firebase.google.com/docs/android/kotlin-migration.",
- ReplaceWith("")
-)
-operator fun UpdateProgress.component3() = updateStatus
-
-/**
- * @suppress
- * @deprecated **Deprecation Notice:** The Kotlin extensions (KTX) APIs have been added to their
- * respective main modules, and the Kotlin extension (KTX) APIs in
- * `com.google.firebase:firebase-appdistribution-api-ktx` are now deprecated. As early as April
- * 2024, we'll no longer release KTX modules. For details, see the
- * [FAQ about this initiative.](https://firebase.google.com/docs/android/kotlin-migration)
- */
-@Deprecated(
- "Migrate to use the KTX API from the main module: https://firebase.google.com/docs/android/kotlin-migration.",
- ReplaceWith("")
-)
-@Keep
-class FirebaseAppDistributionKtxRegistrar : ComponentRegistrar {
- override fun getComponents(): List> = listOf()
-}
diff --git a/firebase-appdistribution/test-app/src/main/kotlin/com/googletest/firebase/appdistribution/testapp/CustomNotificationFeedbackTrigger.kt b/firebase-appdistribution/test-app/src/main/kotlin/com/googletest/firebase/appdistribution/testapp/CustomNotificationFeedbackTrigger.kt
index d8690b2e73b..02d6921d3d2 100644
--- a/firebase-appdistribution/test-app/src/main/kotlin/com/googletest/firebase/appdistribution/testapp/CustomNotificationFeedbackTrigger.kt
+++ b/firebase-appdistribution/test-app/src/main/kotlin/com/googletest/firebase/appdistribution/testapp/CustomNotificationFeedbackTrigger.kt
@@ -31,8 +31,8 @@ import android.util.Log
import androidx.core.app.NotificationCompat
import androidx.core.app.NotificationManagerCompat
import androidx.core.content.ContextCompat
-import com.google.firebase.appdistribution.ktx.appDistribution
-import com.google.firebase.ktx.Firebase
+import com.google.firebase.appdistribution.appDistribution
+import com.google.firebase.Firebase
import java.io.IOException
import com.google.firebase.appdistribution.testapp.R
diff --git a/firebase-appdistribution/test-app/src/main/kotlin/com/googletest/firebase/appdistribution/testapp/MainActivity.kt b/firebase-appdistribution/test-app/src/main/kotlin/com/googletest/firebase/appdistribution/testapp/MainActivity.kt
index 279361a0d47..9e63c387eac 100644
--- a/firebase-appdistribution/test-app/src/main/kotlin/com/googletest/firebase/appdistribution/testapp/MainActivity.kt
+++ b/firebase-appdistribution/test-app/src/main/kotlin/com/googletest/firebase/appdistribution/testapp/MainActivity.kt
@@ -42,9 +42,9 @@ import com.google.android.material.textfield.TextInputLayout
import com.google.firebase.appdistribution.AppDistributionRelease
import com.google.firebase.appdistribution.InterruptionLevel
import com.google.firebase.appdistribution.UpdateProgress
-import com.google.firebase.appdistribution.ktx.appDistribution
+import com.google.firebase.appdistribution.appDistribution
import com.google.firebase.appdistribution.testapp.BuildConfig
-import com.google.firebase.ktx.Firebase
+import com.google.firebase.Firebase
import java.util.concurrent.ExecutorService
import java.util.concurrent.Executors
import com.google.firebase.appdistribution.testapp.R
diff --git a/firebase-appdistribution/test-app/src/main/kotlin/com/googletest/firebase/appdistribution/testapp/ScreenshotDetectionFeedbackTrigger.kt b/firebase-appdistribution/test-app/src/main/kotlin/com/googletest/firebase/appdistribution/testapp/ScreenshotDetectionFeedbackTrigger.kt
index c904ed1e507..1b031306a11 100644
--- a/firebase-appdistribution/test-app/src/main/kotlin/com/googletest/firebase/appdistribution/testapp/ScreenshotDetectionFeedbackTrigger.kt
+++ b/firebase-appdistribution/test-app/src/main/kotlin/com/googletest/firebase/appdistribution/testapp/ScreenshotDetectionFeedbackTrigger.kt
@@ -28,8 +28,8 @@ import android.provider.MediaStore
import android.util.Log
import androidx.annotation.RequiresApi
import androidx.core.content.ContextCompat
-import com.google.firebase.appdistribution.ktx.appDistribution
-import com.google.firebase.ktx.Firebase
+import com.google.firebase.appdistribution.appDistribution
+import com.google.firebase.Firebase
import java.util.*
class ScreenshotDetectionFeedbackTrigger(
diff --git a/firebase-appdistribution/test-app/src/main/kotlin/com/googletest/firebase/appdistribution/testapp/SecondActivity.kt b/firebase-appdistribution/test-app/src/main/kotlin/com/googletest/firebase/appdistribution/testapp/SecondActivity.kt
index 950d65b096e..b73845fbd1d 100644
--- a/firebase-appdistribution/test-app/src/main/kotlin/com/googletest/firebase/appdistribution/testapp/SecondActivity.kt
+++ b/firebase-appdistribution/test-app/src/main/kotlin/com/googletest/firebase/appdistribution/testapp/SecondActivity.kt
@@ -23,8 +23,8 @@ import android.view.MenuInflater
import android.view.MenuItem
import androidx.appcompat.app.AppCompatActivity
import androidx.appcompat.widget.AppCompatButton
-import com.google.firebase.appdistribution.ktx.appDistribution
-import com.google.firebase.ktx.Firebase
+import com.google.firebase.appdistribution.appDistribution
+import com.google.firebase.Firebase
import com.google.firebase.appdistribution.testapp.R
class SecondActivity : AppCompatActivity() {
diff --git a/firebase-appdistribution/test-app/src/main/kotlin/com/googletest/firebase/appdistribution/testapp/ShakeDetectionFeedbackTrigger.kt b/firebase-appdistribution/test-app/src/main/kotlin/com/googletest/firebase/appdistribution/testapp/ShakeDetectionFeedbackTrigger.kt
index 5481ccd603d..5d0bb7722e5 100644
--- a/firebase-appdistribution/test-app/src/main/kotlin/com/googletest/firebase/appdistribution/testapp/ShakeDetectionFeedbackTrigger.kt
+++ b/firebase-appdistribution/test-app/src/main/kotlin/com/googletest/firebase/appdistribution/testapp/ShakeDetectionFeedbackTrigger.kt
@@ -21,8 +21,8 @@ import android.app.Application
import android.hardware.SensorManager
import android.os.Bundle
import android.util.Log
-import com.google.firebase.appdistribution.ktx.appDistribution
-import com.google.firebase.ktx.Firebase
+import com.google.firebase.appdistribution.appDistribution
+import com.google.firebase.Firebase
import com.squareup.seismic.ShakeDetector
import com.google.firebase.appdistribution.testapp.R
diff --git a/firebase-appdistribution/test-app/test-app.gradle b/firebase-appdistribution/test-app/test-app.gradle
index 420224b9e78..5af5540892f 100644
--- a/firebase-appdistribution/test-app/test-app.gradle
+++ b/firebase-appdistribution/test-app/test-app.gradle
@@ -82,7 +82,6 @@ dependencies {
// In this test project we also need to explicitly declare these dependencies
implementation project(':firebase-appdistribution-api')
// All variants use the API
- implementation project(':firebase-appdistribution-api:ktx')
implementation "androidx.activity:activity-ktx:1.6.0"
implementation 'androidx.appcompat:appcompat:1.5.1'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
@@ -91,7 +90,6 @@ dependencies {
implementation "androidx.fragment:fragment-ktx:1.5.3"
implementation "com.google.android.gms:play-services-tasks:18.0.2"
implementation 'com.google.android.material:material:1.6.1'
- implementation 'com.google.firebase:firebase-common-ktx:21.0.0'
// Shake detection
implementation 'com.squareup:seismic:1.0.3'
// Other dependencies
diff --git a/firebase-common/api.txt b/firebase-common/api.txt
index 57f4f898a25..4da45aa2621 100644
--- a/firebase-common/api.txt
+++ b/firebase-common/api.txt
@@ -82,23 +82,6 @@ package com.google.firebase {
}
-package com.google.firebase.ktx {
-
- @Deprecated public final class Firebase {
- field @Deprecated public static final com.google.firebase.ktx.Firebase INSTANCE;
- }
-
- public final class FirebaseKt {
- method @Deprecated public static com.google.firebase.FirebaseApp app(com.google.firebase.ktx.Firebase, String name);
- method @Deprecated public static com.google.firebase.FirebaseApp getApp(com.google.firebase.ktx.Firebase);
- method @Deprecated public static com.google.firebase.FirebaseOptions getOptions(com.google.firebase.ktx.Firebase);
- method @Deprecated public static com.google.firebase.FirebaseApp? initialize(com.google.firebase.ktx.Firebase, android.content.Context context);
- method @Deprecated public static com.google.firebase.FirebaseApp initialize(com.google.firebase.ktx.Firebase, android.content.Context context, com.google.firebase.FirebaseOptions options);
- method @Deprecated public static com.google.firebase.FirebaseApp initialize(com.google.firebase.ktx.Firebase, android.content.Context context, com.google.firebase.FirebaseOptions options, String name);
- }
-
-}
-
package com.google.firebase.provider {
public class FirebaseInitProvider extends android.content.ContentProvider {
diff --git a/firebase-common/firebase-common.gradle.kts b/firebase-common/firebase-common.gradle.kts
index 52114f82558..7d576425b10 100644
--- a/firebase-common/firebase-common.gradle.kts
+++ b/firebase-common/firebase-common.gradle.kts
@@ -83,7 +83,6 @@ dependencies {
androidTestImplementation(project(":integ-testing")) {
exclude("com.google.firebase", "firebase-common")
- exclude("com.google.firebase", "firebase-common-ktx")
}
// TODO(Remove when FirbaseAppTest has been modernized to use LiveData)
diff --git a/firebase-common/ktx/api.txt b/firebase-common/ktx/api.txt
deleted file mode 100644
index da4f6cc18fe..00000000000
--- a/firebase-common/ktx/api.txt
+++ /dev/null
@@ -1 +0,0 @@
-// Signature format: 3.0
diff --git a/firebase-common/ktx/gradle.properties b/firebase-common/ktx/gradle.properties
deleted file mode 100644
index 9eff84e6c72..00000000000
--- a/firebase-common/ktx/gradle.properties
+++ /dev/null
@@ -1 +0,0 @@
-android.enableUnitTestBinaryResources=true
diff --git a/firebase-common/ktx/ktx.gradle.kts b/firebase-common/ktx/ktx.gradle.kts
deleted file mode 100644
index 61553f0adeb..00000000000
--- a/firebase-common/ktx/ktx.gradle.kts
+++ /dev/null
@@ -1,53 +0,0 @@
-// Copyright 2022 Google LLC
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-plugins {
- id("firebase-library")
- id("kotlin-android")
-}
-
-firebaseLibrary {
- libraryGroup = "common"
- publishJavadoc = false
- releaseNotes { enabled.set(false) }
-}
-
-android {
- val compileSdkVersion: Int by rootProject
- val targetSdkVersion: Int by rootProject
- val minSdkVersion: Int by rootProject
- compileSdk = compileSdkVersion
- namespace = "com.google.firebase.ktx"
- defaultConfig {
- minSdk = minSdkVersion
- targetSdk = targetSdkVersion
- }
- sourceSets {
- getByName("main") { java.srcDirs("src/main/kotlin") }
- getByName("test") { java.srcDirs("src/test/kotlin") }
- }
- kotlinOptions { jvmTarget = "1.8" }
- testOptions.unitTests.isIncludeAndroidResources = true
-}
-
-dependencies {
- api(project(":firebase-common"))
- implementation("com.google.firebase:firebase-components:18.0.0")
- implementation("com.google.firebase:firebase-annotations:16.2.0")
- testImplementation(libs.androidx.test.core)
- testImplementation(libs.junit)
- testImplementation(libs.kotlin.coroutines.test)
- testImplementation(libs.robolectric)
- testImplementation(libs.truth)
-}
diff --git a/firebase-common/ktx/src/main/AndroidManifest.xml b/firebase-common/ktx/src/main/AndroidManifest.xml
deleted file mode 100644
index 4e04e3fece4..00000000000
--- a/firebase-common/ktx/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/firebase-common/ktx/src/main/kotlin/com/google/firebase/ktx/Logging.kt b/firebase-common/ktx/src/main/kotlin/com/google/firebase/ktx/Logging.kt
deleted file mode 100644
index 5ba2cf4d54c..00000000000
--- a/firebase-common/ktx/src/main/kotlin/com/google/firebase/ktx/Logging.kt
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright 2023 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.google.firebase.ktx
-
-import androidx.annotation.Keep
-import com.google.firebase.BuildConfig
-import com.google.firebase.components.Component
-import com.google.firebase.components.ComponentRegistrar
-import com.google.firebase.platforminfo.LibraryVersionComponent
-
-internal const val LIBRARY_NAME: String = "fire-core-ktx"
-
-/** @suppress */
-@Keep
-class FirebaseCommonLegacyRegistrar : ComponentRegistrar {
- override fun getComponents(): List> {
- return listOf(LibraryVersionComponent.create(LIBRARY_NAME, BuildConfig.VERSION_NAME))
- }
-}
diff --git a/firebase-common/ktx/src/test/kotlin/com/google/firebase/ktx/Tests.kt b/firebase-common/ktx/src/test/kotlin/com/google/firebase/ktx/Tests.kt
deleted file mode 100644
index bc3eeb54cd5..00000000000
--- a/firebase-common/ktx/src/test/kotlin/com/google/firebase/ktx/Tests.kt
+++ /dev/null
@@ -1,144 +0,0 @@
-/*
- * Copyright 2019 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.google.firebase.ktx
-
-import androidx.test.core.app.ApplicationProvider
-import com.google.android.gms.tasks.Tasks
-import com.google.common.truth.Truth.assertThat
-import com.google.firebase.FirebaseApp
-import com.google.firebase.FirebaseOptions
-import com.google.firebase.platforminfo.UserAgentPublisher
-import kotlinx.coroutines.tasks.await
-import kotlinx.coroutines.test.runTest
-import org.junit.Assert.fail
-import org.junit.Test
-import org.junit.runner.RunWith
-import org.robolectric.RobolectricTestRunner
-
-fun withApp(name: String, block: FirebaseApp.() -> Unit) {
- val app =
- Firebase.initialize(
- ApplicationProvider.getApplicationContext(),
- FirebaseOptions.Builder().setApplicationId("appId").build(),
- name
- )
- try {
- block(app)
- } finally {
- app.delete()
- }
-}
-
-class TestException(message: String) : Exception(message)
-
-@RunWith(RobolectricTestRunner::class)
-class VersionTests {
- @Test
- fun libraryVersions_shouldBeRegisteredWithRuntime() {
- withApp("ktxTestApp") {
- val uaPublisher = get(UserAgentPublisher::class.java)
- assertThat(uaPublisher.userAgent).contains("kotlin")
- assertThat(uaPublisher.userAgent).contains(LIBRARY_NAME)
- }
- }
-}
-
-@RunWith(RobolectricTestRunner::class)
-class KtxTests {
- @Test
- fun `Firebase#app should delegate to FirebaseApp#getInstance()`() {
- withApp(FirebaseApp.DEFAULT_APP_NAME) {
- assertThat(Firebase.app).isSameInstanceAs(FirebaseApp.getInstance())
- }
- }
-
- @Test
- fun `Firebase#app(String) should delegate to FirebaseApp#getInstance(String)`() {
- val appName = "testApp"
- withApp(appName) {
- assertThat(Firebase.app(appName)).isSameInstanceAs(FirebaseApp.getInstance(appName))
- }
- }
-
- @Test
- fun `Firebase#options should delegate to FirebaseApp#getInstance()#options`() {
- withApp(FirebaseApp.DEFAULT_APP_NAME) {
- assertThat(Firebase.options).isSameInstanceAs(FirebaseApp.getInstance().options)
- }
- }
-
- @Test
- fun `Firebase#initialize(Context, FirebaseOptions) should initialize the app correctly`() {
- val options = FirebaseOptions.Builder().setApplicationId("appId").build()
- val app = Firebase.initialize(ApplicationProvider.getApplicationContext(), options)
- try {
- assertThat(app).isNotNull()
- assertThat(app.name).isEqualTo(FirebaseApp.DEFAULT_APP_NAME)
- assertThat(app.options).isSameInstanceAs(options)
- assertThat(app.applicationContext)
- .isSameInstanceAs(ApplicationProvider.getApplicationContext())
- } finally {
- app.delete()
- }
- }
-
- @Test
- fun `Firebase#initialize(Context, FirebaseOptions, String) should initialize the app correctly`() {
- val options = FirebaseOptions.Builder().setApplicationId("appId").build()
- val name = "appName"
- val app = Firebase.initialize(ApplicationProvider.getApplicationContext(), options, name)
- try {
- assertThat(app).isNotNull()
- assertThat(app.name).isEqualTo(name)
- assertThat(app.options).isSameInstanceAs(options)
- assertThat(app.applicationContext)
- .isSameInstanceAs(ApplicationProvider.getApplicationContext())
- } finally {
- app.delete()
- }
- }
-}
-
-class CoroutinesPlayServicesTests {
- // We are only interested in the await() function offered by kotlinx-coroutines-play-services
- // So we're not testing the other functions provided by that library.
-
- @Test
- fun `Task#await() resolves to the same result as Task#getResult()`() = runTest {
- val task = Tasks.forResult(21)
-
- val expected = task.result
- val actual = task.await()
-
- assertThat(actual).isEqualTo(expected)
- assertThat(task.isSuccessful).isTrue()
- assertThat(task.exception).isNull()
- }
-
- @Test
- fun `Task#await() throws an Exception for failing Tasks`() = runTest {
- val task = Tasks.forException(TestException("some error happened"))
-
- try {
- task.await()
- fail("Task#await should throw an Exception")
- } catch (e: Exception) {
- assertThat(e).isInstanceOf(TestException::class.java)
- assertThat(task.isSuccessful).isFalse()
- }
- }
-}
diff --git a/firebase-common/src/main/java/com/google/firebase/ktx/Firebase.kt b/firebase-common/src/main/java/com/google/firebase/ktx/Firebase.kt
deleted file mode 100644
index c126b285c99..00000000000
--- a/firebase-common/src/main/java/com/google/firebase/ktx/Firebase.kt
+++ /dev/null
@@ -1,157 +0,0 @@
-/*
- * Copyright 2019 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.google.firebase.ktx
-
-import android.content.Context
-import androidx.annotation.Keep
-import com.google.firebase.FirebaseApp
-import com.google.firebase.FirebaseOptions
-import com.google.firebase.annotations.concurrent.Background
-import com.google.firebase.annotations.concurrent.Blocking
-import com.google.firebase.annotations.concurrent.Lightweight
-import com.google.firebase.annotations.concurrent.UiThread
-import com.google.firebase.components.Component
-import com.google.firebase.components.ComponentRegistrar
-import com.google.firebase.components.Dependency
-import com.google.firebase.components.Qualified
-import java.util.concurrent.Executor
-import kotlinx.coroutines.CoroutineDispatcher
-import kotlinx.coroutines.asCoroutineDispatcher
-
-/**
- * All fields in this object are deprecated; Use `com.google.firebase.Firebase` instead.
- *
- * Single access point to all firebase SDKs from Kotlin. Acts as a target for extension methods
- * provided by sdks.
- *
- * @deprecated **Deprecation Notice:** The Kotlin extensions (KTX) APIs have been added to their
- * respective main modules, and the Kotlin extension (KTX) APIs in
- * `com.google.firebase.firebase-common-ktx` are now deprecated. As early as April 2024, we'll no
- * longer release KTX modules. For details, see the
- * [FAQ about this initiative.](https://firebase.google.com/docs/android/kotlin-migration)
- */
-object Firebase
-
-/**
- * Accessing this object for Kotlin apps has changed; see the migration guide:
- * https://firebase.google.com/docs/android/kotlin-migration.
- *
- * Returns the default firebase app instance.
- * @deprecated **Deprecation Notice:** The Kotlin extensions (KTX) APIs have been added to their
- * respective main modules, and the Kotlin extension (KTX) APIs in
- * `com.google.firebase.firebase-common-ktx` are now deprecated. As early as April 2024, we'll no
- * longer release KTX modules. For details, see the
- * [FAQ about this initiative.](https://firebase.google.com/docs/android/kotlin-migration).
- */
-val Firebase.app: FirebaseApp
- get() = FirebaseApp.getInstance()
-
-/**
- * Accessing this object for Kotlin apps has changed; see the migration guide:
- * https://firebase.google.com/docs/android/kotlin-migration.
- *
- * Returns a named firebase app instance.
- * @deprecated **Deprecation Notice:** The Kotlin extensions (KTX) APIs have been added to their
- * respective main modules, and the Kotlin extension (KTX) APIs in
- * `com.google.firebase.firebase-common-ktx` are now deprecated. As early as April 2024, we'll no
- * longer release KTX modules. For details, see the
- * [FAQ about this initiative.](https://firebase.google.com/docs/android/kotlin-migration).
- */
-fun Firebase.app(name: String): FirebaseApp = FirebaseApp.getInstance(name)
-
-/**
- * Initializes and returns a FirebaseApp.
- * @deprecated **Deprecation Notice:** The Kotlin extensions (KTX) APIs have been added to their
- * respective main modules, and the Kotlin extension (KTX) APIs in
- * `com.google.firebase.firebase-common-ktx` are now deprecated. As early as April 2024, we'll no
- * longer release KTX modules. For details, see the
- * [FAQ about this initiative.](https://firebase.google.com/docs/android/kotlin-migration)
- */
-@Deprecated(
- "Migrate to use the KTX API from the main module: https://firebase.google.com/docs/android/kotlin-migration.",
- ReplaceWith("")
-)
-fun Firebase.initialize(context: Context): FirebaseApp? = FirebaseApp.initializeApp(context)
-
-/**
- * Initializes and returns a FirebaseApp.
- * @deprecated **Deprecation Notice:** The Kotlin extensions (KTX) APIs have been added to their
- * respective main modules, and the Kotlin extension (KTX) APIs in
- * `com.google.firebase.firebase-common-ktx` are now deprecated. As early as April 2024, we'll no
- * longer release KTX modules. For details, see the
- * [FAQ about this initiative.](https://firebase.google.com/docs/android/kotlin-migration)
- */
-@Deprecated(
- "Migrate to use the KTX API from the main module: https://firebase.google.com/docs/android/kotlin-migration.",
- ReplaceWith("")
-)
-fun Firebase.initialize(context: Context, options: FirebaseOptions): FirebaseApp =
- FirebaseApp.initializeApp(context, options)
-
-/**
- * Initializes and returns a FirebaseApp.
- * @deprecated **Deprecation Notice:** The Kotlin extensions (KTX) APIs have been added to their
- * respective main modules, and the Kotlin extension (KTX) APIs in
- * `com.google.firebase.firebase-common-ktx` are now deprecated. As early as April 2024, we'll no
- * longer release KTX modules. For details, see the
- * [FAQ about this initiative.](https://firebase.google.com/docs/android/kotlin-migration)
- */
-@Deprecated(
- "Migrate to use the KTX API from the main module: https://firebase.google.com/docs/android/kotlin-migration.",
- ReplaceWith("")
-)
-fun Firebase.initialize(context: Context, options: FirebaseOptions, name: String): FirebaseApp =
- FirebaseApp.initializeApp(context, options, name)
-
-/**
- * Accessing this object for Kotlin apps has changed; see the migration guide:
- * https://firebase.google.com/docs/android/kotlin-migration.
- *
- * Returns options of default FirebaseApp
- * @deprecated **Deprecation Notice:** The Kotlin extensions (KTX) APIs have been added to their
- * respective main modules, and the Kotlin extension (KTX) APIs in
- * `com.google.firebase.firebase-common-ktx` are now deprecated. As early as April 2024, we'll no
- * longer release KTX modules. For details, see the
- * [FAQ about this initiative.](https://firebase.google.com/docs/android/kotlin-migration)
- */
-val Firebase.options: FirebaseOptions
- get() = Firebase.app.options
-
-/** @suppress */
-@Deprecated(
- "Migrate to use the KTX API from the main module: https://firebase.google.com/docs/android/kotlin-migration.",
- ReplaceWith("")
-)
-@Keep
-class FirebaseCommonKtxRegistrar : ComponentRegistrar {
- override fun getComponents(): List> {
- return listOf(
- coroutineDispatcher(),
- coroutineDispatcher(),
- coroutineDispatcher(),
- coroutineDispatcher()
- )
- }
-}
-
-private inline fun coroutineDispatcher(): Component =
- Component.builder(Qualified.qualified(T::class.java, CoroutineDispatcher::class.java))
- .add(Dependency.required(Qualified.qualified(T::class.java, Executor::class.java)))
- .factory { c ->
- c.get(Qualified.qualified(T::class.java, Executor::class.java)).asCoroutineDispatcher()
- }
- .build()
diff --git a/firebase-common/src/test/java/com/google/firebase/ktx/Tests.kt b/firebase-common/src/test/java/com/google/firebase/ktx/Tests.kt
deleted file mode 100644
index 4adc1167dbc..00000000000
--- a/firebase-common/src/test/java/com/google/firebase/ktx/Tests.kt
+++ /dev/null
@@ -1,143 +0,0 @@
-/*
- * Copyright 2019 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.google.firebase.ktx
-
-import androidx.test.core.app.ApplicationProvider
-import com.google.android.gms.tasks.Tasks
-import com.google.common.truth.Truth.assertThat
-import com.google.firebase.FirebaseApp
-import com.google.firebase.FirebaseOptions
-import com.google.firebase.platforminfo.UserAgentPublisher
-import kotlinx.coroutines.tasks.await
-import kotlinx.coroutines.test.runTest
-import org.junit.Assert.fail
-import org.junit.Test
-import org.junit.runner.RunWith
-import org.robolectric.RobolectricTestRunner
-
-fun withApp(name: String, block: FirebaseApp.() -> Unit) {
- val app =
- Firebase.initialize(
- ApplicationProvider.getApplicationContext(),
- FirebaseOptions.Builder().setApplicationId("appId").build(),
- name
- )
- try {
- block(app)
- } finally {
- app.delete()
- }
-}
-
-class TestException(message: String) : Exception(message)
-
-@RunWith(RobolectricTestRunner::class)
-class VersionTests {
- @Test
- fun libraryVersions_shouldBeRegisteredWithRuntime() {
- withApp("ktxTestApp") {
- val uaPublisher = get(UserAgentPublisher::class.java)
- assertThat(uaPublisher.userAgent).contains("kotlin")
- }
- }
-}
-
-@RunWith(RobolectricTestRunner::class)
-class KtxTests {
- @Test
- fun `Firebase#app should delegate to FirebaseApp#getInstance()`() {
- withApp(FirebaseApp.DEFAULT_APP_NAME) {
- assertThat(Firebase.app).isSameInstanceAs(FirebaseApp.getInstance())
- }
- }
-
- @Test
- fun `Firebase#app(String) should delegate to FirebaseApp#getInstance(String)`() {
- val appName = "testApp"
- withApp(appName) {
- assertThat(Firebase.app(appName)).isSameInstanceAs(FirebaseApp.getInstance(appName))
- }
- }
-
- @Test
- fun `Firebase#options should delegate to FirebaseApp#getInstance()#options`() {
- withApp(FirebaseApp.DEFAULT_APP_NAME) {
- assertThat(Firebase.options).isSameInstanceAs(FirebaseApp.getInstance().options)
- }
- }
-
- @Test
- fun `Firebase#initialize(Context, FirebaseOptions) should initialize the app correctly`() {
- val options = FirebaseOptions.Builder().setApplicationId("appId").build()
- val app = Firebase.initialize(ApplicationProvider.getApplicationContext(), options)
- try {
- assertThat(app).isNotNull()
- assertThat(app.name).isEqualTo(FirebaseApp.DEFAULT_APP_NAME)
- assertThat(app.options).isSameInstanceAs(options)
- assertThat(app.applicationContext)
- .isSameInstanceAs(ApplicationProvider.getApplicationContext())
- } finally {
- app.delete()
- }
- }
-
- @Test
- fun `Firebase#initialize(Context, FirebaseOptions, String) should initialize the app correctly`() {
- val options = FirebaseOptions.Builder().setApplicationId("appId").build()
- val name = "appName"
- val app = Firebase.initialize(ApplicationProvider.getApplicationContext(), options, name)
- try {
- assertThat(app).isNotNull()
- assertThat(app.name).isEqualTo(name)
- assertThat(app.options).isSameInstanceAs(options)
- assertThat(app.applicationContext)
- .isSameInstanceAs(ApplicationProvider.getApplicationContext())
- } finally {
- app.delete()
- }
- }
-}
-
-class CoroutinesPlayServicesTests {
- // We are only interested in the await() function offered by kotlinx-coroutines-play-services
- // So we're not testing the other functions provided by that library.
-
- @Test
- fun `Task#await() resolves to the same result as Task#getResult()`() = runTest {
- val task = Tasks.forResult(21)
-
- val expected = task.result
- val actual = task.await()
-
- assertThat(actual).isEqualTo(expected)
- assertThat(task.isSuccessful).isTrue()
- assertThat(task.exception).isNull()
- }
-
- @Test
- fun `Task#await() throws an Exception for failing Tasks`() = runTest {
- val task = Tasks.forException(TestException("some error happened"))
-
- try {
- task.await()
- fail("Task#await should throw an Exception")
- } catch (e: Exception) {
- assertThat(e).isInstanceOf(TestException::class.java)
- assertThat(task.isSuccessful).isFalse()
- }
- }
-}
diff --git a/firebase-config/api.txt b/firebase-config/api.txt
index 77efe522e60..05a10cad518 100644
--- a/firebase-config/api.txt
+++ b/firebase-config/api.txt
@@ -143,15 +143,3 @@ package com.google.firebase.remoteconfig {
}
-package com.google.firebase.remoteconfig.ktx {
-
- public final class RemoteConfigKt {
- method @Deprecated public static operator com.google.firebase.remoteconfig.FirebaseRemoteConfigValue get(com.google.firebase.remoteconfig.FirebaseRemoteConfig, String key);
- method @Deprecated public static kotlinx.coroutines.flow.Flow getConfigUpdates(com.google.firebase.remoteconfig.FirebaseRemoteConfig);
- method @Deprecated public static com.google.firebase.remoteconfig.FirebaseRemoteConfig getRemoteConfig(com.google.firebase.ktx.Firebase);
- method @Deprecated public static com.google.firebase.remoteconfig.FirebaseRemoteConfig remoteConfig(com.google.firebase.ktx.Firebase, com.google.firebase.FirebaseApp app);
- method public static com.google.firebase.remoteconfig.FirebaseRemoteConfigSettings remoteConfigSettings(kotlin.jvm.functions.Function1 super com.google.firebase.remoteconfig.FirebaseRemoteConfigSettings.Builder,kotlin.Unit> init);
- }
-
-}
-
diff --git a/firebase-config/bandwagoner/bandwagoner.gradle b/firebase-config/bandwagoner/bandwagoner.gradle
index 12c0ac1d508..8435bb3aab2 100644
--- a/firebase-config/bandwagoner/bandwagoner.gradle
+++ b/firebase-config/bandwagoner/bandwagoner.gradle
@@ -75,10 +75,6 @@ dependencies {
exclude group: 'com.google.firebase', module: 'firebase-common'
exclude group: 'com.google.firebase', module: 'firebase-components'
}
- implementation(project(":firebase-config:ktx")) {
- exclude group: 'com.google.firebase', module: 'firebase-common'
- exclude group: 'com.google.firebase', module: 'firebase-components'
- }
implementation(project(":firebase-installations")) {
exclude group: 'com.google.firebase', module: 'firebase-common'
exclude group: 'com.google.firebase', module: 'firebase-components'
@@ -96,7 +92,6 @@ dependencies {
// Released artifacts don't need these dependencies since they don't use `project` to refer
// to Remote Config.
implementation("com.google.firebase:firebase-common:21.0.0")
- implementation("com.google.firebase:firebase-common-ktx:21.0.0")
implementation("com.google.firebase:firebase-components:18.0.0")
implementation("com.google.firebase:firebase-installations-interop:17.1.1") {
exclude group: 'com.google.firebase', module: 'firebase-common'
diff --git a/firebase-config/bandwagoner/src/main/java/com/googletest/firebase/remoteconfig/bandwagoner/RealtimeKtListener.kt b/firebase-config/bandwagoner/src/main/java/com/googletest/firebase/remoteconfig/bandwagoner/RealtimeKtListener.kt
index 5e77119b443..63b42954c4c 100644
--- a/firebase-config/bandwagoner/src/main/java/com/googletest/firebase/remoteconfig/bandwagoner/RealtimeKtListener.kt
+++ b/firebase-config/bandwagoner/src/main/java/com/googletest/firebase/remoteconfig/bandwagoner/RealtimeKtListener.kt
@@ -17,9 +17,9 @@
package com.googletest.firebase.remoteconfig.bandwagoner
import android.util.Log
-import com.google.firebase.ktx.Firebase
-import com.google.firebase.remoteconfig.ktx.configUpdates
-import com.google.firebase.remoteconfig.ktx.remoteConfig
+import com.google.firebase.Firebase
+import com.google.firebase.remoteconfig.configUpdates
+import com.google.firebase.remoteconfig.remoteConfig
import java.util.concurrent.CompletableFuture
import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.flow.catch
diff --git a/firebase-config/firebase-config.gradle.kts b/firebase-config/firebase-config.gradle.kts
index 899b1a86bcd..b97c1a7033e 100644
--- a/firebase-config/firebase-config.gradle.kts
+++ b/firebase-config/firebase-config.gradle.kts
@@ -72,7 +72,6 @@ dependencies {
exclude(group = "com.google.firebase", module = "firebase-components")
}
api("com.google.firebase:firebase-common:21.0.0")
- api("com.google.firebase:firebase-common-ktx:21.0.0")
api("com.google.firebase:firebase-components:18.0.0")
api("com.google.firebase:firebase-installations:17.2.0")
diff --git a/firebase-config/ktx/api.txt b/firebase-config/ktx/api.txt
deleted file mode 100644
index da4f6cc18fe..00000000000
--- a/firebase-config/ktx/api.txt
+++ /dev/null
@@ -1 +0,0 @@
-// Signature format: 3.0
diff --git a/firebase-config/ktx/gradle.properties b/firebase-config/ktx/gradle.properties
deleted file mode 100644
index 016fa887bc0..00000000000
--- a/firebase-config/ktx/gradle.properties
+++ /dev/null
@@ -1,2 +0,0 @@
-android.enableUnitTestBinaryResources=true
-
diff --git a/firebase-config/ktx/ktx.gradle b/firebase-config/ktx/ktx.gradle
deleted file mode 100644
index 64da37d23fe..00000000000
--- a/firebase-config/ktx/ktx.gradle
+++ /dev/null
@@ -1,68 +0,0 @@
-// Copyright 2019 Google LLC
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-plugins {
- id 'firebase-library'
- id("kotlin-android")
-}
-
-firebaseLibrary {
- libraryGroup = "config"
- publishJavadoc = false
- releaseNotes {
- enabled.set(false)
- }
-}
-
-android {
- namespace "com.google.firebase.remoteconfig.ktx"
- compileSdkVersion project.compileSdkVersion
- defaultConfig {
- minSdkVersion project.minSdkVersion
- multiDexEnabled true
- targetSdkVersion project.targetSdkVersion
- versionName version
- testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
- }
- sourceSets {
- main.java.srcDirs += 'src/main/kotlin'
- test.java {
- srcDir 'src/test/kotlin'
- }
- }
- kotlinOptions {
- jvmTarget = '1.8'
- }
- testOptions.unitTests.includeAndroidResources = true
-}
-
-dependencies {
- api(project(":firebase-config"))
- api("com.google.firebase:firebase-common:21.0.0")
- api("com.google.firebase:firebase-common-ktx:21.0.0")
- api("com.google.firebase:firebase-installations:17.2.0")
-
- implementation('com.google.firebase:firebase-abt:21.1.1') {
- exclude group: 'com.google.firebase', module: 'firebase-common'
- exclude group: 'com.google.firebase', module: 'firebase-components'
- }
- implementation("com.google.firebase:firebase-components:18.0.0")
- implementation 'com.google.firebase:firebase-installations-interop:17.1.0'
-
- testImplementation libs.androidx.test.core
- testImplementation libs.truth
- testImplementation 'junit:junit:4.12'
- testImplementation 'org.mockito:mockito-core:2.25.0'
- testImplementation libs.robolectric
-}
diff --git a/firebase-config/ktx/src/main/AndroidManifest.xml b/firebase-config/ktx/src/main/AndroidManifest.xml
deleted file mode 100644
index 9df18d6857b..00000000000
--- a/firebase-config/ktx/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/firebase-config/ktx/src/main/kotlin/com/google/firebase/remoteconfig/ktx/Logging.kt b/firebase-config/ktx/src/main/kotlin/com/google/firebase/remoteconfig/ktx/Logging.kt
deleted file mode 100644
index b13c960807c..00000000000
--- a/firebase-config/ktx/src/main/kotlin/com/google/firebase/remoteconfig/ktx/Logging.kt
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright 2023 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.google.firebase.remoteconfig.ktx
-
-import androidx.annotation.Keep
-import com.google.firebase.components.Component
-import com.google.firebase.components.ComponentRegistrar
-import com.google.firebase.platforminfo.LibraryVersionComponent
-import com.google.firebase.remoteconfig.BuildConfig
-
-internal const val LIBRARY_NAME: String = "fire-cfg-ktx"
-
-/** @suppress */
-@Keep
-class FirebaseConfigLegacyRegistrar : ComponentRegistrar {
- override fun getComponents(): List> {
- return listOf(LibraryVersionComponent.create(LIBRARY_NAME, BuildConfig.VERSION_NAME))
- }
-}
diff --git a/firebase-config/ktx/src/test/kotlin/com/google/firebase/remoteconfig/TestConstructorUtil.kt b/firebase-config/ktx/src/test/kotlin/com/google/firebase/remoteconfig/TestConstructorUtil.kt
deleted file mode 100644
index 4c153bff1e3..00000000000
--- a/firebase-config/ktx/src/test/kotlin/com/google/firebase/remoteconfig/TestConstructorUtil.kt
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright 2019 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.google.firebase.remoteconfig
-
-import android.content.Context
-import com.google.firebase.FirebaseApp
-import com.google.firebase.abt.FirebaseABTesting
-import com.google.firebase.installations.FirebaseInstallationsApi
-import com.google.firebase.remoteconfig.internal.ConfigCacheClient
-import com.google.firebase.remoteconfig.internal.ConfigFetchHandler
-import com.google.firebase.remoteconfig.internal.ConfigGetParameterHandler
-import com.google.firebase.remoteconfig.internal.ConfigRealtimeHandler
-import com.google.firebase.remoteconfig.internal.ConfigSharedPrefsClient
-import com.google.firebase.remoteconfig.internal.rollouts.RolloutsStateSubscriptionsHandler
-import java.util.concurrent.Executor
-
-// This method is a workaround for testing. It enable us to create a FirebaseRemoteConfig object
-// with mocks using the package-private constructor.
-fun createRemoteConfig(
- context: Context?,
- firebaseApp: FirebaseApp,
- firebaseInstallations: FirebaseInstallationsApi,
- firebaseAbt: FirebaseABTesting?,
- executor: Executor,
- fetchedConfigsCache: ConfigCacheClient,
- activatedConfigsCache: ConfigCacheClient,
- defaultConfigsCache: ConfigCacheClient,
- fetchHandler: ConfigFetchHandler,
- getHandler: ConfigGetParameterHandler,
- frcSharedPrefs: ConfigSharedPrefsClient,
- realtimeHandler: ConfigRealtimeHandler,
- rolloutsStateSubscriptionsHandler: RolloutsStateSubscriptionsHandler
-): FirebaseRemoteConfig {
- return FirebaseRemoteConfig(
- context,
- firebaseApp,
- firebaseInstallations,
- firebaseAbt,
- executor,
- fetchedConfigsCache,
- activatedConfigsCache,
- defaultConfigsCache,
- fetchHandler,
- getHandler,
- frcSharedPrefs,
- realtimeHandler,
- rolloutsStateSubscriptionsHandler
- )
-}
diff --git a/firebase-config/ktx/src/test/kotlin/com/google/firebase/remoteconfig/ktx/RemoteConfigTests.kt b/firebase-config/ktx/src/test/kotlin/com/google/firebase/remoteconfig/ktx/RemoteConfigTests.kt
deleted file mode 100644
index d3e7d10e725..00000000000
--- a/firebase-config/ktx/src/test/kotlin/com/google/firebase/remoteconfig/ktx/RemoteConfigTests.kt
+++ /dev/null
@@ -1,162 +0,0 @@
-/*
- * Copyright 2019 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.google.firebase.remoteconfig.ktx
-
-import androidx.test.core.app.ApplicationProvider
-import com.google.common.truth.Truth.assertThat
-import com.google.common.util.concurrent.MoreExecutors
-import com.google.firebase.FirebaseApp
-import com.google.firebase.FirebaseOptions
-import com.google.firebase.installations.FirebaseInstallationsApi
-import com.google.firebase.ktx.Firebase
-import com.google.firebase.ktx.app
-import com.google.firebase.ktx.initialize
-import com.google.firebase.platforminfo.UserAgentPublisher
-import com.google.firebase.remoteconfig.FirebaseRemoteConfig
-import com.google.firebase.remoteconfig.FirebaseRemoteConfigValue
-import com.google.firebase.remoteconfig.createRemoteConfig
-import com.google.firebase.remoteconfig.internal.ConfigCacheClient
-import com.google.firebase.remoteconfig.internal.ConfigFetchHandler
-import com.google.firebase.remoteconfig.internal.ConfigGetParameterHandler
-import com.google.firebase.remoteconfig.internal.ConfigRealtimeHandler
-import com.google.firebase.remoteconfig.internal.ConfigSharedPrefsClient
-import com.google.firebase.remoteconfig.internal.rollouts.RolloutsStateSubscriptionsHandler
-import org.junit.After
-import org.junit.Before
-import org.junit.Test
-import org.junit.runner.RunWith
-import org.mockito.Mockito.mock
-import org.mockito.Mockito.`when`
-import org.robolectric.RobolectricTestRunner
-
-const val APP_ID = "1:14368190084:android:09cb977358c6f241"
-const val API_KEY = "AIzaSyabcdefghijklmnopqrstuvwxyz1234567"
-
-const val EXISTING_APP = "existing"
-
-open class DefaultFirebaseRemoteConfigValue : FirebaseRemoteConfigValue {
- override fun asLong(): Long = TODO("Unimplementend")
- override fun asDouble(): Double = TODO("Unimplementend")
- override fun asString(): String = TODO("Unimplementend")
- override fun asByteArray(): ByteArray = TODO("Unimplementend")
- override fun asBoolean(): Boolean = TODO("Unimplementend")
- override fun getSource(): Int = TODO("Unimplementend")
-}
-
-class StringRemoteConfigValue(val value: String) : DefaultFirebaseRemoteConfigValue() {
- override fun asString() = value
-}
-
-abstract class BaseTestCase {
- @Before
- fun setUp() {
- Firebase.initialize(
- ApplicationProvider.getApplicationContext(),
- FirebaseOptions.Builder()
- .setApplicationId(APP_ID)
- .setApiKey(API_KEY)
- .setProjectId("123")
- .build()
- )
-
- Firebase.initialize(
- ApplicationProvider.getApplicationContext(),
- FirebaseOptions.Builder()
- .setApplicationId(APP_ID)
- .setApiKey(API_KEY)
- .setProjectId("123")
- .build(),
- EXISTING_APP
- )
- }
-
- @After
- fun cleanUp() {
- FirebaseApp.clearInstancesForTest()
- }
-}
-
-@RunWith(RobolectricTestRunner::class)
-class ConfigTests : BaseTestCase() {
-
- @Test
- fun `Firebase#remoteConfig should delegate to FirebaseRemoteConfig#getInstance()`() {
- assertThat(Firebase.remoteConfig).isSameInstanceAs(FirebaseRemoteConfig.getInstance())
- }
-
- @Test
- fun `Firebase#remoteConfig should delegate to FirebaseRemoteConfig#getInstance(FirebaseApp, region)`() {
- val app = Firebase.app(EXISTING_APP)
- assertThat(Firebase.remoteConfig(app)).isSameInstanceAs(FirebaseRemoteConfig.getInstance(app))
- }
-
- @Test
- fun `Overloaded get() operator returns default value when key doesn't exist`() {
- val remoteConfig = Firebase.remoteConfig
- assertThat(remoteConfig["non_existing_key"].asString())
- .isEqualTo(FirebaseRemoteConfig.DEFAULT_VALUE_FOR_STRING)
- assertThat(remoteConfig["another_non_exisiting_key"].asDouble())
- .isEqualTo(FirebaseRemoteConfig.DEFAULT_VALUE_FOR_DOUBLE)
- }
-
- @Test
- fun `FirebaseRemoteConfigSettings builder works`() {
- val minFetchInterval = 3600L
- val fetchTimeout = 60L
- val configSettings = remoteConfigSettings {
- minimumFetchIntervalInSeconds = minFetchInterval
- fetchTimeoutInSeconds = fetchTimeout
- }
- assertThat(configSettings.minimumFetchIntervalInSeconds).isEqualTo(minFetchInterval)
- assertThat(configSettings.fetchTimeoutInSeconds).isEqualTo(fetchTimeout)
- }
-
- @Test
- fun `Overloaded get() operator returns value when key exists`() {
- val mockGetHandler = mock(ConfigGetParameterHandler::class.java)
- val directExecutor = MoreExecutors.directExecutor()
-
- val remoteConfig =
- createRemoteConfig(
- context = null,
- firebaseApp = Firebase.app(EXISTING_APP),
- firebaseInstallations = mock(FirebaseInstallationsApi::class.java),
- firebaseAbt = null,
- executor = directExecutor,
- fetchedConfigsCache = mock(ConfigCacheClient::class.java),
- activatedConfigsCache = mock(ConfigCacheClient::class.java),
- defaultConfigsCache = mock(ConfigCacheClient::class.java),
- fetchHandler = mock(ConfigFetchHandler::class.java),
- getHandler = mockGetHandler,
- frcSharedPrefs = mock(ConfigSharedPrefsClient::class.java),
- realtimeHandler = mock(ConfigRealtimeHandler::class.java),
- rolloutsStateSubscriptionsHandler = mock(RolloutsStateSubscriptionsHandler::class.java)
- )
-
- `when`(mockGetHandler.getValue("KEY")).thenReturn(StringRemoteConfigValue("non default value"))
- assertThat(remoteConfig["KEY"].asString()).isEqualTo("non default value")
- }
-}
-
-@RunWith(RobolectricTestRunner::class)
-class LibraryVersionTest : BaseTestCase() {
- @Test
- fun `library version should be registered with runtime`() {
- val publisher = Firebase.app.get(UserAgentPublisher::class.java)
- assertThat(publisher.userAgent).contains(LIBRARY_NAME)
- }
-}
diff --git a/firebase-config/src/main/java/com/google/firebase/remoteconfig/ktx/RemoteConfig.kt b/firebase-config/src/main/java/com/google/firebase/remoteconfig/ktx/RemoteConfig.kt
deleted file mode 100644
index 899381a6515..00000000000
--- a/firebase-config/src/main/java/com/google/firebase/remoteconfig/ktx/RemoteConfig.kt
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- * Copyright 2019 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.google.firebase.remoteconfig.ktx
-
-import androidx.annotation.Keep
-import com.google.firebase.FirebaseApp
-import com.google.firebase.components.Component
-import com.google.firebase.components.ComponentRegistrar
-import com.google.firebase.ktx.Firebase
-import com.google.firebase.remoteconfig.ConfigUpdate
-import com.google.firebase.remoteconfig.ConfigUpdateListener
-import com.google.firebase.remoteconfig.FirebaseRemoteConfig
-import com.google.firebase.remoteconfig.FirebaseRemoteConfigException
-import com.google.firebase.remoteconfig.FirebaseRemoteConfigSettings
-import com.google.firebase.remoteconfig.FirebaseRemoteConfigValue
-import kotlinx.coroutines.cancel
-import kotlinx.coroutines.channels.awaitClose
-import kotlinx.coroutines.channels.trySendBlocking
-import kotlinx.coroutines.flow.Flow
-import kotlinx.coroutines.flow.callbackFlow
-
-/**
- * Accessing this object for Kotlin apps has changed; see the
- * [migration guide](https://firebase.google.com/docs/android/kotlin-migration).
- *
- * Returns the [FirebaseRemoteConfig] instance of the default [FirebaseApp].
- * @deprecated **Deprecation Notice:** The Kotlin extensions (KTX) APIs have been added to their
- * respective main modules, and the Kotlin extension (KTX) APIs in
- * `com.google.firebase:firebase-config-ktx` are now deprecated. As early as April 2024, we'll no
- * longer release KTX modules. For details, see the
- * [FAQ about this initiative.](https://firebase.google.com/docs/android/kotlin-migration)
- */
-val Firebase.remoteConfig: FirebaseRemoteConfig
- get() = FirebaseRemoteConfig.getInstance()
-
-/**
- * Accessing this object for Kotlin apps has changed; see the
- * [migration guide](https://firebase.google.com/docs/android/kotlin-migration).
- *
- * Returns the [FirebaseRemoteConfig] instance of a given [FirebaseApp].
- * @deprecated **Deprecation Notice:** The Kotlin extensions (KTX) APIs have been added to their
- * respective main modules, and the Kotlin extension (KTX) APIs in
- * `com.google.firebase:firebase-config-ktx` are now deprecated. As early as April 2024, we'll no
- * longer release KTX modules. For details, see the
- * [FAQ about this initiative.](https://firebase.google.com/docs/android/kotlin-migration)
- */
-fun Firebase.remoteConfig(app: FirebaseApp): FirebaseRemoteConfig =
- FirebaseRemoteConfig.getInstance(app)
-
-/**
- * See [FirebaseRemoteConfig#getValue]
- * @deprecated **Deprecation Notice:** The Kotlin extensions (KTX) APIs have been added to their
- * respective main modules, and the Kotlin extension (KTX) APIs in
- * `com.google.firebase:firebase-config-ktx` are now deprecated. As early as April 2024, we'll no
- * longer release KTX modules. For details, see the
- * [FAQ about this initiative.](https://firebase.google.com/docs/android/kotlin-migration)
- */
-@Deprecated(
- "Migrate to use the KTX API from the main module: https://firebase.google.com/docs/android/kotlin-migration.",
- ReplaceWith("")
-)
-operator fun FirebaseRemoteConfig.get(key: String): FirebaseRemoteConfigValue {
- return this.getValue(key)
-}
-
-fun remoteConfigSettings(
- init: FirebaseRemoteConfigSettings.Builder.() -> Unit
-): FirebaseRemoteConfigSettings {
- val builder = FirebaseRemoteConfigSettings.Builder()
- builder.init()
- return builder.build()
-}
-
-/**
- * Starts listening for config updates from the Remote Config backend and emits [ConfigUpdate]s via
- * a [Flow]. See [FirebaseRemoteConfig.addOnConfigUpdateListener] for more information.
- *
- * - When the returned flow starts being collected, an [ConfigUpdateListener] will be attached.
- * - When the flow completes, the listener will be removed. If there are no attached listeners, the
- * connection to the Remote Config backend will be closed.
- * @deprecated **Deprecation Notice:** The Kotlin extensions (KTX) APIs have been added to their
- * respective main modules, and the Kotlin extension (KTX) APIs in
- * `com.google.firebase:firebase-config-ktx` are now deprecated. As early as April 2024, we'll no
- * longer release KTX modules. For details, see the
- * [FAQ about this initiative.](https://firebase.google.com/docs/android/kotlin-migration)
- */
-@Deprecated(
- "Migrate to use the KTX API from the main module: https://firebase.google.com/docs/android/kotlin-migration.",
- ReplaceWith("")
-)
-val FirebaseRemoteConfig.configUpdates
- get() = callbackFlow {
- val registration =
- addOnConfigUpdateListener(
- object : ConfigUpdateListener {
- override fun onUpdate(configUpdate: ConfigUpdate) {
- schedule { trySendBlocking(configUpdate) }
- }
-
- override fun onError(error: FirebaseRemoteConfigException) {
- cancel(message = "Error listening for config updates.", cause = error)
- }
- }
- )
- awaitClose { registration.remove() }
- }
-
-/**
- * @suppress
- * @deprecated **Deprecation Notice:** The Kotlin extensions (KTX) APIs have been added to their
- * respective main modules, and the Kotlin extension (KTX) APIs in
- * `com.google.firebase:firebase-config-ktx` are now deprecated. As early as April 2024, we'll no
- * longer release KTX modules. For details, see the
- * [FAQ about this initiative.](https://firebase.google.com/docs/android/kotlin-migration)
- */
-@Deprecated(
- "Migrate to use the KTX API from the main module: https://firebase.google.com/docs/android/kotlin-migration.",
- ReplaceWith("")
-)
-@Keep
-class FirebaseRemoteConfigKtxRegistrar : ComponentRegistrar {
- override fun getComponents(): List> = listOf()
-}
diff --git a/firebase-config/src/test/java/com/google/firebase/remoteconfig/ktx/RemoteConfigTests.kt b/firebase-config/src/test/java/com/google/firebase/remoteconfig/ktx/RemoteConfigTests.kt
deleted file mode 100644
index 2a423843a7c..00000000000
--- a/firebase-config/src/test/java/com/google/firebase/remoteconfig/ktx/RemoteConfigTests.kt
+++ /dev/null
@@ -1,161 +0,0 @@
-/*
- * Copyright 2019 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.google.firebase.remoteconfig.ktx
-
-import androidx.test.core.app.ApplicationProvider
-import com.google.common.truth.Truth.assertThat
-import com.google.common.util.concurrent.MoreExecutors
-import com.google.firebase.FirebaseApp
-import com.google.firebase.FirebaseOptions
-import com.google.firebase.installations.FirebaseInstallationsApi
-import com.google.firebase.ktx.Firebase
-import com.google.firebase.ktx.app
-import com.google.firebase.ktx.initialize
-import com.google.firebase.platforminfo.UserAgentPublisher
-import com.google.firebase.remoteconfig.FirebaseRemoteConfig
-import com.google.firebase.remoteconfig.FirebaseRemoteConfigValue
-import com.google.firebase.remoteconfig.createRemoteConfig
-import com.google.firebase.remoteconfig.internal.ConfigCacheClient
-import com.google.firebase.remoteconfig.internal.ConfigFetchHandler
-import com.google.firebase.remoteconfig.internal.ConfigGetParameterHandler
-import com.google.firebase.remoteconfig.internal.ConfigRealtimeHandler
-import com.google.firebase.remoteconfig.internal.ConfigSharedPrefsClient
-import com.google.firebase.remoteconfig.internal.rollouts.RolloutsStateSubscriptionsHandler
-import org.junit.After
-import org.junit.Before
-import org.junit.Test
-import org.junit.runner.RunWith
-import org.mockito.Mockito.mock
-import org.mockito.Mockito.`when`
-import org.robolectric.RobolectricTestRunner
-
-const val APP_ID = "1:14368190084:android:09cb977358c6f241"
-const val API_KEY = "AIzaSyabcdefghijklmnopqrstuvwxyz1234567"
-
-const val EXISTING_APP = "existing"
-
-open class DefaultFirebaseRemoteConfigValue : FirebaseRemoteConfigValue {
- override fun asLong(): Long = TODO("Unimplementend")
- override fun asDouble(): Double = TODO("Unimplementend")
- override fun asString(): String = TODO("Unimplementend")
- override fun asByteArray(): ByteArray = TODO("Unimplementend")
- override fun asBoolean(): Boolean = TODO("Unimplementend")
- override fun getSource(): Int = TODO("Unimplementend")
-}
-
-class StringRemoteConfigValue(val value: String) : DefaultFirebaseRemoteConfigValue() {
- override fun asString() = value
-}
-
-abstract class BaseTestCase {
- @Before
- fun setUp() {
- Firebase.initialize(
- ApplicationProvider.getApplicationContext(),
- FirebaseOptions.Builder()
- .setApplicationId(APP_ID)
- .setApiKey(API_KEY)
- .setProjectId("123")
- .build()
- )
-
- Firebase.initialize(
- ApplicationProvider.getApplicationContext(),
- FirebaseOptions.Builder()
- .setApplicationId(APP_ID)
- .setApiKey(API_KEY)
- .setProjectId("123")
- .build(),
- EXISTING_APP
- )
- }
-
- @After
- fun cleanUp() {
- FirebaseApp.clearInstancesForTest()
- }
-}
-
-@RunWith(RobolectricTestRunner::class)
-class ConfigTests : BaseTestCase() {
-
- @Test
- fun `Firebase#remoteConfig should delegate to FirebaseRemoteConfig#getInstance()`() {
- assertThat(Firebase.remoteConfig).isSameInstanceAs(FirebaseRemoteConfig.getInstance())
- }
-
- @Test
- fun `Firebase#remoteConfig should delegate to FirebaseRemoteConfig#getInstance(FirebaseApp, region)`() {
- val app = Firebase.app(EXISTING_APP)
- assertThat(Firebase.remoteConfig(app)).isSameInstanceAs(FirebaseRemoteConfig.getInstance(app))
- }
-
- @Test
- fun `Overloaded get() operator returns default value when key doesn't exist`() {
- val remoteConfig = Firebase.remoteConfig
- assertThat(remoteConfig["non_existing_key"].asString())
- .isEqualTo(FirebaseRemoteConfig.DEFAULT_VALUE_FOR_STRING)
- assertThat(remoteConfig["another_non_exisiting_key"].asDouble())
- .isEqualTo(FirebaseRemoteConfig.DEFAULT_VALUE_FOR_DOUBLE)
- }
-
- @Test
- fun `FirebaseRemoteConfigSettings builder works`() {
- val minFetchInterval = 3600L
- val fetchTimeout = 60L
- val configSettings = remoteConfigSettings {
- minimumFetchIntervalInSeconds = minFetchInterval
- fetchTimeoutInSeconds = fetchTimeout
- }
- assertThat(configSettings.minimumFetchIntervalInSeconds).isEqualTo(minFetchInterval)
- assertThat(configSettings.fetchTimeoutInSeconds).isEqualTo(fetchTimeout)
- }
-
- @Test
- fun `Overloaded get() operator returns value when key exists`() {
- val mockGetHandler = mock(ConfigGetParameterHandler::class.java)
- val directExecutor = MoreExecutors.directExecutor()
-
- val remoteConfig =
- createRemoteConfig(
- context = null,
- firebaseApp = Firebase.app(EXISTING_APP),
- firebaseInstallations = mock(FirebaseInstallationsApi::class.java),
- firebaseAbt = null,
- executor = directExecutor,
- fetchedConfigsCache = mock(ConfigCacheClient::class.java),
- activatedConfigsCache = mock(ConfigCacheClient::class.java),
- defaultConfigsCache = mock(ConfigCacheClient::class.java),
- fetchHandler = mock(ConfigFetchHandler::class.java),
- getHandler = mockGetHandler,
- frcSharedPrefs = mock(ConfigSharedPrefsClient::class.java),
- realtimeHandler = mock(ConfigRealtimeHandler::class.java),
- rolloutsStateSubscriptionsHandler = mock(RolloutsStateSubscriptionsHandler::class.java)
- )
-
- `when`(mockGetHandler.getValue("KEY")).thenReturn(StringRemoteConfigValue("non default value"))
- assertThat(remoteConfig["KEY"].asString()).isEqualTo("non default value")
- }
-}
-
-@RunWith(RobolectricTestRunner::class)
-class LibraryVersionTest : BaseTestCase() {
- @Test
- fun `library version should be registered with runtime`() {
- val publisher = Firebase.app.get(UserAgentPublisher::class.java)
- }
-}
diff --git a/firebase-config/test-app/src/androidTest/kotlin/com/google/firebase/testing/config/FirebaseConfigTest.kt b/firebase-config/test-app/src/androidTest/kotlin/com/google/firebase/testing/config/FirebaseConfigTest.kt
index d8b05fac481..3d0234c8895 100644
--- a/firebase-config/test-app/src/androidTest/kotlin/com/google/firebase/testing/config/FirebaseConfigTest.kt
+++ b/firebase-config/test-app/src/androidTest/kotlin/com/google/firebase/testing/config/FirebaseConfigTest.kt
@@ -18,9 +18,9 @@ package com.google.firebase.testing.config
import androidx.test.core.app.ApplicationProvider
import androidx.test.ext.junit.runners.AndroidJUnit4
+import com.google.firebase.Firebase
import com.google.firebase.FirebaseApp
-import com.google.firebase.ktx.Firebase
-import com.google.firebase.ktx.initialize
+import com.google.firebase.initialize
import org.junit.After
import org.junit.Before
import org.junit.Test
diff --git a/firebase-config/test-app/test-app.gradle.kts b/firebase-config/test-app/test-app.gradle.kts
index 0c91cd21fc3..b9354a59646 100644
--- a/firebase-config/test-app/test-app.gradle.kts
+++ b/firebase-config/test-app/test-app.gradle.kts
@@ -57,7 +57,6 @@ dependencies {
implementation(project(":firebase-config")) {
exclude(group = "com.google.firebase", module = "firebase-config-interop")
}
- implementation(project(":firebase-config:ktx"))
// This is required since a `project` dependency on frc does not expose the APIs of its
// "implementation" dependencies. The alternative would be to make common an "api" dep of
@@ -65,7 +64,6 @@ dependencies {
// Released artifacts don't need these dependencies since they don't use `project` to refer
// to Remote Config.
implementation("com.google.firebase:firebase-common:21.0.0")
- implementation("com.google.firebase:firebase-common-ktx:21.0.0")
implementation("com.google.firebase:firebase-components:18.0.0")
implementation("com.google.firebase:firebase-installations-interop:17.1.0")
@@ -80,7 +78,6 @@ dependencies {
implementation("androidx.core:core-ktx:1.9.0")
implementation("com.google.android.material:material:1.8.0")
- androidTestImplementation("com.google.firebase:firebase-common-ktx:21.0.0")
androidTestImplementation(libs.androidx.test.junit)
androidTestImplementation(libs.androidx.test.runner)
androidTestImplementation(libs.truth)
diff --git a/firebase-crashlytics-ndk/firebase-crashlytics-ndk.gradle b/firebase-crashlytics-ndk/firebase-crashlytics-ndk.gradle
index 4cf82e95069..4198cdc64f6 100644
--- a/firebase-crashlytics-ndk/firebase-crashlytics-ndk.gradle
+++ b/firebase-crashlytics-ndk/firebase-crashlytics-ndk.gradle
@@ -112,7 +112,6 @@ thirdPartyLicenses {
dependencies {
api project(':firebase-crashlytics')
api "com.google.firebase:firebase-common:21.0.0"
- api "com.google.firebase:firebase-common-ktx:21.0.0"
api "com.google.firebase:firebase-components:18.0.0"
implementation libs.playservices.basement
diff --git a/firebase-crashlytics/api.txt b/firebase-crashlytics/api.txt
index 1112c32d2e8..900b32020a0 100644
--- a/firebase-crashlytics/api.txt
+++ b/firebase-crashlytics/api.txt
@@ -54,22 +54,3 @@ package com.google.firebase.crashlytics {
}
-package com.google.firebase.crashlytics.ktx {
-
- public final class FirebaseCrashlyticsKt {
- method @Deprecated public static com.google.firebase.crashlytics.FirebaseCrashlytics getCrashlytics(com.google.firebase.ktx.Firebase);
- method @Deprecated public static void setCustomKeys(com.google.firebase.crashlytics.FirebaseCrashlytics, kotlin.jvm.functions.Function1 super com.google.firebase.crashlytics.ktx.KeyValueBuilder,kotlin.Unit> init);
- }
-
- @Deprecated public final class KeyValueBuilder {
- ctor @Deprecated public KeyValueBuilder(com.google.firebase.crashlytics.FirebaseCrashlytics crashlytics);
- method @Deprecated public void key(String key, boolean value);
- method @Deprecated public void key(String key, double value);
- method @Deprecated public void key(String key, float value);
- method @Deprecated public void key(String key, int value);
- method @Deprecated public void key(String key, String value);
- method @Deprecated public void key(String key, long value);
- }
-
-}
-
diff --git a/firebase-crashlytics/firebase-crashlytics.gradle b/firebase-crashlytics/firebase-crashlytics.gradle
index 63b9da33040..0fcf2a0ef39 100644
--- a/firebase-crashlytics/firebase-crashlytics.gradle
+++ b/firebase-crashlytics/firebase-crashlytics.gradle
@@ -72,7 +72,6 @@ dependencies {
api(libs.playservices.tasks)
api("com.google.firebase:firebase-annotations:16.2.0")
api("com.google.firebase:firebase-common:21.0.0")
- api("com.google.firebase:firebase-common-ktx:21.0.0")
api("com.google.firebase:firebase-components:18.0.0")
api("com.google.firebase:firebase-config-interop:16.0.1")
api("com.google.firebase:firebase-encoders:17.0.0")
diff --git a/firebase-crashlytics/ktx/api.txt b/firebase-crashlytics/ktx/api.txt
deleted file mode 100644
index da4f6cc18fe..00000000000
--- a/firebase-crashlytics/ktx/api.txt
+++ /dev/null
@@ -1 +0,0 @@
-// Signature format: 3.0
diff --git a/firebase-crashlytics/ktx/gradle.properties b/firebase-crashlytics/ktx/gradle.properties
deleted file mode 100644
index 9eff84e6c72..00000000000
--- a/firebase-crashlytics/ktx/gradle.properties
+++ /dev/null
@@ -1 +0,0 @@
-android.enableUnitTestBinaryResources=true
diff --git a/firebase-crashlytics/ktx/ktx.gradle b/firebase-crashlytics/ktx/ktx.gradle
deleted file mode 100644
index ba14b9037c8..00000000000
--- a/firebase-crashlytics/ktx/ktx.gradle
+++ /dev/null
@@ -1,59 +0,0 @@
-// Copyright 2020 Google LLC
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-plugins {
- id "firebase-library"
- id "kotlin-android"
-}
-
-firebaseLibrary {
- libraryGroup = "crashlytics"
- testLab.enabled = true
- publishJavadoc = false
- releaseNotes {
- enabled.set(false)
-}
-}
-
-android {
- namespace "com.google.firebase.crashlytics.ktx"
- compileSdk project.compileSdkVersion
- defaultConfig {
- minSdk project.minSdkVersion
- multiDexEnabled true
- targetSdk project.targetSdkVersion
- versionName version
- testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
- }
- compileOptions {
- sourceCompatibility JavaVersion.VERSION_1_8
- targetCompatibility JavaVersion.VERSION_1_8
- }
- kotlinOptions {
- jvmTarget = '1.8'
- }
- testOptions.unitTests.includeAndroidResources = true
-}
-
-dependencies {
- api(project(":firebase-crashlytics"))
- api("com.google.firebase:firebase-common:21.0.0")
- api("com.google.firebase:firebase-common-ktx:21.0.0")
-
- implementation("com.google.firebase:firebase-components:18.0.0")
-
- androidTestImplementation(libs.androidx.test.junit)
- androidTestImplementation(libs.androidx.test.runner)
- androidTestImplementation(libs.truth)
-}
diff --git a/firebase-crashlytics/ktx/src/androidTest/AndroidManifest.xml b/firebase-crashlytics/ktx/src/androidTest/AndroidManifest.xml
deleted file mode 100644
index f6c54a6adb5..00000000000
--- a/firebase-crashlytics/ktx/src/androidTest/AndroidManifest.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/firebase-crashlytics/ktx/src/androidTest/kotlin/com/google/firebase/crashlytics/ktx/CrashlyticsTests.kt b/firebase-crashlytics/ktx/src/androidTest/kotlin/com/google/firebase/crashlytics/ktx/CrashlyticsTests.kt
deleted file mode 100644
index 8015b7c3a91..00000000000
--- a/firebase-crashlytics/ktx/src/androidTest/kotlin/com/google/firebase/crashlytics/ktx/CrashlyticsTests.kt
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright 2020 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.google.firebase.crashlytics.ktx
-
-import androidx.test.core.app.ApplicationProvider
-import androidx.test.ext.junit.runners.AndroidJUnit4
-import com.google.common.truth.Truth.assertThat
-import com.google.firebase.FirebaseApp
-import com.google.firebase.FirebaseOptions
-import com.google.firebase.crashlytics.FirebaseCrashlytics
-import com.google.firebase.ktx.Firebase
-import com.google.firebase.ktx.app
-import com.google.firebase.ktx.initialize
-import com.google.firebase.platforminfo.UserAgentPublisher
-import org.junit.After
-import org.junit.Before
-import org.junit.Test
-import org.junit.runner.RunWith
-
-@RunWith(AndroidJUnit4::class)
-class CrashlyticsTests {
- @Before
- fun setUp() {
- @Suppress("DEPRECATION")
- Firebase.initialize(
- ApplicationProvider.getApplicationContext(),
- FirebaseOptions.Builder()
- .setApplicationId(APP_ID)
- .setApiKey(API_KEY)
- .setProjectId(PROJECT_ID)
- .build(),
- )
- }
-
- @After
- fun cleanUp() {
- FirebaseApp.clearInstancesForTest()
- }
-
- @Test
- fun firebaseCrashlyticsDelegates() {
- assertThat(Firebase.crashlytics).isSameInstanceAs(FirebaseCrashlytics.getInstance())
- }
-
- @Test
- fun libraryRegistrationAtRuntime() {
- Firebase.app.get(UserAgentPublisher::class.java)
- }
-
- companion object {
- private const val APP_ID = "1:1:android:1a"
- private const val API_KEY = "API-KEY-API-KEY-API-KEY-API-KEY-API-KEY"
- private const val PROJECT_ID = "PROJECT-ID"
- }
-}
diff --git a/firebase-crashlytics/ktx/src/androidTest/res/values/strings.xml b/firebase-crashlytics/ktx/src/androidTest/res/values/strings.xml
deleted file mode 100644
index 3f3b1aca4ce..00000000000
--- a/firebase-crashlytics/ktx/src/androidTest/res/values/strings.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
-
-
- false
-
-
-
diff --git a/firebase-crashlytics/ktx/src/main/AndroidManifest.xml b/firebase-crashlytics/ktx/src/main/AndroidManifest.xml
deleted file mode 100644
index 9a3f53960e1..00000000000
--- a/firebase-crashlytics/ktx/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/firebase-crashlytics/ktx/src/main/kotlin/com/google/firebase/crashlytics/ktx/Logging.kt b/firebase-crashlytics/ktx/src/main/kotlin/com/google/firebase/crashlytics/ktx/Logging.kt
deleted file mode 100644
index e45aed4b682..00000000000
--- a/firebase-crashlytics/ktx/src/main/kotlin/com/google/firebase/crashlytics/ktx/Logging.kt
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright 2023 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.google.firebase.crashlytics.ktx
-
-import androidx.annotation.Keep
-import com.google.firebase.components.Component
-import com.google.firebase.components.ComponentRegistrar
-import com.google.firebase.crashlytics.BuildConfig
-import com.google.firebase.platforminfo.LibraryVersionComponent
-
-internal const val LIBRARY_NAME: String = "fire-cls-ktx"
-
-/** @suppress */
-@Keep
-class FirebaseCrashlyticsLegacyRegistrar : ComponentRegistrar {
- override fun getComponents(): List> {
- return listOf(LibraryVersionComponent.create(LIBRARY_NAME, BuildConfig.VERSION_NAME))
- }
-}
diff --git a/firebase-crashlytics/src/androidTest/java/com/google/firebase/crashlytics/ktx/CrashlyticsTests.kt b/firebase-crashlytics/src/androidTest/java/com/google/firebase/crashlytics/ktx/CrashlyticsTests.kt
deleted file mode 100644
index 8015b7c3a91..00000000000
--- a/firebase-crashlytics/src/androidTest/java/com/google/firebase/crashlytics/ktx/CrashlyticsTests.kt
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright 2020 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.google.firebase.crashlytics.ktx
-
-import androidx.test.core.app.ApplicationProvider
-import androidx.test.ext.junit.runners.AndroidJUnit4
-import com.google.common.truth.Truth.assertThat
-import com.google.firebase.FirebaseApp
-import com.google.firebase.FirebaseOptions
-import com.google.firebase.crashlytics.FirebaseCrashlytics
-import com.google.firebase.ktx.Firebase
-import com.google.firebase.ktx.app
-import com.google.firebase.ktx.initialize
-import com.google.firebase.platforminfo.UserAgentPublisher
-import org.junit.After
-import org.junit.Before
-import org.junit.Test
-import org.junit.runner.RunWith
-
-@RunWith(AndroidJUnit4::class)
-class CrashlyticsTests {
- @Before
- fun setUp() {
- @Suppress("DEPRECATION")
- Firebase.initialize(
- ApplicationProvider.getApplicationContext(),
- FirebaseOptions.Builder()
- .setApplicationId(APP_ID)
- .setApiKey(API_KEY)
- .setProjectId(PROJECT_ID)
- .build(),
- )
- }
-
- @After
- fun cleanUp() {
- FirebaseApp.clearInstancesForTest()
- }
-
- @Test
- fun firebaseCrashlyticsDelegates() {
- assertThat(Firebase.crashlytics).isSameInstanceAs(FirebaseCrashlytics.getInstance())
- }
-
- @Test
- fun libraryRegistrationAtRuntime() {
- Firebase.app.get(UserAgentPublisher::class.java)
- }
-
- companion object {
- private const val APP_ID = "1:1:android:1a"
- private const val API_KEY = "API-KEY-API-KEY-API-KEY-API-KEY-API-KEY"
- private const val PROJECT_ID = "PROJECT-ID"
- }
-}
diff --git a/firebase-crashlytics/src/main/java/com/google/firebase/crashlytics/ktx/FirebaseCrashlytics.kt b/firebase-crashlytics/src/main/java/com/google/firebase/crashlytics/ktx/FirebaseCrashlytics.kt
deleted file mode 100644
index 84b64d8ecee..00000000000
--- a/firebase-crashlytics/src/main/java/com/google/firebase/crashlytics/ktx/FirebaseCrashlytics.kt
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Copyright 2020 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.google.firebase.crashlytics.ktx
-
-import androidx.annotation.Keep
-import com.google.firebase.FirebaseApp
-import com.google.firebase.components.Component
-import com.google.firebase.components.ComponentRegistrar
-import com.google.firebase.crashlytics.FirebaseCrashlytics
-import com.google.firebase.ktx.Firebase
-
-/**
- * Accessing this object for Kotlin apps has changed; see the
- * [migration guide](https://firebase.google.com/docs/android/kotlin-migration).
- *
- * Returns the [FirebaseCrashlytics] instance of the default [FirebaseApp].
- * @deprecated **Deprecation Notice:** The Kotlin extensions (KTX) APIs have been added to their
- * respective main modules, and the Kotlin extension (KTX) APIs in
- * `com.google.firebase:firebase-crashlytics-ktx` are now deprecated. As early as April 2024, we'll
- * no longer release KTX modules. For details, see the
- * [FAQ about this initiative.](https://firebase.google.com/docs/android/kotlin-migration)
- */
-val Firebase.crashlytics: FirebaseCrashlytics
- get() = FirebaseCrashlytics.getInstance()
-
-/**
- * Associates all key-value parameters with the reports
- * @deprecated **Deprecation Notice:** The Kotlin extensions (KTX) APIs have been added to their
- * respective main modules, and the Kotlin extension (KTX) APIs in
- * `com.google.firebase:firebase-crashlytics-ktx` are now deprecated. As early as April 2024, we'll
- * no longer release KTX modules. For details, see the
- * [FAQ about this initiative.](https://firebase.google.com/docs/android/kotlin-migration)
- */
-@Deprecated(
- "Migrate to use the KTX API from the main module: https://firebase.google.com/docs/android/kotlin-migration.",
- ReplaceWith("")
-)
-fun FirebaseCrashlytics.setCustomKeys(init: KeyValueBuilder.() -> Unit) {
- val builder = KeyValueBuilder(this)
- builder.init()
-}
-
-/**
- * @suppress
- * @deprecated **Deprecation Notice:** The Kotlin extensions (KTX) APIs have been added to their
- * respective main modules, and the Kotlin extension (KTX) APIs in
- * `com.google.firebase:firebase-crashlytics-ktx` are now deprecated. As early as April 2024, we'll
- * no longer release KTX modules. For details, see the
- * [FAQ about this initiative.](https://firebase.google.com/docs/android/kotlin-migration)
- */
-@Deprecated(
- "Migrate to use the KTX API from the main module: https://firebase.google.com/docs/android/kotlin-migration.",
- ReplaceWith("")
-)
-@Keep
-internal class FirebaseCrashlyticsKtxRegistrar : ComponentRegistrar {
- override fun getComponents(): List> = listOf()
-
- companion object {}
-}
diff --git a/firebase-crashlytics/src/main/java/com/google/firebase/crashlytics/ktx/KeyValueBuilder.kt b/firebase-crashlytics/src/main/java/com/google/firebase/crashlytics/ktx/KeyValueBuilder.kt
deleted file mode 100644
index d24cdf1de93..00000000000
--- a/firebase-crashlytics/src/main/java/com/google/firebase/crashlytics/ktx/KeyValueBuilder.kt
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * Copyright 2020 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.google.firebase.crashlytics.ktx
-
-import com.google.firebase.crashlytics.FirebaseCrashlytics
-
-/** Helper class to enable fluent syntax in [setCustomKeys] */
-@Deprecated(
- "Use `com.google.firebase.crashlytics.KeyValueBuilder` from the main module.",
-)
-class KeyValueBuilder(private val crashlytics: FirebaseCrashlytics) {
-
- /**
- * Sets a custom key and value that are associated with reports.
- * @deprecated **Deprecation Notice:** The Kotlin extensions (KTX) APIs have been added to their
- * respective main modules, and the Kotlin extension (KTX) APIs in
- * `com.google.firebase:firebase-crashlytics-ktx` are now deprecated. As early as April 2024,
- * we'll no longer release KTX modules. For details, see the
- * [FAQ about this initiative.](https://firebase.google.com/docs/android/kotlin-migration)
- */
- @Deprecated(
- "Use `com.google.firebase.crashlytics.KeyValueBuilder.key(key, value)` from the main module.",
- ReplaceWith("")
- )
- fun key(key: String, value: Boolean) = crashlytics.setCustomKey(key, value)
-
- /**
- * Sets a custom key and value that are associated with reports.
- * @deprecated **Deprecation Notice:** The Kotlin extensions (KTX) APIs have been added to their
- * respective main modules, and the Kotlin extension (KTX) APIs in
- * `com.google.firebase:firebase-crashlytics-ktx` are now deprecated. As early as April 2024,
- * we'll no longer release KTX modules. For details, see the
- * [FAQ about this initiative.](https://firebase.google.com/docs/android/kotlin-migration)
- */
- @Deprecated(
- "Use `com.google.firebase.crashlytics.KeyValueBuilder.key(key, value)` from the main module.",
- ReplaceWith("")
- )
- fun key(key: String, value: Double) = crashlytics.setCustomKey(key, value)
-
- /**
- * Sets a custom key and value that are associated with reports.
- * @deprecated **Deprecation Notice:** The Kotlin extensions (KTX) APIs have been added to their
- * respective main modules, and the Kotlin extension (KTX) APIs in
- * `com.google.firebase:firebase-crashlytics-ktx` are now deprecated. As early as April 2024,
- * we'll no longer release KTX modules. For details, see the
- * [FAQ about this initiative.](https://firebase.google.com/docs/android/kotlin-migration)
- */
- @Deprecated(
- "Use `com.google.firebase.crashlytics.KeyValueBuilder.key(key, value)` from the main module.",
- ReplaceWith("")
- )
- fun key(key: String, value: Float) = crashlytics.setCustomKey(key, value)
-
- /**
- * Sets a custom key and value that are associated with reports.
- * @deprecated **Deprecation Notice:** The Kotlin extensions (KTX) APIs have been added to their
- * respective main modules, and the Kotlin extension (KTX) APIs in
- * `com.google.firebase:firebase-crashlytics-ktx` are now deprecated. As early as April 2024,
- * we'll no longer release KTX modules. For details, see the
- * [FAQ about this initiative.](https://firebase.google.com/docs/android/kotlin-migration)
- */
- @Deprecated(
- "Use `com.google.firebase.crashlytics.KeyValueBuilder.key(key, value)` from the main module.",
- ReplaceWith("")
- )
- fun key(key: String, value: Int) = crashlytics.setCustomKey(key, value)
-
- /**
- * Sets a custom key and value that are associated with reports.
- * @deprecated **Deprecation Notice:** The Kotlin extensions (KTX) APIs have been added to their
- * respective main modules, and the Kotlin extension (KTX) APIs in
- * `com.google.firebase:firebase-crashlytics-ktx` are now deprecated. As early as April 2024,
- * we'll no longer release KTX modules. For details, see the
- * [FAQ about this initiative.](https://firebase.google.com/docs/android/kotlin-migration)
- */
- @Deprecated(
- "Use `com.google.firebase.crashlytics.KeyValueBuilder.key(key, value)` from the main module.",
- ReplaceWith("")
- )
- fun key(key: String, value: Long) = crashlytics.setCustomKey(key, value)
-
- /**
- * Sets a custom key and value that are associated with reports.
- * @deprecated **Deprecation Notice:** The Kotlin extensions (KTX) APIs have been added to their
- * respective main modules, and the Kotlin extension (KTX) APIs in
- * `com.google.firebase:firebase-crashlytics-ktx` are now deprecated. As early as April 2024,
- * we'll no longer release KTX modules. For details, see the
- * [FAQ about this initiative.](https://firebase.google.com/docs/android/kotlin-migration)
- */
- @Deprecated(
- "Use `com.google.firebase.crashlytics.KeyValueBuilder.key(key, value)` from the main module.",
- ReplaceWith("")
- )
- fun key(key: String, value: String) = crashlytics.setCustomKey(key, value)
-}
diff --git a/firebase-database/api.txt b/firebase-database/api.txt
index 9c1929bdba5..909def2f1cc 100644
--- a/firebase-database/api.txt
+++ b/firebase-database/api.txt
@@ -287,63 +287,3 @@ package com.google.firebase.database {
}
-package com.google.firebase.database.ktx {
-
- @Deprecated public abstract sealed class ChildEvent {
- }
-
- @Deprecated public static final class ChildEvent.Added extends com.google.firebase.database.ktx.ChildEvent {
- ctor @Deprecated public ChildEvent.Added(com.google.firebase.database.DataSnapshot snapshot, String? previousChildName);
- method @Deprecated public com.google.firebase.database.DataSnapshot component1();
- method @Deprecated public String? component2();
- method @Deprecated public com.google.firebase.database.ktx.ChildEvent.Added copy(com.google.firebase.database.DataSnapshot snapshot, String? previousChildName);
- method @Deprecated public String? getPreviousChildName();
- method @Deprecated public com.google.firebase.database.DataSnapshot getSnapshot();
- property @Deprecated public final String? previousChildName;
- property @Deprecated public final com.google.firebase.database.DataSnapshot snapshot;
- }
-
- @Deprecated public static final class ChildEvent.Changed extends com.google.firebase.database.ktx.ChildEvent {
- ctor @Deprecated public ChildEvent.Changed(com.google.firebase.database.DataSnapshot snapshot, String? previousChildName);
- method @Deprecated public com.google.firebase.database.DataSnapshot component1();
- method @Deprecated public String? component2();
- method @Deprecated public com.google.firebase.database.ktx.ChildEvent.Changed copy(com.google.firebase.database.DataSnapshot snapshot, String? previousChildName);
- method @Deprecated public String? getPreviousChildName();
- method @Deprecated public com.google.firebase.database.DataSnapshot getSnapshot();
- property @Deprecated public final String? previousChildName;
- property @Deprecated public final com.google.firebase.database.DataSnapshot snapshot;
- }
-
- @Deprecated public static final class ChildEvent.Moved extends com.google.firebase.database.ktx.ChildEvent {
- ctor @Deprecated public ChildEvent.Moved(com.google.firebase.database.DataSnapshot snapshot, String? previousChildName);
- method @Deprecated public com.google.firebase.database.DataSnapshot component1();
- method @Deprecated public String? component2();
- method @Deprecated public com.google.firebase.database.ktx.ChildEvent.Moved copy(com.google.firebase.database.DataSnapshot snapshot, String? previousChildName);
- method @Deprecated public String? getPreviousChildName();
- method @Deprecated public com.google.firebase.database.DataSnapshot getSnapshot();
- property @Deprecated public final String? previousChildName;
- property @Deprecated public final com.google.firebase.database.DataSnapshot snapshot;
- }
-
- @Deprecated public static final class ChildEvent.Removed extends com.google.firebase.database.ktx.ChildEvent {
- ctor @Deprecated public ChildEvent.Removed(com.google.firebase.database.DataSnapshot snapshot);
- method @Deprecated public com.google.firebase.database.DataSnapshot component1();
- method @Deprecated public com.google.firebase.database.ktx.ChildEvent.Removed copy(com.google.firebase.database.DataSnapshot snapshot);
- method @Deprecated public com.google.firebase.database.DataSnapshot getSnapshot();
- property @Deprecated public final com.google.firebase.database.DataSnapshot snapshot;
- }
-
- public final class DatabaseKt {
- method @Deprecated public static com.google.firebase.database.FirebaseDatabase database(com.google.firebase.ktx.Firebase, com.google.firebase.FirebaseApp app);
- method @Deprecated public static com.google.firebase.database.FirebaseDatabase database(com.google.firebase.ktx.Firebase, com.google.firebase.FirebaseApp app, String url);
- method @Deprecated public static com.google.firebase.database.FirebaseDatabase database(com.google.firebase.ktx.Firebase, String url);
- method @Deprecated public static kotlinx.coroutines.flow.Flow getChildEvents(com.google.firebase.database.Query);
- method @Deprecated public static com.google.firebase.database.FirebaseDatabase getDatabase(com.google.firebase.ktx.Firebase);
- method @Deprecated public static kotlinx.coroutines.flow.Flow getSnapshots(com.google.firebase.database.Query);
- method @Deprecated public static inline T? getValue(com.google.firebase.database.DataSnapshot);
- method @Deprecated public static inline T? getValue(com.google.firebase.database.MutableData);
- method @Deprecated public static inline kotlinx.coroutines.flow.Flow values(com.google.firebase.database.Query);
- }
-
-}
-
diff --git a/firebase-database/firebase-database.gradle.kts b/firebase-database/firebase-database.gradle.kts
index 038992487b8..796fd4f81c3 100644
--- a/firebase-database/firebase-database.gradle.kts
+++ b/firebase-database/firebase-database.gradle.kts
@@ -67,7 +67,6 @@ android {
dependencies {
api("com.google.firebase:firebase-appcheck-interop:17.1.0")
api("com.google.firebase:firebase-common:21.0.0")
- api("com.google.firebase:firebase-common-ktx:21.0.0")
api("com.google.firebase:firebase-components:18.0.0")
api("com.google.firebase:firebase-auth-interop:20.0.0") {
exclude(group = "com.google.firebase", module = "firebase-common")
diff --git a/firebase-database/ktx/api.txt b/firebase-database/ktx/api.txt
deleted file mode 100644
index da4f6cc18fe..00000000000
--- a/firebase-database/ktx/api.txt
+++ /dev/null
@@ -1 +0,0 @@
-// Signature format: 3.0
diff --git a/firebase-database/ktx/gradle.properties b/firebase-database/ktx/gradle.properties
deleted file mode 100644
index 9eff84e6c72..00000000000
--- a/firebase-database/ktx/gradle.properties
+++ /dev/null
@@ -1 +0,0 @@
-android.enableUnitTestBinaryResources=true
diff --git a/firebase-database/ktx/ktx.gradle.kts b/firebase-database/ktx/ktx.gradle.kts
deleted file mode 100644
index 23372ca79ef..00000000000
--- a/firebase-database/ktx/ktx.gradle.kts
+++ /dev/null
@@ -1,62 +0,0 @@
-// Copyright 2023 Google LLC
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-plugins {
- id("firebase-library")
- id("kotlin-android")
- kotlin("android")
-}
-
-group = "com.google.firebase"
-
-firebaseLibrary {
- libraryGroup = "database"
- publishJavadoc = false
- releaseNotes { enabled.set(false) }
-}
-
-android {
- val compileSdkVersion: Int by rootProject
- val targetSdkVersion: Int by rootProject
- val minSdkVersion: Int by rootProject
-
- compileSdk = compileSdkVersion
-
- namespace = "com.google.firebase.database.ktx"
- defaultConfig {
- minSdk = minSdkVersion
- targetSdk = targetSdkVersion
- multiDexEnabled = true
- testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
- }
- sourceSets {
- named("main") { java.srcDir("src/main/kotlin") }
- named("test") { java.srcDir("src/test/kotlin") }
- }
-
- testOptions.unitTests.isIncludeAndroidResources = true
-}
-
-dependencies {
- api("com.google.firebase:firebase-common:21.0.0")
- api("com.google.firebase:firebase-common-ktx:21.0.0")
- api(project(":firebase-database"))
-
- implementation("com.google.firebase:firebase-components:18.0.0")
-
- testImplementation(libs.androidx.test.core)
- testImplementation(libs.junit)
- testImplementation(libs.robolectric)
- testImplementation(libs.truth)
-}
diff --git a/firebase-database/ktx/src/main/AndroidManifest.xml b/firebase-database/ktx/src/main/AndroidManifest.xml
deleted file mode 100644
index 1d98a5ed1e0..00000000000
--- a/firebase-database/ktx/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/firebase-database/ktx/src/main/kotlin/com/google/firebase/database/ktx/Logging.kt b/firebase-database/ktx/src/main/kotlin/com/google/firebase/database/ktx/Logging.kt
deleted file mode 100644
index 6f42bad09df..00000000000
--- a/firebase-database/ktx/src/main/kotlin/com/google/firebase/database/ktx/Logging.kt
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright 2023 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.google.firebase.database.ktx
-
-import androidx.annotation.Keep
-import com.google.firebase.components.Component
-import com.google.firebase.components.ComponentRegistrar
-import com.google.firebase.database.BuildConfig
-import com.google.firebase.platforminfo.LibraryVersionComponent
-
-internal const val LIBRARY_NAME: String = "fire-db-ktx"
-
-/** @suppress */
-@Keep
-class FirebaseDatabaseLegacyRegistrar : ComponentRegistrar {
- override fun getComponents(): List> {
- return listOf(LibraryVersionComponent.create(LIBRARY_NAME, BuildConfig.VERSION_NAME))
- }
-}
diff --git a/firebase-database/ktx/src/test/kotlin/com/google/firebase/database/DataSnapshotUtil.kt b/firebase-database/ktx/src/test/kotlin/com/google/firebase/database/DataSnapshotUtil.kt
deleted file mode 100644
index a2e8d1451b4..00000000000
--- a/firebase-database/ktx/src/test/kotlin/com/google/firebase/database/DataSnapshotUtil.kt
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright 2019 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.google.firebase.database
-
-import com.google.firebase.database.snapshot.IndexedNode
-import com.google.firebase.database.snapshot.NodeUtilities
-
-/**
- * Creates a custom DataSnapshot.
- *
- * This method is a workaround that enables the creation of a custom DataSnapshot using
- * package-private methods.
- */
-fun createDataSnapshot(data: Any?, db: FirebaseDatabase): DataSnapshot {
- var ref = DatabaseReference("https://test.firebaseio.com", db.config)
- val node = NodeUtilities.NodeFromJSON(data)
- return DataSnapshot(ref, IndexedNode.from(node))
-}
-
-/**
- * Creates a custom MutableData.
- *
- * This method is a workaround that enables the creation of a custom MutableData using
- * package-private methods.
- */
-fun createMutableData(data: Any?): MutableData {
- val node = NodeUtilities.NodeFromJSON(data)
- return MutableData(node)
-}
diff --git a/firebase-database/ktx/src/test/kotlin/com/google/firebase/database/ktx/DatabaseTests.kt b/firebase-database/ktx/src/test/kotlin/com/google/firebase/database/ktx/DatabaseTests.kt
deleted file mode 100644
index 5ba53fa7edf..00000000000
--- a/firebase-database/ktx/src/test/kotlin/com/google/firebase/database/ktx/DatabaseTests.kt
+++ /dev/null
@@ -1,219 +0,0 @@
-/*
- * Copyright 2019 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.google.firebase.database.ktx
-
-import androidx.test.core.app.ApplicationProvider
-import com.google.common.truth.Truth.assertThat
-import com.google.firebase.FirebaseApp
-import com.google.firebase.FirebaseOptions
-import com.google.firebase.database.Exclude
-import com.google.firebase.database.FirebaseDatabase
-import com.google.firebase.database.IgnoreExtraProperties
-import com.google.firebase.database.createDataSnapshot
-import com.google.firebase.database.createMutableData
-import com.google.firebase.ktx.Firebase
-import com.google.firebase.ktx.app
-import com.google.firebase.ktx.initialize
-import com.google.firebase.platforminfo.UserAgentPublisher
-import org.junit.After
-import org.junit.Before
-import org.junit.Test
-import org.junit.runner.RunWith
-import org.robolectric.RobolectricTestRunner
-
-const val APP_ID = "APP_ID"
-const val API_KEY = "API_KEY"
-
-const val EXISTING_APP = "existing"
-
-@IgnoreExtraProperties
-data class Player(
- var name: String? = "",
- var jersey: Int? = -1,
- var goalkeeper: Boolean? = false,
- var avg_goals_per_game: Double? = 0.0
-) {
- @Exclude
- fun toMap(): Map {
- return mapOf(
- "name" to name,
- "jersey" to jersey,
- "goalkeeper" to goalkeeper,
- "avg_goals_per_game" to avg_goals_per_game
- )
- }
-}
-
-abstract class BaseTestCase {
- @Before
- fun setUp() {
- Firebase.initialize(
- ApplicationProvider.getApplicationContext(),
- FirebaseOptions.Builder()
- .setApplicationId(APP_ID)
- .setApiKey(API_KEY)
- .setProjectId("123")
- .setDatabaseUrl("http://tests.fblocal.com:9000")
- .build()
- )
-
- Firebase.initialize(
- ApplicationProvider.getApplicationContext(),
- FirebaseOptions.Builder()
- .setApplicationId(APP_ID)
- .setApiKey(API_KEY)
- .setProjectId("123")
- .setDatabaseUrl("http://tests.fblocal.com:9000")
- .build(),
- EXISTING_APP
- )
- }
-
- @After
- fun cleanUp() {
- FirebaseApp.clearInstancesForTest()
- }
-}
-
-@RunWith(RobolectricTestRunner::class)
-class DatabaseTests : BaseTestCase() {
- @Test
- fun `database should delegate to FirebaseDatabase#getInstance()`() {
- assertThat(Firebase.database).isSameInstanceAs(FirebaseDatabase.getInstance())
- }
-
- @Test
- fun `FirebaseApp#database should delegate to FirebaseDatabase#getInstance(FirebaseApp)`() {
- val app = Firebase.app(EXISTING_APP)
- assertThat(Firebase.database(app)).isSameInstanceAs(FirebaseDatabase.getInstance(app))
- }
-
- @Test
- fun `Firebase#database should delegate to FirebaseDatabase#getInstance(url)`() {
- val url = "http://tests.fblocal.com:9000"
- assertThat(Firebase.database(url)).isSameInstanceAs(FirebaseDatabase.getInstance(url))
- }
-
- @Test
- fun `Firebase#database should delegate to FirebaseDatabase#getInstance(FirebaseApp, url)`() {
- val app = Firebase.app(EXISTING_APP)
- val url = "http://tests.fblocal.com:9000"
- assertThat(Firebase.database(app, url)).isSameInstanceAs(FirebaseDatabase.getInstance(app, url))
- }
-}
-
-@RunWith(RobolectricTestRunner::class)
-class DataSnapshotTests : BaseTestCase() {
- @Test
- fun `reified getValue works with basic types`() {
- val data =
- mapOf(
- "name" to "John Doe",
- "jersey" to 35L,
- "goalkeeper" to false,
- "avg_goals_per_game" to 0.35
- )
- val dataSnapshot = createDataSnapshot(data, Firebase.database)
- assertThat(dataSnapshot.child("name").getValue()).isEqualTo("John Doe")
- assertThat(dataSnapshot.child("jersey").getValue()).isEqualTo(35L)
- assertThat(dataSnapshot.child("goalkeeper").getValue()).isEqualTo(false)
- assertThat(dataSnapshot.child("avg_goals_per_game").getValue()).isEqualTo(0.35)
- }
-
- @Test
- fun `reified getValue works with maps`() {
- val data =
- mapOf(
- "name" to "John Doe",
- "jersey" to 35L,
- "goalkeeper" to false,
- "avg_goals_per_game" to 0.35
- )
- val dataSnapshot = createDataSnapshot(data, Firebase.database)
- assertThat(dataSnapshot.getValue