Skip to content

Commit

Permalink
[full ci] feat: update project to build with Kotlin 1.4
Browse files Browse the repository at this point in the history
  • Loading branch information
fractalwrench committed Jan 6, 2022
1 parent ceec0a9 commit 57a0ef7
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 5 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
* Explicitly define Kotlin api/language versions
[#1564](/~https://github.com/bugsnag/bugsnag-android/pull/1564)

* Build project with Kotlin 1.4, maintain compat with Kotlin 1.3
[#1565](/~https://github.com/bugsnag/bugsnag-android/pull/1565)

### Bug fixes

* Delete persisted NDK events earlier in delivery process
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@ private class KeyValueWriter {
private val sb = StringBuilder()

fun add(key: String, value: Any) {
sb.appendln("$key$KEY_VALUE_DELIMITER$value")
sb.append("$key$KEY_VALUE_DELIMITER$value")
sb.append("\n")
}

override fun toString() = sb.toString()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ class BugsnagOkHttpPlugin @JvmOverloads constructor(
): Map<String, Any> {
val request = call.request()

val data = mutableMapOf(
val data = mutableMapOf<String, Any>(
"method" to request.method,
"url" to sanitizeUrl(request),
"duration" to nowMs - info.startTime,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class LeaveBreadcrumbTest {
crumb["message"] = "JS: invoked API"
crumb["type"] = "request"

val metadata = hashMapOf(
val metadata = hashMapOf<String, Any?>(
"customFoo" to "Flobber",
"isJs" to true,
"naughtyValue" to null
Expand Down
2 changes: 1 addition & 1 deletion buildSrc/src/main/kotlin/com/bugsnag/android/Versions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ object Versions {
val compileSdkVersion = 31
val ndk = "17.2.4988734"
val java = JavaVersion.VERSION_1_7
val kotlin = "1.3.72"
val kotlin = "1.4.32"

// plugins
val androidGradlePlugin = "7.0.4"
Expand Down
2 changes: 1 addition & 1 deletion gradle/kotlin.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ android {
allWarningsAsErrors = true
jvmTarget = "1.6"
apiVersion = "1.3"
languageVersion = "1.3"
languageVersion = "1.4"
}
}

0 comments on commit 57a0ef7

Please sign in to comment.