Skip to content
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

Update project to build with Kotlin 1.4 #1565

Merged
merged 2 commits into from
Jan 7, 2022
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 CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@
* Explicitly define Kotlin api/language versions
[#1564](https://github.com/bugsnag/bugsnag-android/pull/1564)

* 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"
}
}