Migrate to using the Kotlin extensions (KTX) APIs in the main modules

Firebase is increasing its commitment to Kotlin, and we're working to modernize our Android ecosystem to make Kotlin more accessible and easy-to-use with Firebase.

To accomplish this modernization, we're making a few changes to our Firebase SDKs for Android. This page describes important information about this change, including:


Learn how to migrate your app

What's changing?

The Kotlin extensions (KTX) APIs have been added to their respective main modules. For example, all the APIs from firebase-perf-ktx have been added to firebase-perf under the com.google.firebase.perf package.

This change means that Kotlin developers can now depend on the main modules instead of the KTX modules (when using Firebase BoM v32.5.0+ or main module versions listed in BoM v32.5.0+).

In July 2025, we stopped releasing new versions of the KTX modules and removed the KTX libraries from the Firebase Android BoM (v34.0.0).

Why are we making this change?

Firebase is committed to a Kotlin-first ecosystem for Android developers. This packaging modernization provides the following advantages:

  • Simplified dependency management: You now only need to depend on a single module, eliminating the need to switch between the main module and the Kotlin extensions or to depend on both.

  • Enhanced Kotlin support: All of our Firebase SDKs for Android will now provide better support for Kotlin. We'll include all the new Kotlin-friendly features directly in our main modules.

Important dates for this change

In October 2023

In October 2023, the Kotlin extensions (KTX) APIs were added to their respective main modules, which means that you can now use the KTX APIs directly from the main modules when using Firebase BoM v32.5.0+ or main module versions listed in BoM v32.5.0+.

In parallel, the Kotlin extension (KTX) APIs in the KTX modules were deprecated (see the release notes describing this change). During the deprecated phase, the deprecated APIs in the KTX modules will continue to function and be maintained.

In July 2025

In July 2025, we stopped releasing new versions of the KTX modules, and we removed the KTX modules from the Firebase BoM (starting with BoM v34.0.0).

Any previously released version of a KTX module or the BoM will continue to function, but they're now end-of-maintenance. This means that we won't add bug fixes, backwards-compatible changes, or new features to the KTX modules. Instead, all future development for Firebase on Android will only be done in the main modules (for both Java and Kotlin).

How to migrate to use KTX APIs from the main modules

If you use Kotlin extensions (KTX) APIs, make the following updates in your app to start using the APIs from the main modules instead of the KTX modules.

  1. Revise your Gradle dependencies to rely on the main module rather than the KTX module. For example, if you use the Firebase Android BoM (recommended):

    BEFORE

    dependencies {
      // ...
    
      // Import the Firebase BoM
      implementation(platform("com.google.firebase:firebase-bom:34.0.0"))
    
      // Using KTX libraries for Authentication and Cloud Firestore
      implementation("com.google.firebase:firebase-auth-ktx")
      implementation("com.google.firebase:firebase-firestore-ktx")
    }

    AFTER

    dependencies {
      // ...
    
      // Import the Firebase BoM as usual
      // Make sure to use Firebase BoM v32.5.0 or higher
      implementation(platform("com.google.firebase:firebase-bom:34.0.0"))
    
      // No need to use the KTX libraries; everything is now in the main module
      implementation("com.google.firebase:firebase-auth")
      implementation("com.google.firebase:firebase-firestore")
    }

    BEFORE

    dependencies {
      // ...
    
      // Using KTX libraries for Authentication and Cloud Firestore
      implementation("com.google.firebase:firebase-auth-ktx:23.2.1")
      implementation("com.google.firebase:firebase-firestore-ktx:25.1.4")
    }

    AFTER

    dependencies {
      // ...
    
      // No need to use the KTX libraries, everything is now in the main module
      // Make sure to use a version listed in Firebase BoM v32.5.0 or higher
      implementation("com.google.firebase:firebase-auth:24.0.0")
      implementation("com.google.firebase:firebase-firestore:26.0.0")
    }


  2. Update your code to replace all occurrences of the KTX APIs with the relocated APIs in the main module under the com.google.firebase package.

    BEFORE

    import com.google.firebase.auth.ktx.auth
    import com.google.firebase.firestore.ktx.firestore
    import com.google.firebase.firestore.ktx.toObject
    import com.google.firebase.ktx.Firebase

    AFTER

    import com.google.firebase.auth.auth
    import com.google.firebase.firestore.firestore
    import com.google.firebase.firestore.toObject
    import com.google.firebase.Firebase