Skip to content

Commit 30cc1f9

Browse files
authored
Removed carthage and added cocoapods plugin (#349)
1 parent 249cb19 commit 30cc1f9

File tree

70 files changed

+365
-848
lines changed

Some content is hidden

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

70 files changed

+365
-848
lines changed

.github/workflows/publish.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@ jobs:
2525
arguments: :updateVersions
2626
- name: Grant execute permission for gradlew
2727
run: chmod +x gradlew
28-
- name: Install Carthage
29-
run: brew install carthage
3028
- name: Publish Firebase App
3129
uses: eskatos/gradle-command-action@v1
3230
with:

.github/workflows/pull_request.yml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,26 @@ jobs:
1717

1818
steps:
1919
- uses: actions/checkout@v2
20-
- name: Gradle cache
21-
uses: gradle/gradle-build-action@v2
20+
- name: Cocoapods cache
21+
uses: actions/cache@v3
22+
id: cocoapods-cache
23+
with:
24+
path: |
25+
~/.cocoapods
26+
~/Library/Caches/CocoaPods
27+
*/build/cocoapods
28+
*/build/classes
29+
key: cocoapods-cache
2230
- name: Set up JDK
2331
uses: actions/setup-java@v2
2432
with:
2533
distribution: 'zulu'
2634
java-version: '11'
35+
cache: gradle
36+
- name: Gradle cache
37+
uses: gradle/gradle-build-action@v2
2738
- name: Grant execute permission for gradlew
2839
run: chmod +x gradlew
29-
- name: Install Carthage
30-
run: brew list carthage || brew install carthage
3140
- name: Install Firebase tools
3241
run: npm install -g firebase-tools
3342
- name: Start Firebase emulator

.idea/externalDependencies.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,18 @@ The Firebase Kotlin SDK is a Kotlin-first SDK for Firebase. It's API is similar
1010

1111
The following libraries are available for the various Firebase products.
1212

13-
| Service or Product | Gradle Dependency | API Coverage |
14-
|---------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
15-
| [Authentication](https://firebase.google.com/docs/auth) | [`dev.gitlive:firebase-auth:1.7.3`](https://search.maven.org/artifact/dev.gitlive/firebase-auth/1.7.3/pom) | [![80%](https://img.shields.io/badge/-80%25-green?style=flat-square)](/firebase-auth/src/commonMain/kotlin/dev/gitlive/firebase/auth/auth.kt) |
16-
| [Realtime Database](https://firebase.google.com/docs/database) | [`dev.gitlive:firebase-database:1.7.3`](https://search.maven.org/artifact/dev.gitlive/firebase-database/1.7.3/pom) | [![70%](https://img.shields.io/badge/-70%25-orange?style=flat-square)](/firebase-database/src/commonMain/kotlin/dev/gitlive/firebase/database/database.kt) |
17-
| [Cloud Firestore](https://firebase.google.com/docs/firestore) | [`dev.gitlive:firebase-firestore:1.7.3`](https://search.maven.org/artifact/dev.gitlive/firebase-firestore/1.7.3/pom) | [![60%](https://img.shields.io/badge/-60%25-orange?style=flat-square)](/firebase-firestore/src/commonMain/kotlin/dev/gitlive/firebase/firestore/firestore.kt) |
18-
| [Cloud Functions](https://firebase.google.com/docs/functions) | [`dev.gitlive:firebase-functions:1.7.3`](https://search.maven.org/artifact/dev.gitlive/firebase-functions/1.7.3/pom) | [![80%](https://img.shields.io/badge/-80%25-green?style=flat-square)](/firebase-functions/src/commonMain/kotlin/dev/gitlive/firebase/functions/functions.kt) |
19-
| [Cloud Messaging](https://firebase.google.com/docs/cloud-messaging) | [`dev.gitlive:firebase-messaging:1.7.3`](https://search.maven.org/artifact/dev.gitlive/firebase-messaging/1.7.3/pom) | ![0%](https://img.shields.io/badge/-0%25-lightgrey?style=flat-square) |
20-
| [Cloud Storage](https://firebase.google.com/docs/storage) | [`dev.gitlive:firebase-storage:1.7.3`](https://search.maven.org/artifact/dev.gitlive/firebase-storage/1.7.3/pom) | ![0%](https://img.shields.io/badge/-0%25-lightgrey?style=flat-square) |
21-
| [Installations](https://firebase.google.com/docs/projects/manage-installations) | [`dev.gitlive:firebase-installations:1.7.3`](https://search.maven.org/artifact/dev.gitlive/firebase-installations/1.7.3/pom) | [![90%](https://img.shields.io/badge/-90%25-green?style=flat-square)](/firebase-installations/src/commonMain/kotlin/dev/gitlive/firebase/installations/installations.kt) |
22-
| [Remote Config](https://firebase.google.com/docs/remote-config) | [`dev.gitlive:firebase-config:1.7.3`](https://search.maven.org/artifact/dev.gitlive/firebase-config/1.7.3/pom) | ![20%](https://img.shields.io/badge/-20%25-orange?style=flat-square) |
23-
| [Performance](https://firebase.google.com/docs/perf-mon) | [`dev.gitlive:firebase-perf:1.7.3`](https://search.maven.org/artifact/dev.gitlive/firebase-perf/1.7.3/pom) | ![60%](https://img.shields.io/badge/-60%25-orange?style=flat-square) |
24-
| [Crashlytics](https://firebase.google.com/docs/crashlytics) | [`dev.gitlive:firebase-crashlytics:1.7.3`](https://search.maven.org/artifact/dev.gitlive/firebase-crashlytics/1.7.3/pom) | ![80%](https://img.shields.io/badge/-80%25-green?style=flat-square) |
13+
| Service or Product | Gradle Dependency | API Coverage |
14+
|---------------------------------------------------------------------------------|:------------------------------------------------------------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
15+
| [Authentication](https://firebase.google.com/docs/auth) | [`dev.gitlive:firebase-auth:1.8.0`](https://search.maven.org/artifact/dev.gitlive/firebase-auth/1.8.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) |
16+
| [Realtime Database](https://firebase.google.com/docs/database) | [`dev.gitlive:firebase-database:1.8.0`](https://search.maven.org/artifact/dev.gitlive/firebase-database/1.8.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) |
17+
| [Cloud Firestore](https://firebase.google.com/docs/firestore) | [`dev.gitlive:firebase-firestore:1.8.0`](https://search.maven.org/artifact/dev.gitlive/firebase-firestore/1.8.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) |
18+
| [Cloud Functions](https://firebase.google.com/docs/functions) | [`dev.gitlive:firebase-functions:1.8.0`](https://search.maven.org/artifact/dev.gitlive/firebase-functions/1.8.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) |
19+
| [Cloud Messaging](https://firebase.google.com/docs/cloud-messaging) | [`dev.gitlive:firebase-messaging:1.8.0`](https://search.maven.org/artifact/dev.gitlive/firebase-messaging/1.8.0/pom) | ![0%](https://img.shields.io/badge/-0%25-lightgrey?style=flat-square) |
20+
| [Cloud Storage](https://firebase.google.com/docs/storage) | [`dev.gitlive:firebase-storage:1.8.0`](https://search.maven.org/artifact/dev.gitlive/firebase-storage/1.8.0/pom) | ![0%](https://img.shields.io/badge/-0%25-lightgrey?style=flat-square) |
21+
| [Installations](https://firebase.google.com/docs/projects/manage-installations) | [`dev.gitlive:firebase-installations:1.8.0`](https://search.maven.org/artifact/dev.gitlive/firebase-installations/1.8.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) |
22+
| [Remote Config](https://firebase.google.com/docs/remote-config) | [`dev.gitlive:firebase-config:1.8.0`](https://search.maven.org/artifact/dev.gitlive/firebase-config/1.8.0/pom) | ![20%](https://img.shields.io/badge/-20%25-orange?style=flat-square) |
23+
| [Performance](https://firebase.google.com/docs/perf-mon) | [`dev.gitlive:firebase-perf:1.8.0`](https://search.maven.org/artifact/dev.gitlive/firebase-perf/1.8.0/pom) | ![1%](https://img.shields.io/badge/-1%25-orange?style=flat-square) |
24+
| [Crashlytics](https://firebase.google.com/docs/crashlytics) | [`dev.gitlive:firebase-crashlytics:1.8.0`](https://search.maven.org/artifact/dev.gitlive/firebase-crashlytics/1.8.0/pom) | ![80%](https://img.shields.io/badge/-1%25-orange?style=flat-square) |
2525

2626

2727

@@ -69,8 +69,8 @@ The Firebase Kotlin SDK uses Kotlin serialization to read and write custom class
6969

7070
```groovy
7171
plugins {
72-
kotlin("multiplatform") version "1.6.10" // or kotlin("jvm") or any other kotlin plugin
73-
kotlin("plugin.serialization") version "1.6.10"
72+
kotlin("multiplatform") version "1.8.20" // or kotlin("jvm") or any other kotlin plugin
73+
kotlin("plugin.serialization") version "1.8.20"
7474
}
7575
```
7676

@@ -203,16 +203,16 @@ If you are building a Kotlin multiplatform library which will be consumed from J
203203

204204
```json
205205
"dependencies": {
206-
"@gitlive/firebase-auth": "1.7.3",
207-
"@gitlive/firebase-config": "1.7.3",
208-
"@gitlive/firebase-database": "1.7.3",
209-
"@gitlive/firebase-firestore": "1.7.3",
210-
"@gitlive/firebase-functions": "1.7.3",
211-
"@gitlive/firebase-installations": "1.7.3",
212-
"@gitlive/firebase-messaging": "1.7.3",
213-
"@gitlive/firebase-storage": "1.7.3"
214-
"@gitlive/firebase-perf": "1.7.3"
215-
"@gitlive/firebase-crashlytics": "1.7.3"
206+
"@gitlive/firebase-auth": "1.8.0",
207+
"@gitlive/firebase-config": "1.8.0",
208+
"@gitlive/firebase-database": "1.8.0",
209+
"@gitlive/firebase-firestore": "1.8.0",
210+
"@gitlive/firebase-functions": "1.8.0",
211+
"@gitlive/firebase-installations": "1.8.0",
212+
"@gitlive/firebase-messaging": "1.8.0",
213+
"@gitlive/firebase-storage": "1.8.0"
214+
"@gitlive/firebase-perf": "1.8.0"
215+
"@gitlive/firebase-crashlytics": "1.8.0"
216216
}
217217
```
218218

build.gradle.kts

Lines changed: 12 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,14 @@ import org.apache.tools.ant.taskdefs.condition.Os
22
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
33
import org.gradle.api.tasks.testing.logging.TestLogEvent
44

5+
repositories {
6+
google()
7+
mavenCentral()
8+
}
9+
510
plugins {
6-
kotlin("multiplatform") version "1.6.10" apply false
11+
kotlin("multiplatform") version "1.8.20" apply false
12+
kotlin("native.cocoapods") version "1.8.20" apply false
713
id("base")
814
id("com.github.ben-manes.versions") version "0.42.0"
915
}
@@ -19,6 +25,7 @@ buildscript {
1925
}
2026
dependencies {
2127
classpath("com.android.tools.build:gradle:7.2.2")
28+
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.20-RC")
2229
classpath("com.adarshr:gradle-test-logger-plugin:3.2.0")
2330
}
2431
}
@@ -54,24 +61,10 @@ subprojects {
5461
mavenCentral()
5562
}
5663

57-
rootProject.plugins.withType<org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootPlugin> {
58-
rootProject.the<org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootExtension>().nodeVersion = "16.0.0"
59-
}
60-
6164
tasks.withType<Sign>().configureEach {
6265
onlyIf { !project.gradle.startParameter.taskNames.contains("publishToMavenLocal") }
6366
}
6467

65-
tasks.whenTaskAdded {
66-
enabled = when(name) {
67-
"compileDebugUnitTestKotlinAndroid" -> false
68-
"compileReleaseUnitTestKotlinAndroid" -> false
69-
"testDebugUnitTest" -> false
70-
"testReleaseUnitTest" -> false
71-
else -> enabled
72-
}
73-
}
74-
7568
tasks {
7669

7770
val updateVersion by registering(Exec::class) {
@@ -161,36 +154,6 @@ subprojects {
161154
)
162155
}
163156
}
164-
165-
val carthageTasks = if (projectDir.resolve("src/nativeInterop/cinterop/Cartfile").exists()) { // skipping firebase-common module
166-
listOf("bootstrap", "update").map {
167-
task<Exec>("carthage${it.capitalize()}") {
168-
group = "carthage"
169-
executable = "carthage"
170-
args(
171-
it,
172-
"--project-directory", projectDir.resolve("src/nativeInterop/cinterop"),
173-
"--platform", "iOS"
174-
)
175-
}
176-
}
177-
} else emptyList()
178-
179-
if (Os.isFamily(Os.FAMILY_MAC)) {
180-
withType(org.jetbrains.kotlin.gradle.tasks.CInteropProcess::class) {
181-
if (carthageTasks.isNotEmpty()) {
182-
dependsOn("carthageBootstrap")
183-
}
184-
}
185-
}
186-
187-
create("carthageClean", Delete::class.java) {
188-
group = "carthage"
189-
delete(
190-
projectDir.resolve("src/nativeInterop/cinterop/Carthage"),
191-
projectDir.resolve("src/nativeInterop/cinterop/Cartfile.resolved")
192-
)
193-
}
194157
}
195158

196159
afterEvaluate {
@@ -199,17 +162,14 @@ subprojects {
199162
mkdir("$buildDir/node_module")
200163
}
201164

202-
tasks.named<Delete>("clean") {
203-
dependsOn("carthageClean")
204-
}
205-
206165
dependencies {
207-
"commonMainImplementation"("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.1-native-mt")
208-
"androidMainImplementation"("org.jetbrains.kotlinx:kotlinx-coroutines-play-services:1.6.1-native-mt")
166+
"commonMainImplementation"("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4")
167+
"androidMainImplementation"("org.jetbrains.kotlinx:kotlinx-coroutines-play-services:1.6.4")
209168
"androidMainImplementation"(platform("com.google.firebase:firebase-bom:29.3.0"))
210169
"commonTestImplementation"(kotlin("test-common"))
211170
"commonTestImplementation"(kotlin("test-annotations-common"))
212-
"commonTestImplementation"("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.1-native-mt")
171+
"commonTestImplementation"("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4")
172+
"commonTestImplementation"("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.6.4")
213173
if (this@afterEvaluate.name != "firebase-crashlytics") {
214174
"jsTestImplementation"(kotlin("test-js"))
215175
}

0 commit comments

Comments
 (0)