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

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

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


Learn how to migrate your app

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

What's changing?

The Kotlin extensions (KTX) APIs have been added to their respective mainmodules. For example, all the APIs fromfirebase-perf-ktx have been added tofirebase-perf under thecom.google.firebase.perf package.

This change means that Kotlin developers can now depend on the main modulesinstead of the KTX modules (when usingFirebase BoM v32.5.0+ ormain module versions listed inBoM v32.5.0+).

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

Note: Any currently or previously released versions of the KTX modules orBoM will still function.
However, we recommend that you
migrate your app to use KTX APIs from the main moduleto ensure that you continue to get fixes and can take advantage of changes andnew features now that new versions of the KTX modules are no longer released.

Why are we making this change?

Firebase is committed to aKotlin-first ecosystem for Android developers. This packaging modernization provides thefollowing advantages:

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

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

Important dates for this change

We recommend that youmigrate your app to use KTX APIs from the main module to ensure that you continue to get fixes and can take advantage of changes and new features now that the KTX modules are no longer released.

In October 2023

In October 2023, the Kotlin extensions (KTX) APIs were added to their respectivemain modules, which means that you can now use the KTX APIs directly from themain modules when usingFirebase BoM v32.5.0+ ormain module versions listed inBoM v32.5.0+.

In parallel, the Kotlin extension (KTX) APIsin the KTX modules weredeprecated (see therelease notes describing thischange). During thedeprecated phase,the deprecated APIs in the KTX modules will continue to function and bemaintained.

In July 2025

In July 2025, we stopped releasing new versions of the KTX modules, and weremoved the KTX modules from theFirebase BoM (starting withBoM v34.0.0).

Any previously released version of a KTX module or theBoM will continue tofunction, but they're nowend-of-maintenance.This means that we won't add bug fixes, backwards-compatible changes, ornew features to the KTX modules. Instead, all future development for Firebase onAndroid will only be done in themain 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 appto 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 theKTX module. For example, if you use theFirebase Android BoM(recommended):

    BEFORE

    dependencies{// ...// Import theFirebase BoMimplementation(platform("com.google.firebase:firebase-bom:34.7.0"))// Using KTX libraries forAuthentication andCloud Firestoreimplementation("com.google.firebase:firebase-auth-ktx")implementation("com.google.firebase:firebase-firestore-ktx")}

    AFTER

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

    If you don't use theFirebase Android BoM

    BEFORE

    dependencies{// ...// Using KTX libraries forAuthentication andCloud Firestoreimplementation("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 inFirebase BoM v32.5.0 or higherimplementation("com.google.firebase:firebase-auth:24.0.1")implementation("com.google.firebase:firebase-firestore:26.0.2")}


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

    BEFORE

    importcom.google.firebase.auth.ktx.authimportcom.google.firebase.firestore.ktx.firestoreimportcom.google.firebase.firestore.ktx.toObjectimportcom.google.firebase.ktx.Firebase

    AFTER

    importcom.google.firebase.auth.authimportcom.google.firebase.firestore.firestoreimportcom.google.firebase.firestore.toObjectimportcom.google.firebase.Firebase

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-12-17 UTC.