Skip to content

Commit 27e135c

Browse files
authored
Merge branch 'master' into cramsan/storage_jvm
2 parents b632e19 + 74f2dbf commit 27e135c

File tree

128 files changed

+1079
-752
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

128 files changed

+1079
-752
lines changed

.github/FUNDING.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
github: [GitLiveApp]

.github/workflows/publish.yml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,13 @@ name: Publish
66
on:
77
release:
88
types: [ prereleased, released ]
9+
workflow_dispatch:
910

1011
env:
11-
sonatypeUsername: ${{ secrets.SONATYPEUSERNAME }}
12-
sonatypePassword: ${{ secrets.SONATYPEPASSWORD }}
13-
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.GPG_PRIVATE_KEY }}
14-
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.PASSPHRASE }}
12+
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPEUSERNAME }}
13+
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPEPASSWORD }}
14+
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.GPG_PRIVATE_KEY }}
15+
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.PASSPHRASE }}
1516

1617
jobs:
1718
build:
@@ -28,6 +29,9 @@ jobs:
2829
run: ./gradlew :updateVersions
2930
- name: Grant execute permission for gradlew
3031
run: chmod +x gradlew
32+
- uses: maxim-lobanov/setup-xcode@v1
33+
with:
34+
xcode-version: latest-stable
3135
- name: Publish Firebase Analytics
3236
run: ./gradlew :firebase-analytics:publish
3337
- name: Publish Firebase App
@@ -57,7 +61,7 @@ jobs:
5761
- name: Publish Firebase Crashlytics
5862
run: ./gradlew :firebase-crashlytics:publish
5963
documentation:
60-
runs-on: macos-13
64+
runs-on: macos-latest
6165
steps:
6266
- uses: actions/checkout@v4
6367
- name: Set up JDK
@@ -68,6 +72,9 @@ jobs:
6872
- uses: gradle/gradle-build-action@v3
6973
- name: Grant execute permission for gradlew
7074
run: chmod +x gradlew
75+
- uses: maxim-lobanov/setup-xcode@v1
76+
with:
77+
xcode-version: latest-stable
7178
- name: Generate documentation
7279
run: ./gradlew dokkaHtmlMultiModule
7380
- name: Uploading build folder

.github/workflows/pull_request.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
- name: run apiCheck
2323
run: ./gradlew apiCheck
2424
jobMatrixSetup:
25-
runs-on: ubuntu-latest
25+
runs-on: macos-latest
2626
outputs:
2727
emulator_jobs_matrix: ${{ steps.dataStep.outputs.emulator_jobs_matrix }}
2828
ios_test_jobs_matrix: ${{ steps.dataStep.outputs.ios_test_jobs_matrix }}
@@ -128,6 +128,9 @@ jobs:
128128
*/build/cocoapods
129129
*/build/classes
130130
key: cocoapods-cache-v2
131+
- uses: maxim-lobanov/setup-xcode@v1
132+
with:
133+
xcode-version: latest-stable
131134
- name: Setup test environment
132135
uses: ./.github/actions/setup_test_action
133136
- name: Set Artifact Name

.github/workflows/push.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ jobs:
1818
java-version: '17'
1919
- name: formatKotlin
2020
run: ./gradlew formatKotlin
21-
- uses: stefanzweifel/git-auto-commit-action@v5
21+
- uses: stefanzweifel/git-auto-commit-action@v6
2222
- name: lintKotlin
2323
run: ./gradlew lintKotlin

README.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<br/>
66
<br/>
77
The Firebase Kotlin SDK is a Kotlin-first SDK for Firebase. It's API is similar to the
8-
<a href="https://firebase.github.io/firebase-android-sdk/reference/kotlin/firebase-ktx/">Firebase Android SDK Kotlin Extensions</a>
8+
<a href="https://firebase.google.com/docs/reference/kotlin/packages">Firebase Android SDK Kotlin Extensions</a>
99
but also supports multiplatform projects, enabling you to use Firebase directly from your common source targeting
1010
<strong>iOS</strong>, <strong>Android</strong>, <strong>Desktop</strong> or <strong>Web</strong>, enabling the use of
1111
Firebase as a backend for <a href="https://www.jetbrains.com/lp/compose-multiplatform/">Compose Multiplatform</a>, for example.
@@ -16,17 +16,17 @@ The following libraries are available for the various Firebase products.
1616

1717
| Service or Product | Gradle Dependency | API Coverage |
1818
|---------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
19-
| [Analytics](https://firebase.google.com/docs/analytics) | [`dev.gitlive:firebase-analytics:2.1.0`](https://search.maven.org/artifact/dev.gitlive/firebase-analytics/2.1.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) |
20-
| [Authentication](https://firebase.google.com/docs/auth) | [`dev.gitlive:firebase-auth:2.1.0`](https://search.maven.org/artifact/dev.gitlive/firebase-auth/2.1.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) |
21-
| [Realtime Database](https://firebase.google.com/docs/database) | [`dev.gitlive:firebase-database:2.1.0`](https://search.maven.org/artifact/dev.gitlive/firebase-database/2.1.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) |
22-
| [Cloud Firestore](https://firebase.google.com/docs/firestore) | [`dev.gitlive:firebase-firestore:2.1.0`](https://search.maven.org/artifact/dev.gitlive/firebase-firestore/2.1.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) |
23-
| [Cloud Functions](https://firebase.google.com/docs/functions) | [`dev.gitlive:firebase-functions:2.1.0`](https://search.maven.org/artifact/dev.gitlive/firebase-functions/2.1.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) |
24-
| [Cloud Messaging](https://firebase.google.com/docs/cloud-messaging) | [`dev.gitlive:firebase-messaging:2.1.0`](https://search.maven.org/artifact/dev.gitlive/firebase-messaging/2.1.0/pom) | [![1%](https://img.shields.io/badge/-10%25-orange?style=flat-square)](/firebase-messaging/src/commonMain/kotlin/dev/gitlive/firebase/messaging/messaging.kt) |
25-
| [Cloud Storage](https://firebase.google.com/docs/storage) | [`dev.gitlive:firebase-storage:2.1.0`](https://search.maven.org/artifact/dev.gitlive/firebase-storage/2.1.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) |
26-
| [Installations](https://firebase.google.com/docs/projects/manage-installations) | [`dev.gitlive:firebase-installations:2.1.0`](https://search.maven.org/artifact/dev.gitlive/firebase-installations/2.1.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) |
27-
| [Remote Config](https://firebase.google.com/docs/remote-config) | [`dev.gitlive:firebase-config:2.1.0`](https://search.maven.org/artifact/dev.gitlive/firebase-config/2.1.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) |
28-
| [Performance](https://firebase.google.com/docs/perf-mon) | [`dev.gitlive:firebase-perf:2.1.0`](https://search.maven.org/artifact/dev.gitlive/firebase-perf/2.1.0/pom) | [![1%](https://img.shields.io/badge/-10%25-orange?style=flat-square)](/firebase-perf/src/commonMain/kotlin/dev/gitlive/firebase/perf/performance.kt) |
29-
| [Crashlytics](https://firebase.google.com/docs/crashlytics) | [`dev.gitlive:firebase-crashlytics:2.1.0`](https://search.maven.org/artifact/dev.gitlive/firebase-crashlytics/2.1.0/pom) | [![80%](https://img.shields.io/badge/-10%25-orange?style=flat-square)](/firebase-crashlytics/src/commonMain/kotlin/dev/gitlive/firebase/crashlytics/crashlytics.kt) |
19+
| [Analytics](https://firebase.google.com/docs/analytics) | [`dev.gitlive:firebase-analytics:2.2.0`](https://search.maven.org/artifact/dev.gitlive/firebase-analytics/2.2.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) |
20+
| [Authentication](https://firebase.google.com/docs/auth) | [`dev.gitlive:firebase-auth:2.2.0`](https://search.maven.org/artifact/dev.gitlive/firebase-auth/2.2.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) |
21+
| [Realtime Database](https://firebase.google.com/docs/database) | [`dev.gitlive:firebase-database:2.2.0`](https://search.maven.org/artifact/dev.gitlive/firebase-database/2.2.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) |
22+
| [Cloud Firestore](https://firebase.google.com/docs/firestore) | [`dev.gitlive:firebase-firestore:2.2.0`](https://search.maven.org/artifact/dev.gitlive/firebase-firestore/2.2.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) |
23+
| [Cloud Functions](https://firebase.google.com/docs/functions) | [`dev.gitlive:firebase-functions:2.2.0`](https://search.maven.org/artifact/dev.gitlive/firebase-functions/2.2.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) |
24+
| [Cloud Messaging](https://firebase.google.com/docs/cloud-messaging) | [`dev.gitlive:firebase-messaging:2.2.0`](https://search.maven.org/artifact/dev.gitlive/firebase-messaging/2.2.0/pom) | [![1%](https://img.shields.io/badge/-10%25-orange?style=flat-square)](/firebase-messaging/src/commonMain/kotlin/dev/gitlive/firebase/messaging/messaging.kt) |
25+
| [Cloud Storage](https://firebase.google.com/docs/storage) | [`dev.gitlive:firebase-storage:2.2.0`](https://search.maven.org/artifact/dev.gitlive/firebase-storage/2.2.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) |
26+
| [Installations](https://firebase.google.com/docs/projects/manage-installations) | [`dev.gitlive:firebase-installations:2.2.0`](https://search.maven.org/artifact/dev.gitlive/firebase-installations/2.2.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) |
27+
| [Remote Config](https://firebase.google.com/docs/remote-config) | [`dev.gitlive:firebase-config:2.2.0`](https://search.maven.org/artifact/dev.gitlive/firebase-config/2.2.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) |
28+
| [Performance](https://firebase.google.com/docs/perf-mon) | [`dev.gitlive:firebase-perf:2.2.0`](https://search.maven.org/artifact/dev.gitlive/firebase-perf/2.2.0/pom) | [![1%](https://img.shields.io/badge/-10%25-orange?style=flat-square)](/firebase-perf/src/commonMain/kotlin/dev/gitlive/firebase/perf/performance.kt) |
29+
| [Crashlytics](https://firebase.google.com/docs/crashlytics) | [`dev.gitlive:firebase-crashlytics:2.2.0`](https://search.maven.org/artifact/dev.gitlive/firebase-crashlytics/2.2.0/pom) | [![80%](https://img.shields.io/badge/-10%25-orange?style=flat-square)](/firebase-crashlytics/src/commonMain/kotlin/dev/gitlive/firebase/crashlytics/crashlytics.kt) |
3030

3131
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)
3232

build.gradle.kts

Lines changed: 1 addition & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ plugins {
1919
alias(libs.plugins.kotlinter) apply false
2020
alias(libs.plugins.kotlinx.binarycompatibilityvalidator)
2121
alias(libs.plugins.dokka)
22+
alias(libs.plugins.publish) apply false
2223
id("base")
2324
id("testOptionsConvention")
2425
}
@@ -187,69 +188,6 @@ subprojects {
187188

188189
apply(plugin = "maven-publish")
189190
apply(plugin = "signing")
190-
191-
val javadocJar: TaskProvider<Jar> by tasks.registering(Jar::class) {
192-
archiveClassifier.set("javadoc")
193-
}
194-
195-
configure<PublishingExtension> {
196-
197-
repositories {
198-
maven {
199-
url = uri("https://oss.sonatype.org/service/local/staging/deploy/maven2")
200-
201-
credentials {
202-
username = project.findProperty("sonatypeUsername") as String? ?: System.getenv("sonatypeUsername")
203-
password = project.findProperty("sonatypePassword") as String? ?: System.getenv("sonatypePassword")
204-
}
205-
}
206-
}
207-
208-
publications.all {
209-
this as MavenPublication
210-
artifact(javadocJar)
211-
212-
pom {
213-
name.set("firebase-kotlin-sdk")
214-
description.set("The Firebase Kotlin SDK is a Kotlin-first SDK for Firebase. It's API is similar to the Firebase Android SDK Kotlin Extensions but also supports multiplatform projects, enabling you to use Firebase directly from your common source targeting iOS, Android or JS.")
215-
url.set("https://github.com/GitLiveApp/firebase-kotlin-sdk")
216-
inceptionYear.set("2019")
217-
218-
scm {
219-
url.set("https://github.com/GitLiveApp/firebase-kotlin-sdk")
220-
connection.set("scm:git:https://github.com/GitLiveApp/firebase-kotlin-sdk.git")
221-
developerConnection.set("scm:git:https://github.com/GitLiveApp/firebase-kotlin-sdk.git")
222-
tag.set("HEAD")
223-
}
224-
225-
issueManagement {
226-
system.set("GitHub Issues")
227-
url.set("https://github.com/GitLiveApp/firebase-kotlin-sdk/issues")
228-
}
229-
230-
developers {
231-
developer {
232-
name.set("Nicholas Bransby-Williams")
233-
email.set("[email protected]")
234-
}
235-
}
236-
237-
licenses {
238-
license {
239-
name.set("The Apache Software License, Version 2.0")
240-
url.set("http://www.apache.org/licenses/LICENSE-2.0.txt")
241-
distribution.set("repo")
242-
comments.set("A business-friendly OSS license")
243-
}
244-
}
245-
}
246-
}
247-
248-
}
249-
250-
tasks.withType(AbstractPublishToMaven::class.java).configureEach {
251-
dependsOn(tasks.withType(Sign::class.java))
252-
}
253191
}
254192

255193
tasks.withType<com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask> {

convention-plugin-test-option/src/main/kotlin/EmulatorJobsMatrix.kt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,7 @@ class EmulatorJobsMatrix {
3636
(rootProject.property("${subProject.name}.skipIosTests") == "true").not()
3737
}.map { subProject ->
3838
when (val osArch = System.getProperty("os.arch")) {
39-
"x86", "i386", "ia-32", "i686" -> "${subProject.path}:iosX86Test"
40-
"x86_64", "amd64", "x64", "x86-64" -> "${subProject.path}:iosX64Test"
41-
"arm", "arm-v7", "armv7", "arm32",
4239
"arm64", "arm-v8", "aarch64" -> "${subProject.path}:iosSimulatorArm64Test"
43-
4440
else -> throw Error("Unexpected System.getProperty(\"os.arch\") = $osArch")
4541
}
4642
}.map { listOf("cleanTest", it) }

firebase-analytics/build.gradle.kts

Lines changed: 47 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1+
import org.gradle.kotlin.dsl.distribution
12
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
23
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
34
import org.jetbrains.kotlin.gradle.dsl.KotlinJvmCompilerOptions
45
import org.jetbrains.kotlin.gradle.plugin.KotlinSourceSetTree
6+
import kotlin.text.set
57

68
/*
79
* Copyright (c) 2023 GitLive Ltd. Use of this source code is governed by the Apache 2.0 license.
@@ -14,6 +16,7 @@ plugins {
1416
kotlin("native.cocoapods")
1517
kotlin("multiplatform")
1618
id("testOptionsConvention")
19+
alias(libs.plugins.publish)
1720
}
1821

1922
android {
@@ -77,7 +80,6 @@ kotlin {
7780

7881
if (supportIosTarget) {
7982
iosArm64()
80-
iosX64()
8183
iosSimulatorArm64()
8284
cocoapods {
8385
ios.deploymentTarget = libs.versions.ios.deploymentTarget.get()
@@ -161,9 +163,48 @@ if (project.property("firebase-analytics.skipJsTests") == "true") {
161163
}
162164
}
163165

164-
signing {
165-
val signingKey: String? by project
166-
val signingPassword: String? by project
167-
useInMemoryPgpKeys(signingKey, signingPassword)
168-
sign(publishing.publications)
166+
mavenPublishing {
167+
publishToMavenCentral(automaticRelease = true)
168+
signAllPublications()
169+
170+
coordinates(
171+
groupId = "dev.gitlive",
172+
artifactId = "firebase-analytics",
173+
version = project.property("firebase-analytics.version") as String
174+
)
175+
176+
pom {
177+
name.set("firebase-kotlin-sdk")
178+
description.set("The Firebase Kotlin SDK is a Kotlin-first SDK for Firebase. It's API is similar to the Firebase Android SDK Kotlin Extensions but also supports multiplatform projects, enabling you to use Firebase directly from your common source targeting iOS, Android or JS.")
179+
url.set("https://github.com/GitLiveApp/firebase-kotlin-sdk")
180+
inceptionYear.set("2019")
181+
182+
scm {
183+
url.set("https://github.com/GitLiveApp/firebase-kotlin-sdk")
184+
connection.set("scm:git:https://github.com/GitLiveApp/firebase-kotlin-sdk.git")
185+
developerConnection.set("scm:git:https://github.com/GitLiveApp/firebase-kotlin-sdk.git")
186+
tag.set("HEAD")
187+
}
188+
189+
issueManagement {
190+
system.set("GitHub Issues")
191+
url.set("https://github.com/GitLiveApp/firebase-kotlin-sdk/issues")
192+
}
193+
194+
developers {
195+
developer {
196+
name.set("Nicholas Bransby-Williams")
197+
email.set("[email protected]")
198+
}
199+
}
200+
201+
licenses {
202+
license {
203+
name.set("The Apache Software License, Version 2.0")
204+
url.set("http://www.apache.org/licenses/LICENSE-2.0.txt")
205+
distribution.set("repo")
206+
comments.set("A business-friendly OSS license")
207+
}
208+
}
209+
}
169210
}

firebase-analytics/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@gitlive/firebase-analytics",
3-
"version": "2.1.0",
3+
"version": "2.2.0",
44
"description": "Wrapper around firebase for usage in Kotlin Multiplatform projects",
55
"main": "firebase-analytics.js",
66
"scripts": {
@@ -23,7 +23,7 @@
2323
},
2424
"homepage": "https://github.com/GitLiveApp/firebase-kotlin-sdk",
2525
"dependencies": {
26-
"@gitlive/firebase-app": "2.1.0",
26+
"@gitlive/firebase-app": "2.2.0",
2727
"firebase": "9.19.1",
2828
"kotlin": "1.6.10",
2929
"kotlinx-coroutines-core": "1.6.1-native-mt"

0 commit comments

Comments
 (0)