Skip to content

Commit 320846c

Browse files
Merge branch 'master' into database-transactions
2 parents 1546e58 + c7316fd commit 320846c

File tree

2 files changed

+23
-2
lines changed

2 files changed

+23
-2
lines changed

build.gradle.kts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import org.gradle.api.tasks.testing.logging.TestLogEvent
55
plugins {
66
kotlin("multiplatform") version "1.6.10" apply false
77
id("base")
8+
id("com.github.ben-manes.versions") version "0.42.0"
89
}
910

1011
buildscript {
@@ -268,3 +269,23 @@ subprojects {
268269
}
269270
}
270271
}
272+
273+
tasks.withType<com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask> {
274+
275+
fun isNonStable(version: String): Boolean {
276+
val stableKeyword = listOf("RELEASE", "FINAL", "GA").any { version.toUpperCase().contains(it) }
277+
val versionMatch = "^[0-9,.v-]+(-r)?$".toRegex().matches(version)
278+
279+
return (stableKeyword || versionMatch).not()
280+
}
281+
282+
rejectVersionIf {
283+
isNonStable(candidate.version)
284+
}
285+
286+
checkForGradleUpdate = true
287+
outputFormatter = "plain,html"
288+
outputDir = "build/dependency-reports"
289+
reportfileName = "dependency-updates"
290+
}
291+
// check for latest dependencies - ./gradlew dependencyUpdates -Drevision=release

firebase-functions/src/iosMain/kotlin/dev/gitlive/firebase/functions/functions.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ suspend inline fun <T> T.await(function: T.(callback: (NSError?) -> Unit) -> Uni
6363
if(error == null) {
6464
job.complete(Unit)
6565
} else {
66-
job.completeExceptionally(FirebaseFunctionsException(error.toString()))
66+
job.completeExceptionally(FirebaseFunctionsException(error.localizedDescription))
6767
}
6868
}
6969
job.await()
@@ -75,7 +75,7 @@ suspend inline fun <T, reified R> T.awaitResult(function: T.(callback: (R?, NSEr
7575
if(error == null) {
7676
job.complete(result)
7777
} else {
78-
job.completeExceptionally(FirebaseFunctionsException(error.toString()))
78+
job.completeExceptionally(FirebaseFunctionsException(error.localizedDescription))
7979
}
8080
}
8181
return job.await() as R

0 commit comments

Comments
 (0)