Skip to content

Commit

Permalink
Track master and update to Kotlin 1.9.20
Browse files Browse the repository at this point in the history
  • Loading branch information
Daeda88 committed Nov 14, 2023
1 parent 41e9a28 commit ccb5561
Show file tree
Hide file tree
Showing 40 changed files with 403 additions and 279 deletions.
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@ The following libraries are available for the various Firebase products.

| Service or Product | Gradle Dependency | API Coverage |
|---------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Authentication](https://firebase.google.com/docs/auth) | [`dev.gitlive:firebase-auth:1.10.0`](https://search.maven.org/artifact/dev.gitlive/firebase-auth/1.10.0/pom) | [![80%](https://img.shields.io/badge/-80%25-green?style=flat-square)](/firebase-auth/src/commonMain/kotlin/dev/gitlive/firebase/auth/auth.kt) |
| [Realtime Database](https://firebase.google.com/docs/database) | [`dev.gitlive:firebase-database:1.10.0`](https://search.maven.org/artifact/dev.gitlive/firebase-database/1.10.0/pom) | [![70%](https://img.shields.io/badge/-70%25-orange?style=flat-square)](/firebase-database/src/commonMain/kotlin/dev/gitlive/firebase/database/database.kt) |
| [Cloud Firestore](https://firebase.google.com/docs/firestore) | [`dev.gitlive:firebase-firestore:1.10.0`](https://search.maven.org/artifact/dev.gitlive/firebase-firestore/1.10.0/pom) | [![60%](https://img.shields.io/badge/-60%25-orange?style=flat-square)](/firebase-firestore/src/commonMain/kotlin/dev/gitlive/firebase/firestore/firestore.kt) |
| [Cloud Functions](https://firebase.google.com/docs/functions) | [`dev.gitlive:firebase-functions:1.10.0`](https://search.maven.org/artifact/dev.gitlive/firebase-functions/1.10.0/pom) | [![80%](https://img.shields.io/badge/-80%25-green?style=flat-square)](/firebase-functions/src/commonMain/kotlin/dev/gitlive/firebase/functions/functions.kt) |
| [Cloud Messaging](https://firebase.google.com/docs/cloud-messaging) | [`dev.gitlive:firebase-messaging:1.10.0`](https://search.maven.org/artifact/dev.gitlive/firebase-messaging/1.10.0/pom) | ![0%](https://img.shields.io/badge/-0%25-lightgrey?style=flat-square) |
| [Cloud Storage](https://firebase.google.com/docs/storage) | [`dev.gitlive:firebase-storage:1.10.0`](https://search.maven.org/artifact/dev.gitlive/firebase-storage/1.10.0/pom) | [![40%](https://img.shields.io/badge/-40%25-orange?style=flat-square)](/firebase-storage/src/commonMain/kotlin/dev/gitlive/firebase/storage/storage.kt) |
| [Installations](https://firebase.google.com/docs/projects/manage-installations) | [`dev.gitlive:firebase-installations:1.10.0`](https://search.maven.org/artifact/dev.gitlive/firebase-installations/1.10.0/pom) | [![90%](https://img.shields.io/badge/-90%25-green?style=flat-square)](/firebase-installations/src/commonMain/kotlin/dev/gitlive/firebase/installations/installations.kt) |
| [Remote Config](https://firebase.google.com/docs/remote-config) | [`dev.gitlive:firebase-config:1.10.0`](https://search.maven.org/artifact/dev.gitlive/firebase-config/1.10.0/pom) | [![20%](https://img.shields.io/badge/-20%25-orange?style=flat-square)](/firebase-config/src/commonMain/kotlin/dev/gitlive/firebase/remoteconfig/FirebaseRemoteConfig.kt) |
| [Performance](https://firebase.google.com/docs/perf-mon) | [`dev.gitlive:firebase-perf:1.10.0`](https://search.maven.org/artifact/dev.gitlive/firebase-perf/1.10.0/pom) | [![1%](https://img.shields.io/badge/-1%25-orange?style=flat-square)](/firebase-perf/src/commonMain/kotlin/dev/gitlive/firebase/perf/performance.kt) |
| [Crashlytics](https://firebase.google.com/docs/crashlytics) | [`dev.gitlive:firebase-crashlytics:1.10.0`](https://search.maven.org/artifact/dev.gitlive/firebase-crashlytics/1.10.0/pom) | [![80%](https://img.shields.io/badge/-1%25-orange?style=flat-square)](/firebase-crashlytics/src/commonMain/kotlin/dev/gitlive/firebase/crashlytics/crashlytics.kt) |
| [Authentication](https://firebase.google.com/docs/auth) | [`dev.gitlive:firebase-auth:1.10.4`](https://search.maven.org/artifact/dev.gitlive/firebase-auth/1.10.4/pom) | [![80%](https://img.shields.io/badge/-80%25-green?style=flat-square)](/firebase-auth/src/commonMain/kotlin/dev/gitlive/firebase/auth/auth.kt) |
| [Realtime Database](https://firebase.google.com/docs/database) | [`dev.gitlive:firebase-database:1.10.4`](https://search.maven.org/artifact/dev.gitlive/firebase-database/1.10.4/pom) | [![70%](https://img.shields.io/badge/-70%25-orange?style=flat-square)](/firebase-database/src/commonMain/kotlin/dev/gitlive/firebase/database/database.kt) |
| [Cloud Firestore](https://firebase.google.com/docs/firestore) | [`dev.gitlive:firebase-firestore:1.10.4`](https://search.maven.org/artifact/dev.gitlive/firebase-firestore/1.10.4/pom) | [![60%](https://img.shields.io/badge/-60%25-orange?style=flat-square)](/firebase-firestore/src/commonMain/kotlin/dev/gitlive/firebase/firestore/firestore.kt) |
| [Cloud Functions](https://firebase.google.com/docs/functions) | [`dev.gitlive:firebase-functions:1.10.4`](https://search.maven.org/artifact/dev.gitlive/firebase-functions/1.10.4/pom) | [![80%](https://img.shields.io/badge/-80%25-green?style=flat-square)](/firebase-functions/src/commonMain/kotlin/dev/gitlive/firebase/functions/functions.kt) |
| [Cloud Messaging](https://firebase.google.com/docs/cloud-messaging) | [`dev.gitlive:firebase-messaging:1.10.4`](https://search.maven.org/artifact/dev.gitlive/firebase-messaging/1.10.4/pom) | ![0%](https://img.shields.io/badge/-0%25-lightgrey?style=flat-square) |
| [Cloud Storage](https://firebase.google.com/docs/storage) | [`dev.gitlive:firebase-storage:1.10.4`](https://search.maven.org/artifact/dev.gitlive/firebase-storage/1.10.4/pom) | [![40%](https://img.shields.io/badge/-40%25-orange?style=flat-square)](/firebase-storage/src/commonMain/kotlin/dev/gitlive/firebase/storage/storage.kt) |
| [Installations](https://firebase.google.com/docs/projects/manage-installations) | [`dev.gitlive:firebase-installations:1.10.4`](https://search.maven.org/artifact/dev.gitlive/firebase-installations/1.10.4/pom) | [![90%](https://img.shields.io/badge/-90%25-green?style=flat-square)](/firebase-installations/src/commonMain/kotlin/dev/gitlive/firebase/installations/installations.kt) |
| [Remote Config](https://firebase.google.com/docs/remote-config) | [`dev.gitlive:firebase-config:1.10.4`](https://search.maven.org/artifact/dev.gitlive/firebase-config/1.10.4/pom) | [![20%](https://img.shields.io/badge/-20%25-orange?style=flat-square)](/firebase-config/src/commonMain/kotlin/dev/gitlive/firebase/remoteconfig/FirebaseRemoteConfig.kt) |
| [Performance](https://firebase.google.com/docs/perf-mon) | [`dev.gitlive:firebase-perf:1.10.4`](https://search.maven.org/artifact/dev.gitlive/firebase-perf/1.10.4/pom) | [![1%](https://img.shields.io/badge/-1%25-orange?style=flat-square)](/firebase-perf/src/commonMain/kotlin/dev/gitlive/firebase/perf/performance.kt) |
| [Crashlytics](https://firebase.google.com/docs/crashlytics) | [`dev.gitlive:firebase-crashlytics:1.10.4`](https://search.maven.org/artifact/dev.gitlive/firebase-crashlytics/1.10.4/pom) | [![80%](https://img.shields.io/badge/-1%25-orange?style=flat-square)](/firebase-crashlytics/src/commonMain/kotlin/dev/gitlive/firebase/crashlytics/crashlytics.kt) |

Is the Firebase library or API you need missing? [Create an issue](https://github.com/GitLiveApp/firebase-kotlin-sdk/issues/new?labels=API+coverage&template=increase-api-coverage.md&title=Add+%5Bclass+name%5D.%5Bfunction+name%5D+to+%5Blibrary+name%5D+for+%5Bplatform+names%5D) to request additional API coverage or be awesome and [submit a PR](https://github.com/GitLiveApp/firebase-kotlin-sdk/fork)

Expand Down
10 changes: 7 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
import org.gradle.api.tasks.testing.logging.TestLogEvent
import org.jetbrains.kotlin.gradle.tasks.KotlinCompilationTask

repositories {
google()
Expand Down Expand Up @@ -51,8 +52,6 @@ tasks {

subprojects {

group = "dev.gitlive"

apply(plugin = "com.adarshr.test-logger")

repositories {
Expand Down Expand Up @@ -118,7 +117,7 @@ subprojects {
"commonTestImplementation"("org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutinesVersion")
"commonTestImplementation"("org.jetbrains.kotlinx:kotlinx-coroutines-test:$coroutinesVersion")
if (this@afterEvaluate.name != "firebase-crashlytics") {
"jvmMainApi"("dev.gitlive:firebase-java-sdk:0.1.1")
"jvmMainApi"("dev.gitlive:firebase-java-sdk:0.1.2")
"jvmMainApi"("org.jetbrains.kotlinx:kotlinx-coroutines-play-services:$coroutinesVersion") {
exclude("com.google.android.gms")
}
Expand Down Expand Up @@ -149,6 +148,7 @@ subprojects {
repositories {
maven {
url = uri("https://oss.sonatype.org/service/local/staging/deploy/maven2")

credentials {
username = project.findProperty("sonatypeUsername") as String? ?: System.getenv("sonatypeUsername")
password = project.findProperty("sonatypePassword") as String? ?: System.getenv("sonatypePassword")
Expand Down Expand Up @@ -197,6 +197,10 @@ subprojects {
}

}

tasks.withType(AbstractPublishToMaven::class.java).configureEach {
dependsOn(tasks.withType(Sign::class.java))
}
}

tasks.withType<com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask> {
Expand Down
35 changes: 18 additions & 17 deletions firebase-app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import org.jetbrains.kotlin.gradle.dsl.KotlinJvmOptions
import org.jetbrains.kotlin.gradle.plugin.KotlinSourceSetTree

/*
* Copyright (c) 2020 GitLive Ltd. Use of this source code is governed by the Apache 2.0 license.
*/
Expand Down Expand Up @@ -46,7 +49,16 @@ val supportIosTarget = project.property("skipIosTarget") != "true"

kotlin {

targets.configureEach {
compilations.configureEach {
kotlinOptions.freeCompilerArgs += "-Xexpect-actual-classes"
}
}

@Suppress("OPT_IN_USAGE")
androidTarget {
instrumentedTestVariant.sourceSetTree.set(KotlinSourceSetTree.test)
unitTestVariant.sourceSetTree.set(KotlinSourceSetTree.test)
publishAllLibraryVariants()
compilations.configureEach {
kotlinOptions {
Expand All @@ -64,7 +76,8 @@ kotlin {
}

if (supportIosTarget) {
ios()
iosArm64()
iosX64()
iosSimulatorArm64()

cocoapods {
Expand Down Expand Up @@ -109,6 +122,9 @@ kotlin {
this.apiVersion = apiVersion
this.languageVersion = languageVersion
progressiveMode = true
if (name.lowercase().contains("ios")) {
optIn("kotlinx.cinterop.ExperimentalForeignApi")
}
}
}

Expand All @@ -118,7 +134,7 @@ kotlin {
}
}

val commonTest by getting {
getByName("commonTest") {
dependencies {
implementation(project(":test-utils"))
}
Expand All @@ -130,24 +146,9 @@ kotlin {
}
}

getByName("androidInstrumentedTest") {
dependencies {
dependsOn(commonTest)
}
}

getByName("jvmMain") {
kotlin.srcDir("src/androidMain/kotlin")
}

if (supportIosTarget) {
val iosMain by getting
val iosSimulatorArm64Main by getting
iosSimulatorArm64Main.dependsOn(iosMain)
val iosTest by sourceSets.getting
val iosSimulatorArm64Test by getting
iosSimulatorArm64Test.dependsOn(iosTest)
}
}
}

Expand Down
4 changes: 2 additions & 2 deletions firebase-app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@gitlive/firebase-app",
"version": "1.10.1",
"version": "1.10.4",
"description": "Wrapper around firebase for usage in Kotlin Multiplatform projects",
"main": "firebase-app.js",
"scripts": {
Expand All @@ -23,7 +23,7 @@
},
"homepage": "https://github.com/GitLiveApp/firebase-kotlin-sdk",
"dependencies": {
"@gitlive/firebase-common": "1.10.1",
"@gitlive/firebase-common": "1.10.4",
"firebase": "9.19.1",
"kotlin": "1.8.20",
"kotlinx-coroutines-core": "1.6.4"
Expand Down
31 changes: 14 additions & 17 deletions firebase-auth/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import org.jetbrains.kotlin.gradle.plugin.KotlinSourceSetTree

/*
* Copyright (c) 2020 GitLive Ltd. Use of this source code is governed by the Apache 2.0 license.
*/
Expand Down Expand Up @@ -60,7 +62,16 @@ val supportIosTarget = project.property("skipIosTarget") != "true"

kotlin {

targets.configureEach {
compilations.configureEach {
kotlinOptions.freeCompilerArgs += "-Xexpect-actual-classes"
}
}

@Suppress("OPT_IN_USAGE")
androidTarget {
instrumentedTestVariant.sourceSetTree.set(KotlinSourceSetTree.test)
unitTestVariant.sourceSetTree.set(KotlinSourceSetTree.test)
publishAllLibraryVariants()
compilations.configureEach {
kotlinOptions {
Expand All @@ -70,7 +81,8 @@ kotlin {
}

if (supportIosTarget) {
ios()
iosArm64()
iosX64()
iosSimulatorArm64()
cocoapods {
ios.deploymentTarget = "11.0"
Expand Down Expand Up @@ -137,7 +149,7 @@ kotlin {
}
}

val commonTest by getting {
getByName("commonTest") {
dependencies {
implementation(project(":test-utils"))
}
Expand All @@ -148,21 +160,6 @@ kotlin {
api("com.google.firebase:firebase-auth-ktx")
}
}

getByName("androidInstrumentedTest") {
dependencies {
dependsOn(commonTest)
}
}

if (supportIosTarget) {
val iosMain by getting
val iosSimulatorArm64Main by getting
iosSimulatorArm64Main.dependsOn(iosMain)
val iosTest by sourceSets.getting
val iosSimulatorArm64Test by getting
iosSimulatorArm64Test.dependsOn(iosTest)
}
}
}

Expand Down
4 changes: 2 additions & 2 deletions firebase-auth/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@gitlive/firebase-auth",
"version": "1.10.1",
"version": "1.10.4",
"description": "Wrapper around firebase for usage in Kotlin Multiplatform projects",
"main": "firebase-auth.js",
"scripts": {
Expand All @@ -23,7 +23,7 @@
},
"homepage": "https://github.com/GitLiveApp/firebase-kotlin-sdk",
"dependencies": {
"@gitlive/firebase-app": "1.10.1",
"@gitlive/firebase-app": "1.10.4",
"firebase": "9.19.1",
"kotlin": "1.8.20",
"kotlinx-coroutines-core": "1.6.4"
Expand Down
33 changes: 15 additions & 18 deletions firebase-common/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import org.jetbrains.kotlin.gradle.plugin.KotlinSourceSetTree

/*
* Copyright (c) 2020 GitLive Ltd. Use of this source code is governed by the Apache 2.0 license.
*/
Expand Down Expand Up @@ -44,7 +46,16 @@ android {

kotlin {

targets.configureEach {
compilations.configureEach {
kotlinOptions.freeCompilerArgs += "-Xexpect-actual-classes"
}
}

@Suppress("OPT_IN_USAGE")
androidTarget {
instrumentedTestVariant.sourceSetTree.set(KotlinSourceSetTree.test)
unitTestVariant.sourceSetTree.set(KotlinSourceSetTree.test)
publishAllLibraryVariants()
compilations.configureEach {
kotlinOptions {
Expand All @@ -69,7 +80,8 @@ kotlin {
val supportIosTarget = project.property("skipIosTarget") != "true"

if (supportIosTarget) {
ios()
iosArm64()
iosX64()
iosSimulatorArm64()
}

Expand Down Expand Up @@ -117,7 +129,7 @@ kotlin {
}
}

val commonTest by getting {
getByName("commonTest") {
dependencies {
implementation(project(":test-utils"))
}
Expand All @@ -129,21 +141,6 @@ kotlin {
}
}

getByName("androidInstrumentedTest") {
dependencies {
dependsOn(commonTest)
}
}

if (supportIosTarget) {
val iosMain by getting
val iosSimulatorArm64Main by getting
iosSimulatorArm64Main.dependsOn(iosMain)
val iosTest by sourceSets.getting
val iosSimulatorArm64Test by getting
iosSimulatorArm64Test.dependsOn(iosTest)
}

getByName("jsMain") {
dependencies {
api(npm("firebase", "10.4.0"))
Expand All @@ -154,7 +151,7 @@ kotlin {
kotlin.srcDir("src/androidMain/kotlin")
}

val jvmTest by getting {
getByName("jvmTest") {
dependencies {
implementation(kotlin("test-junit"))
}
Expand Down
2 changes: 1 addition & 1 deletion firebase-common/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@gitlive/firebase-common",
"version": "1.10.1",
"version": "1.10.4",
"description": "Wrapper around firebase for usage in Kotlin Multiplatform projects",
"main": "firebase-common.js",
"scripts": {
Expand Down
31 changes: 14 additions & 17 deletions firebase-config/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import org.jetbrains.kotlin.gradle.plugin.KotlinSourceSetTree

/*
* Copyright (c) 2020 GitLive Ltd. Use of this source code is governed by the Apache 2.0 license.
*/
Expand Down Expand Up @@ -60,7 +62,16 @@ val supportIosTarget = project.property("skipIosTarget") != "true"

kotlin {

targets.configureEach {
compilations.configureEach {
kotlinOptions.freeCompilerArgs += "-Xexpect-actual-classes"
}
}

@Suppress("OPT_IN_USAGE")
androidTarget {
instrumentedTestVariant.sourceSetTree.set(KotlinSourceSetTree.test)
unitTestVariant.sourceSetTree.set(KotlinSourceSetTree.test)
publishAllLibraryVariants()
compilations.configureEach {
kotlinOptions {
Expand All @@ -83,7 +94,8 @@ kotlin {
}

if (supportIosTarget) {
ios()
iosArm64()
iosX64()
iosSimulatorArm64()
cocoapods {
ios.deploymentTarget = "11.0"
Expand Down Expand Up @@ -132,7 +144,7 @@ kotlin {
}
}

val commonTest by getting {
getByName("commonTest") {
dependencies {
implementation(project(":test-utils"))
}
Expand All @@ -144,24 +156,9 @@ kotlin {
}
}

getByName("androidInstrumentedTest") {
dependencies {
dependsOn(commonTest)
}
}

getByName("jvmMain") {
kotlin.srcDir("src/androidMain/kotlin")
}

if (supportIosTarget) {
val iosMain by getting
val iosSimulatorArm64Main by getting
iosSimulatorArm64Main.dependsOn(iosMain)
val iosTest by sourceSets.getting
val iosSimulatorArm64Test by getting
iosSimulatorArm64Test.dependsOn(iosTest)
}
}
}

Expand Down
Loading

0 comments on commit ccb5561

Please sign in to comment.