Home > Developer Guide > Guides > Firebase KTX Deprecation
Firebase KTX Module Deprecation (BOM 34.x+)
Critical Notice: Firebase stopped releasing KTX modules in July 2025 and removed them from BOM 34.0.0+
Impact: Existing code using
-ktxdependencies must either stay on BOM 33.x or migrate to non-KTX modulesDiscovered: During PR #269 debugging session (2025-11-18) after 6 failed build attempts
Overview
What Happened
In July 2025, Firebase made a breaking change to their Bill of Materials (BOM) structure:
Firebase BOM 33.x (Last KTX Version):
- Includes all
-ktxlibrary variants - Example:
firebase-auth-ktx,firebase-firestore-ktx,firebase-analytics-ktx - KTX APIs provide Kotlin extensions and coroutine support
Firebase BOM 34.0.0+ (KTX Removed):
- Removed all
-ktxlibrary variants from BOM - KTX APIs merged into main modules
- Example: Use
firebase-authinstead offirebase-auth-ktx - Same Kotlin APIs, different artifact names
Why This Matters
Build Failure Symptom:
Could not find com.google.firebase:firebase-analytics-ktx:.
^
Empty version string
Root Cause:
- Your
build.gradle.ktsreferencesfirebase-analytics-ktx - Your BOM is version 34.0.0 or higher
- BOM 34.x doesn’t include
-ktxlibraries - Gradle can’t find version information → empty string
Impact on Version Catalogs: If using Gradle version catalogs without versions for BOM-managed dependencies, builds will fail silently with empty version strings.
Timeline & Context
Firebase’s Decision
Announcement: July 2025 (Firebase Release Notes)
Rationale:
- Kotlin extensions matured and stabilized
- No longer needed separate KTX artifacts
- Reduced maintenance burden
- Simplified dependency management
Migration Path:
“All KTX APIs are now available in the main modules. Simply drop the
-ktxsuffix from your dependencies.”
Discovery in Archery Apprentice Project
Date: 2025-11-18 (Week 28) Context: PR #269 - Gradle dependency updates Debugging Duration: ~2 hours, 6 build attempts
Initial Symptom:
implementation(platform(libs.firebase.bom)) // BOM 34.6.0
implementation(libs.firebase.analytics.ktx) // Not in BOM!Error:
Could not find com.google.firebase:firebase-analytics-ktx:.
Could not find com.google.firebase:firebase-crashlytics-ktx:.
Red Herrings Investigated:
- Version catalog syntax issues (syntax was correct)
- Gradle cache corruption (cleared multiple times)
- KSP version incompatibility (unrelated)
- Network/Maven repository issues (not the cause)
Breakthrough:
Compared working main branch:
- Main uses BOM 33.0.0 with hardcoded dependencies
- PR branch attempted BOM 34.6.0 with version catalog
- Discovered Firebase removed KTX from BOM 34.0.0
Related Documentation:
BOM Version Comparison
Firebase BOM 33.x (KTX Supported)
Includes:
com.google.firebase:firebase-auth-ktx:22.1.0
com.google.firebase:firebase-firestore-ktx:24.7.0
com.google.firebase:firebase-analytics-ktx:21.3.0
com.google.firebase:firebase-crashlytics-ktx:18.4.1
Usage:
dependencies {
implementation(platform("com.google.firebase:firebase-bom:33.0.0"))
implementation("com.google.firebase:firebase-auth-ktx")
implementation("com.google.firebase:firebase-firestore-ktx")
implementation("com.google.firebase:firebase-analytics-ktx")
}Status: ✅ Stable, supported, recommended for existing projects
Firebase BOM 34.x+ (KTX Removed)
Does NOT Include:
com.google.firebase:firebase-auth-ktx ❌ Not in BOM
com.google.firebase:firebase-firestore-ktx ❌ Not in BOM
com.google.firebase:firebase-analytics-ktx ❌ Not in BOM
Includes Instead:
com.google.firebase:firebase-auth:22.1.2 ✅ Main module
com.google.firebase:firebase-firestore:24.8.0 ✅ Main module
com.google.firebase:firebase-analytics:21.4.0 ✅ Main module
Correct Usage:
dependencies {
implementation(platform("com.google.firebase:firebase-bom:34.6.0"))
implementation("com.google.firebase:firebase-auth") // No -ktx!
implementation("com.google.firebase:firebase-firestore") // No -ktx!
implementation("com.google.firebase:firebase-analytics") // No -ktx!
}Status: ✅ Current, recommended for new projects
Migration Strategies
Strategy 1: Stay on BOM 33.x (Recommended for Existing Projects)
When to Use:
- Large existing codebase with
-ktxdependencies - Not ready for immediate migration
- Need stable, tested configuration
- Minimal risk approach
Implementation:
// build.gradle.kts
dependencies {
implementation(platform("com.google.firebase:firebase-bom:33.0.0")) // Last KTX version
implementation("com.google.firebase:firebase-auth-ktx")
implementation("com.google.firebase:firebase-firestore-ktx")
implementation("com.google.firebase:firebase-analytics-ktx")
implementation("com.google.firebase:firebase-crashlytics-ktx")
}With Version Catalog:
# gradle/libs.versions.toml
[versions]
firebase-bom = "33.0.0"
[libraries]
firebase-bom = { group = "com.google.firebase", name = "firebase-bom", version.ref = "firebase-bom" }
firebase-auth-ktx = { group = "com.google.firebase", name = "firebase-auth-ktx" }
firebase-firestore-ktx = { group = "com.google.firebase", name = "firebase-firestore-ktx" }// build.gradle.kts
dependencies {
implementation(platform(libs.firebase.bom))
implementation(libs.firebase.auth.ktx)
implementation(libs.firebase.firestore.ktx)
}Pros:
- No code changes required
- Proven stable configuration
- Lower risk
- Keeps working version catalog syntax
Cons:
- Eventually must migrate (Firebase will stop supporting 33.x)
- Missing newer Firebase features from 34.x+
- Technical debt accumulation
Archery Apprentice Decision: We chose this strategy for PR #269 to unblock development. Migration to 34.x+ scheduled for future work.
Strategy 2: Migrate to BOM 34.x+ (Recommended for New Projects)
When to Use:
- New projects starting from scratch
- Planned refactoring window available
- Want latest Firebase features
- Future-proof configuration
Migration Steps:
Step 1: Update BOM Version
- implementation(platform("com.google.firebase:firebase-bom:33.0.0"))
+ implementation(platform("com.google.firebase:firebase-bom:34.6.0"))Step 2: Remove -ktx Suffixes
- implementation("com.google.firebase:firebase-auth-ktx")
+ implementation("com.google.firebase:firebase-auth")
- implementation("com.google.firebase:firebase-firestore-ktx")
+ implementation("com.google.firebase:firebase-firestore")
- implementation("com.google.firebase:firebase-analytics-ktx")
+ implementation("com.google.firebase:firebase-analytics")
- implementation("com.google.firebase:firebase-crashlytics-ktx")
+ implementation("com.google.firebase:firebase-crashlytics")Step 3: Update Version Catalog (If Used)
# gradle/libs.versions.toml
[versions]
- firebase-bom = "33.0.0"
+ firebase-bom = "34.6.0"
[libraries]
firebase-bom = { group = "com.google.firebase", name = "firebase-bom", version.ref = "firebase-bom" }
- firebase-auth-ktx = { group = "com.google.firebase", name = "firebase-auth-ktx" }
+ firebase-auth = { group = "com.google.firebase", name = "firebase-auth" }
- firebase-firestore-ktx = { group = "com.google.firebase", name = "firebase-firestore-ktx" }
+ firebase-firestore = { group = "com.google.firebase", name = "firebase-firestore" }Step 4: No Code Changes Required
Important: The Kotlin extension APIs are the same in both modules. Your application code does NOT need to change.
Example - Code Unchanged:
// This code works with BOTH -ktx and non-ktx modules
val auth = Firebase.auth
auth.signInWithEmailAndPassword(email, password).await()
val firestore = Firebase.firestore
val doc = firestore.collection("users").document(userId).get().await()The extension functions (await(), Firebase.auth, etc.) are now in the main modules, so imports and usage remain identical.
Pros:
- Latest Firebase features
- Future-proof
- Official recommended approach
- Cleaner dependency list
Cons:
- Requires updating all Firebase dependencies at once
- Must update version catalog entries
- Testing required to verify no regressions
- Slightly risky if done mid-sprint
Impact on Gradle Version Catalogs
The Confusion This Caused
During PR #269 debugging, we initially believed the Gradle version catalog syntax was incorrect because:
- Version catalog syntax looked unusual (no versions for individual libraries)
- Build failed with empty version strings
- Stack Overflow had conflicting advice about version catalogs + BOMs
What We Learned:
- ✅ Version catalog syntax was CORRECT
- ❌ Problem was using BOM 34.x with
-ktxlibraries that don’t exist in that BOM
Correct Version Catalog + BOM Pattern
This pattern DOES work (when libraries exist in BOM):
# gradle/libs.versions.toml
[versions]
firebase-bom = "33.0.0" # Or 34.6.0 with non-ktx libraries
[libraries]
firebase-bom = { group = "com.google.firebase", name = "firebase-bom", version.ref = "firebase-bom" }
firebase-auth-ktx = { group = "com.google.firebase", name = "firebase-auth-ktx" } # No version!
firebase-firestore-ktx = { group = "com.google.firebase", name = "firebase-firestore-ktx" } # No version!// build.gradle.kts
dependencies {
implementation(platform(libs.firebase.bom)) // BOM provides versions
implementation(libs.firebase.auth.ktx) // Version from BOM
implementation(libs.firebase.firestore.ktx) // Version from BOM
}Key Rules:
- BOM entry: Must have
version.refor explicit version - Individual libraries: Must NOT have versions (BOM provides them)
- Library names: Must match what’s in the BOM (e.g.,
-ktxin BOM 33.x, no-ktxin 34.x) - Platform declaration: Must use
platform(libs.firebase.bom)
Related Documentation:
Troubleshooting
Error: Could not find com.google.firebase:firebase-X-ktx:.
Symptom:
Could not find com.google.firebase:firebase-analytics-ktx:.
^
Empty version string
Diagnosis:
- Check your BOM version:
grep firebase-bom gradle/libs.versions.tomlorgrep firebase-bom build.gradle.kts - Check your dependencies:
grep firebase-.*-ktx build.gradle.kts
If BOM >= 34.0.0 and using -ktx libraries:
Cause: BOM 34.x removed KTX libraries
Solutions:
- Option A: Downgrade BOM to 33.0.0 (immediate fix)
- Option B: Remove
-ktxsuffixes from all Firebase dependencies (migration required)
Error: Version Catalog Entry Not Found
Symptom:
> Could not find libs.firebase.auth.ktx
Diagnosis: Version catalog entry name doesn’t match what you’re referencing.
Solution:
Check gradle/libs.versions.toml:
[libraries]
firebase-auth-ktx = { ... } # Reference as: libs.firebase.auth.ktx
# ^ ^ dash dot dash dotGradle converts dashes in library names to dots in code.
Build Succeeds But Runtime Crashes
Symptom:
java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/firebase/auth/FirebaseAuthKtx;
Cause:
- Using BOM 34.x (non-KTX)
- Code imports KTX extension classes directly (rare, but possible)
Solution: Update imports to use main module classes:
- import com.google.firebase.auth.FirebaseAuthKtx
+ import com.google.firebase.auth.ktx.* // Extension functionsRecommendations
For Archery Apprentice Project
Current Status (as of 2025-11-18):
- Using Firebase BOM 33.0.0
- All dependencies use
-ktxsuffix - Version catalog NOT used for Firebase (hardcoded strings)
- Configuration stable and working
Recommended Next Steps:
Phase 1: Stay on BOM 33.0.0 (Current State)
- No immediate changes required
- Focus on feature development
- Monitor Firebase release notes for BOM 33.x end-of-life announcement
Phase 2: Plan Migration to BOM 34.x+ (Future Sprint)
When ready to migrate:
-
Create dedicated PR for Firebase migration
- Title:
deps: Migrate Firebase dependencies to non-KTX modules (BOM 34.x+) - Single-purpose PR, no other changes
- Title:
-
Update BOM version
33.0.0→34.6.0(or latest)
-
Remove all
-ktxsuffixes- Update
app/build.gradle.kts - Update
shared/build.gradle.kts(KMP module using GitLive) - Verify no KTX references in version catalog
- Update
-
Test thoroughly
- Run all instrumented tests
- Test Firebase Auth flows
- Test Firestore queries
- Test Analytics events
- Test Crashlytics reporting
-
Update documentation
- Note BOM version in README
- Document migration in CHANGELOG
- Update this vault entry if issues found
Phase 3: Add Version Catalog Support (Optional)
Once stable on BOM 34.x, consider migrating Firebase dependencies to version catalog:
- Centralized version management
- Type-safe dependency references
- Easier to update in future
External Resources
Official Firebase Documentation:
- Firebase BOM Release Notes - Check for latest BOM versions and breaking changes
- Firebase KTX Deprecation Announcement - July 2025 announcement
Gradle Documentation:
- Version Catalogs - Official Gradle docs on version catalogs
- BOM Support - How Gradle handles Bill of Materials
Related Project Documentation:
- PR #269 Debugging Session - Full debugging timeline
- Gradle Version Catalogs + BOM Integration - Gradle patterns
Community Resources:
- GitHub Issue #17117 - Version catalogs + BOMs discussion
- Stack Overflow: Search “firebase ktx deprecated” for latest community advice
Key Takeaways
- Firebase BOM 34.0.0+ removed all
-ktxlibraries in July 2025 - KTX APIs are still available in main modules (no code changes needed)
- Version catalog syntax is correct - problem was library availability in BOM
- Two valid strategies: Stay on BOM 33.x or migrate to 34.x+ (both work)
- This is a build configuration issue, not a code issue - application code unchanged
- Check external release notes when dependencies fail - tools aren’t always the problem
Status: Active guidance - BOM 33.0.0 in use, migration to 34.x+ planned for future sprint
Last Updated: 2025-11-18 Related PRs: #269 (Firebase BOM debugging) Week: 28 (iOS Firebase Integration + Dependency Updates)