B Bubbl Docs

Gradle Setup

This file explains every dependency and plugin you need, plus why it exists.

Step 1: Ensure mavenCentral() is enabled

File: settings.gradle.kts

dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS)
    repositories {
        mavenLocal() // optional for local SDK testing
        google()
        mavenCentral()
    }
}

Local SDK Workflow

If Maven Central indexing is delayed, publish the Android SDK locally:

cd sdk/bubbl-android-sdk-standalone
./gradlew :sdk:publishToMavenLocal

Step 2: Add Google Services plugin

File: app/build.gradle.kts

plugins {
    id("com.android.application")
    id("org.jetbrains.kotlin.android")
    id("com.google.gms.google-services")
}

Google Services Plugin

The Google Services plugin reads google-services.json and generates resources used by Firebase.

Step 3: Add Bubbl + Firebase dependencies

File: app/build.gradle.kts

dependencies {
    // Firebase BOM keeps all Firebase libs on compatible versions
    implementation(platform("com.google.firebase:firebase-bom:33.3.0"))

    // FCM for push notifications
    implementation("com.google.firebase:firebase-messaging-ktx")

    // Bubbl SDK
    implementation("tech.bubbl.sdk:bubbl-sdk:2.3.7")

    // Required: location + background work
    implementation("com.google.android.gms:play-services-location:21.2.0")
    implementation("androidx.work:work-runtime-ktx:2.10.0")
}

Why each line exists

  • firebase-bom: prevents version conflicts between Firebase libraries.
  • firebase-messaging-ktx: receives Bubbl push notifications.
  • bubbl-sdk: the SDK itself.
  • play-services-location: gets last known location and handles background location updates.
  • work-runtime-ktx: schedules background refresh jobs.