The definitions have been generated by Dukat and later refined a little by me. Each module of the original Firebase SDK has been split into a different publication to overcome the automatic injection of the Firebase SDK when importing it, more information here.
It is build with Kotlin 1.4.10 with both legacy and IR compiler and uses Gradle Metadata, so be sure to have Gradle Metadata enabled!
Those declarations have not been tested. Any PR is welcome!
To initialize an App use firebase.initializeApp()
then call the methods available on it.
To import in your Gradle project:
repositories {
maven("https://dl.bintray.com/lamba92/com.github.lamba92")
// or
maven("https://maven.pkg.github.com/lamba92/kotlinjs-firebase-declarations")
}
dependencies {
val kotlinJsFirebaseDeclarationsVersion: String by project
implementation("com.github.lamba92", "kotlinjs-firebase-declarations-analytics", kotlinJsFirebaseDeclarationsVersion)
implementation("com.github.lamba92", "kotlinjs-firebase-declarations-app", kotlinJsFirebaseDeclarationsVersion)
implementation("com.github.lamba92", "kotlinjs-firebase-declarations-auth", kotlinJsFirebaseDeclarationsVersion)
implementation("com.github.lamba92", "kotlinjs-firebase-declarations-database", kotlinJsFirebaseDeclarationsVersion)
implementation("com.github.lamba92", "kotlinjs-firebase-declarations-firestore", kotlinJsFirebaseDeclarationsVersion)
implementation("com.github.lamba92", "kotlinjs-firebase-declarations-functions", kotlinJsFirebaseDeclarationsVersion)
implementation("com.github.lamba92", "kotlinjs-firebase-declarations-messaging", kotlinJsFirebaseDeclarationsVersion)
implementation("com.github.lamba92", "kotlinjs-firebase-declarations-performance", kotlinJsFirebaseDeclarationsVersion)
implementation("com.github.lamba92", "kotlinjs-firebase-declarations-remoteconfig", kotlinJsFirebaseDeclarationsVersion)
implementation("com.github.lamba92", "kotlinjs-firebase-declarations-storage", kotlinJsFirebaseDeclarationsVersion)
}
Or if using the Kotlin configuration DSL:
kotlin {
sourceSets {
val main: KotlinSourceSets by getting {
val kotlinJsFirebaseDeclarationsVersion: String by project
implementation("com.github.lamba92:kotlinjs-firebase-declarations-analytics:$kotlinJsFirebaseDeclarationsVersion")
implementation("com.github.lamba92:kotlinjs-firebase-declarations-app:$kotlinJsFirebaseDeclarationsVersion")
implementation("com.github.lamba92:kotlinjs-firebase-declarations-auth:$kotlinJsFirebaseDeclarationsVersion")
implementation("com.github.lamba92:kotlinjs-firebase-declarations-database:$kotlinJsFirebaseDeclarationsVersion")
implementation("com.github.lamba92:kotlinjs-firebase-declarations-firestore:$kotlinJsFirebaseDeclarationsVersion")
implementation("com.github.lamba92:kotlinjs-firebase-declarations-functions:$kotlinJsFirebaseDeclarationsVersion")
implementation("com.github.lamba92:kotlinjs-firebase-declarations-messaging:$kotlinJsFirebaseDeclarationsVersion")
implementation("com.github.lamba92:kotlinjs-firebase-declarations-performance:$kotlinJsFirebaseDeclarationsVersion")
implementation("com.github.lamba92:kotlinjs-firebase-declarations-remoteconfig:$kotlinJsFirebaseDeclarationsVersion")
implementation("com.github.lamba92:kotlinjs-firebase-declarations-storage:$kotlinJsFirebaseDeclarationsVersion")
}
}
}