Skip to content

updated kotlin & dependencies, using Firebase Android BoM #201

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Aug 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
- name: Set up JDK
uses: actions/setup-java@v2
with:
java-version: 1.8
distribution: 'zulu'
java-version: '11'
- name: Setup versions
uses: eskatos/gradle-command-action@v1
with:
Expand Down
91 changes: 46 additions & 45 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,48 +13,49 @@ jobs:
runs-on: macos-latest

steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Install Carthage
run: brew list carthage || brew install carthage
- name: Install Firebase tools
run: npm install -g firebase-tools
- name: Start Firebase emulator
run: "firebase emulators:start --config=./test/firebase.json &"
- name: Assemble
run: ./gradlew assemble
- name: Run JS Tests
run: ./gradlew cleanTest jsTest
- name: Upload JS test artifact
uses: actions/upload-artifact@v2
if: failure()
with:
name: "JS Test Report HTML"
path: "firebase-firestore/build/reports/tests/jsTest/"
- name: Run iOS Tests
run: ./gradlew cleanTest iosX64Test
- name: Upload iOS test artifact
uses: actions/upload-artifact@v2
if: failure()
with:
name: "iOS Test Report HTML"
path: "firebase-firestore/build/reports/tests/iosTest/"
- name: Run Android Instrumented Tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 29
target: google_apis
arch: x86_64
profile: Nexus 6
script: ./gradlew connectedAndroidTest
- name: Upload Android test artifact
uses: actions/upload-artifact@v2
if: failure()
with:
name: "Android Test Report HTML"
path: "firebase-firestore/build/reports/tests/androidTests/"
- uses: actions/checkout@v2
- name: Set up JDK
uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: '11'
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Install Carthage
run: brew list carthage || brew install carthage
- name: Install Firebase tools
run: npm install -g firebase-tools
- name: Start Firebase emulator
run: "firebase emulators:start --config=./test/firebase.json &"
- name: Assemble
run: ./gradlew assemble
- name: Run JS Tests
run: ./gradlew cleanTest jsTest
- name: Upload JS test artifact
uses: actions/upload-artifact@v2
if: failure()
with:
name: "JS Test Report HTML"
path: "firebase-firestore/build/reports/tests/jsTest/"
- name: Run iOS Tests
run: ./gradlew cleanTest iosX64Test
- name: Upload iOS test artifact
uses: actions/upload-artifact@v2
if: failure()
with:
name: "iOS Test Report HTML"
path: "firebase-firestore/build/reports/tests/iosTest/"
- name: Run Android Instrumented Tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 29
target: google_apis
arch: x86_64
profile: Nexus 6
script: ./gradlew connectedAndroidTest
- name: Upload Android test artifact
uses: actions/upload-artifact@v2
if: failure()
with:
name: "Android Test Report HTML"
path: "firebase-firestore/build/reports/tests/androidTests/"
19 changes: 9 additions & 10 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import org.gradle.api.tasks.testing.logging.TestExceptionFormat
import org.gradle.api.tasks.testing.logging.TestLogEvent

plugins {
kotlin("multiplatform") version "1.5.10" apply false
kotlin("multiplatform") version "1.5.21" apply false
id("base")
}

Expand All @@ -18,7 +18,7 @@ buildscript {
}
}
dependencies {
classpath("com.android.tools.build:gradle:4.2.1")
classpath("com.android.tools.build:gradle:7.0.0")
classpath("com.adarshr:gradle-test-logger-plugin:2.1.1")
}
}
Expand Down Expand Up @@ -207,19 +207,18 @@ subprojects {
}

dependencies {
"commonMainImplementation"(kotlin("stdlib-common"))
"commonMainImplementation"("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.0")
"jsMainImplementation"(kotlin("stdlib-js"))
"androidMainImplementation"("org.jetbrains.kotlinx:kotlinx-coroutines-play-services:1.5.0")
"commonMainImplementation"("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.1")
"androidMainImplementation"("org.jetbrains.kotlinx:kotlinx-coroutines-play-services:1.5.1")
"androidMainImplementation"(platform("com.google.firebase:firebase-bom:28.3.1"))
"commonTestImplementation"(kotlin("test-common"))
"commonTestImplementation"(kotlin("test-annotations-common"))
"commonTestImplementation"("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.0")
"commonTestImplementation"("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.1")
"jsTestImplementation"(kotlin("test-js"))
"androidAndroidTestImplementation"(kotlin("test-junit"))
"androidAndroidTestImplementation"("junit:junit:4.13.2")
"androidAndroidTestImplementation"("androidx.test:core:1.3.0")
"androidAndroidTestImplementation"("androidx.test.ext:junit:1.1.2")
"androidAndroidTestImplementation"("androidx.test:runner:1.3.0")
"androidAndroidTestImplementation"("androidx.test:core:1.4.0")
"androidAndroidTestImplementation"("androidx.test.ext:junit:1.1.3")
"androidAndroidTestImplementation"("androidx.test:runner:1.4.0")
}
}

Expand Down
16 changes: 8 additions & 8 deletions firebase-app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ repositories {
}

android {
compileSdkVersion(property("targetSdkVersion") as Int)
compileSdk = property("targetSdkVersion") as Int
defaultConfig {
minSdkVersion(property("minSdkVersion") as Int)
targetSdkVersion(property("targetSdkVersion") as Int)
minSdk = property("minSdkVersion") as Int
targetSdk = property("targetSdkVersion") as Int
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
sourceSets {
Expand All @@ -35,11 +35,11 @@ android {
}
}
packagingOptions {
pickFirst("META-INF/kotlinx-serialization-core.kotlin_module")
pickFirst("META-INF/AL2.0")
pickFirst("META-INF/LGPL2.1")
resources.pickFirsts.add("META-INF/kotlinx-serialization-core.kotlin_module")
resources.pickFirsts.add("META-INF/AL2.0")
resources.pickFirsts.add("META-INF/LGPL2.1")
}
lintOptions {
lint {
isAbortOnError = false
}
}
Expand Down Expand Up @@ -127,7 +127,7 @@ kotlin {

val androidMain by getting {
dependencies {
api("com.google.firebase:firebase-common:20.0.0")
api("com.google.firebase:firebase-common-ktx")
}
}

Expand Down
6 changes: 3 additions & 3 deletions firebase-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
"homepage": "https://github.com/GitLiveApp/firebase-kotlin-sdk",
"dependencies": {
"@gitlive/firebase-common": "1.4.1",
"firebase": "8.6.7",
"kotlin": "1.5.10",
"kotlinx-coroutines-core": "1.5.0"
"firebase": "8.8.1",
"kotlin": "1.5.21",
"kotlinx-coroutines-core": "1.5.1"
}
}
2 changes: 1 addition & 1 deletion firebase-app/src/nativeInterop/cinterop/Cartfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseAnalyticsBinary.json" == 8.2.0
binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseAnalyticsBinary.json" == 8.5.0
16 changes: 8 additions & 8 deletions firebase-auth/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ plugins {
//}

android {
compileSdkVersion(property("targetSdkVersion") as Int)
compileSdk = property("targetSdkVersion") as Int
defaultConfig {
minSdkVersion(property("minSdkVersion") as Int)
targetSdkVersion(property("targetSdkVersion") as Int)
minSdk = property("minSdkVersion") as Int
targetSdk = property("targetSdkVersion") as Int
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
sourceSets {
Expand All @@ -45,11 +45,11 @@ android {
}
}
packagingOptions {
pickFirst("META-INF/kotlinx-serialization-core.kotlin_module")
pickFirst("META-INF/AL2.0")
pickFirst("META-INF/LGPL2.1")
resources.pickFirsts.add("META-INF/kotlinx-serialization-core.kotlin_module")
resources.pickFirsts.add("META-INF/AL2.0")
resources.pickFirsts.add("META-INF/LGPL2.1")
}
lintOptions {
lint {
isAbortOnError = false
}
}
Expand Down Expand Up @@ -161,7 +161,7 @@ kotlin {

val androidMain by getting {
dependencies {
api("com.google.firebase:firebase-auth:21.0.1")
api("com.google.firebase:firebase-auth-ktx")
}
}

Expand Down
6 changes: 3 additions & 3 deletions firebase-auth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
"homepage": "https://github.com/GitLiveApp/firebase-kotlin-sdk",
"dependencies": {
"@gitlive/firebase-app": "1.4.1",
"firebase": "8.6.7",
"kotlin": "1.5.10",
"kotlinx-coroutines-core": "1.5.0"
"firebase": "8.8.1",
"kotlin": "1.5.21",
"kotlinx-coroutines-core": "1.5.1"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ private inline fun <R> rethrow(function: () -> R): R {
}
}

private fun errorToException(cause: dynamic) = when(val code = cause.code?.toString()?.toLowerCase()) {
private fun errorToException(cause: dynamic) = when(val code = cause.code?.toString()?.lowercase()) {
"auth/invalid-user-token" -> FirebaseAuthInvalidUserException(code, cause)
"auth/requires-recent-login" -> FirebaseAuthRecentLoginRequiredException(code, cause)
"auth/user-disabled" -> FirebaseAuthInvalidUserException(code, cause)
Expand Down
2 changes: 1 addition & 1 deletion firebase-auth/src/nativeInterop/cinterop/Cartfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseAuthBinary.json" == 8.2.0
binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseAuthBinary.json" == 8.5.0
22 changes: 11 additions & 11 deletions firebase-common/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ version = project.property("firebase-common.version") as String
plugins {
id("com.android.library")
kotlin("multiplatform")
kotlin("plugin.serialization") version "1.5.10"
kotlin("plugin.serialization") version "1.5.21"
}

android {
compileSdkVersion(property("targetSdkVersion") as Int)
compileSdk = property("targetSdkVersion") as Int
defaultConfig {
minSdkVersion(property("minSdkVersion") as Int)
targetSdkVersion(property("targetSdkVersion") as Int)
minSdk = property("minSdkVersion") as Int
targetSdk = property("targetSdkVersion") as Int
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
sourceSets {
Expand All @@ -31,11 +31,11 @@ android {
}
}
packagingOptions {
pickFirst("META-INF/kotlinx-serialization-core.kotlin_module")
pickFirst("META-INF/AL2.0")
pickFirst("META-INF/LGPL2.1")
resources.pickFirsts.add("META-INF/kotlinx-serialization-core.kotlin_module")
resources.pickFirsts.add("META-INF/AL2.0")
resources.pickFirsts.add("META-INF/LGPL2.1")
}
lintOptions {
lint {
isAbortOnError = false
}
}
Expand Down Expand Up @@ -89,21 +89,21 @@ kotlin {

val commonMain by getting {
dependencies {
api("org.jetbrains.kotlinx:kotlinx-serialization-core:1.2.0")
api("org.jetbrains.kotlinx:kotlinx-serialization-core:1.2.2")
}
}

val androidMain by getting {
dependencies {
api("com.google.firebase:firebase-common:20.0.0")
api("com.google.firebase:firebase-common-ktx")
}
}

val iosMain by getting

val jsMain by getting {
dependencies {
api(npm("firebase", "8.2.0"))
api(npm("firebase", "8.7.1"))
}
}
}
Expand Down
8 changes: 4 additions & 4 deletions firebase-common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
},
"homepage": "https://github.com/GitLiveApp/firebase-kotlin-multiplatform-sdk",
"dependencies": {
"firebase": "8.6.7",
"kotlin": "1.5.10",
"kotlinx-coroutines-core": "1.5.0",
"kotlinx-serialization-kotlinx-serialization-runtime": "1.2.0"
"firebase": "8.8.1",
"kotlin": "1.5.21",
"kotlinx-coroutines-core": "1.5.1",
"kotlinx-serialization-kotlinx-serialization-runtime": "1.2.2"
}
}
20 changes: 10 additions & 10 deletions firebase-config/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ plugins {
}

android {
compileSdkVersion(property("targetSdkVersion") as Int)
compileSdk = property("targetSdkVersion") as Int
defaultConfig {
minSdkVersion(property("minSdkVersion") as Int)
targetSdkVersion(property("targetSdkVersion") as Int)
minSdk = property("minSdkVersion") as Int
targetSdk = property("targetSdkVersion") as Int
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
sourceSets {
Expand All @@ -33,11 +33,11 @@ android {
}
}
packagingOptions {
pickFirst("META-INF/kotlinx-serialization-core.kotlin_module")
pickFirst("META-INF/AL2.0")
pickFirst("META-INF/LGPL2.1")
resources.pickFirsts.add("META-INF/kotlinx-serialization-core.kotlin_module")
resources.pickFirsts.add("META-INF/AL2.0")
resources.pickFirsts.add("META-INF/LGPL2.1")
}
lintOptions {
lint {
isAbortOnError = false
}
}
Expand Down Expand Up @@ -122,8 +122,8 @@ kotlin {
sourceSets {
all {
languageSettings.apply {
apiVersion = "1.4"
languageVersion = "1.4"
apiVersion = "1.5"
languageVersion = "1.5"
progressiveMode = true
useExperimentalAnnotation("kotlinx.coroutines.ExperimentalCoroutinesApi")
}
Expand All @@ -138,7 +138,7 @@ kotlin {

val androidMain by getting {
dependencies {
api("com.google.firebase:firebase-config-ktx:21.0.0")
api("com.google.firebase:firebase-config-ktx")
}
}

Expand Down
Loading