Skip to content

fix gradle build task #182

New issue

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

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

Already on GitHub? # to your account

Merged
merged 5 commits into from
May 13, 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
6 changes: 6 additions & 0 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ jobs:
run: ./gradlew assemble
- name: Run JS Tests
run: ./gradlew cleanTest jsTest
- name: Upload test artifact
uses: actions/upload-artifact@v2
if: failure()
with:
name: "JSTest Report HTML"
path: "firebase-firestore/build/reports/tests/jsTest/"
- name: Run Android Instrumented Tests
uses: reactivecircus/android-emulator-runner@v2
with:
Expand Down
10 changes: 10 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,16 @@ subprojects {
onlyIf { !project.gradle.startParameter.taskNames.contains("publishToMavenLocal") }
}

tasks.whenTaskAdded {
enabled = when(name) {
"compileDebugUnitTestKotlinAndroid" -> false
"compileReleaseUnitTestKotlinAndroid" -> false
"testDebugUnitTest" -> false
"testReleaseUnitTest" -> false
else -> enabled
}
}

tasks {

val updateVersion by registering(Exec::class) {
Expand Down
2 changes: 1 addition & 1 deletion firebase-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"homepage": "https://github.com/GitLiveApp/firebase-kotlin-sdk",
"dependencies": {
"@gitlive/firebase-common": "1.2.0",
"firebase": "8.2.10",
"firebase": "8.5.0",
"kotlin": "1.4.31",
"kotlinx-coroutines-core": "1.4.3"
}
Expand Down
16 changes: 14 additions & 2 deletions firebase-auth/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,20 @@ kotlin {

js {
useCommonJs()
nodejs()
browser()
nodejs {
testTask {
useMocha {
timeout = "5s"
}
}
}
browser {
testTask {
useMocha {
timeout = "5s"
}
}
}
}

sourceSets {
Expand Down
2 changes: 1 addition & 1 deletion firebase-auth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"homepage": "https://github.com/GitLiveApp/firebase-kotlin-sdk",
"dependencies": {
"@gitlive/firebase-app": "1.2.0",
"firebase": "8.2.10",
"firebase": "8.5.0",
"kotlin": "1.4.31",
"kotlinx-coroutines-core": "1.4.3"
}
Expand Down
2 changes: 1 addition & 1 deletion firebase-common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
},
"homepage": "https://github.com/GitLiveApp/firebase-kotlin-multiplatform-sdk",
"dependencies": {
"firebase": "8.2.10",
"firebase": "8.5.0",
"kotlin": "1.4.31",
"kotlinx-coroutines-core": "1.4.3",
"kotlinx-serialization-kotlinx-serialization-runtime": "1.1.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class EncodersTest {

@Test
fun decodeObjectNullableValue() {
val decoded = decode(TestData.serializer(), mapOf("map" to mapOf("key" to "value"), "nullableBool" to null))
val decoded = decode(TestData.serializer(), nativeMapOf("map" to mapOf("key" to "value"), "nullableBool" to null))
assertNull(decoded.nullableBool)
}
}
2 changes: 1 addition & 1 deletion firebase-database/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"homepage": "https://github.com/GitLiveApp/firebase-kotlin-sdk",
"dependencies": {
"@gitlive/firebase-app": "1.2.0",
"firebase": "8.2.10",
"firebase": "8.5.0",
"kotlin": "1.4.31",
"kotlinx-coroutines-core": "1.4.3"
}
Expand Down
2 changes: 1 addition & 1 deletion firebase-firestore/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"homepage": "https://github.com/GitLiveApp/firebase-kotlin-sdk",
"dependencies": {
"@gitlive/firebase-app": "1.2.0",
"firebase": "8.2.10",
"firebase": "8.5.0",
"kotlin": "1.4.31",
"kotlinx-coroutines-core": "1.4.3"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,11 @@ class FirebaseFirestoreTest {
@Test
fun testStringOrderBy() = runTest {
setupFirestoreData()

val resultDocs = Firebase.firestore.collection("FirebaseFirestoreTest")
.orderBy("prop1").get().documents
val resultDocs = Firebase.firestore
.collection("FirebaseFirestoreTest")
.orderBy("prop1")
.get()
.documents
assertEquals(3, resultDocs.size)
assertEquals("aaa", resultDocs[0].get("prop1"))
assertEquals("bbb", resultDocs[1].get("prop1"))
Expand Down
2 changes: 1 addition & 1 deletion firebase-functions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"homepage": "https://github.com/GitLiveApp/firebase-kotlin-sdk",
"dependencies": {
"@gitlive/firebase-app": "1.2.0",
"firebase": "8.2.10",
"firebase": "8.5.0",
"kotlin": "1.4.31",
"kotlinx-coroutines-core": "1.4.3"
}
Expand Down