Skip to content

Commit f98e55b

Browse files
committed
Update android sdk 29
1 parent 24f754c commit f98e55b

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ version = Library.version
3434
group = Library.group
3535

3636
extensions.getByType(LibraryExtension::class.java).apply {
37-
compileSdkVersion(28)
37+
compileSdkVersion(29)
3838

3939
defaultConfig {
4040
minSdkVersion(17)
41-
targetSdkVersion(28)
41+
targetSdkVersion(29)
4242
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
4343
}
4444

src/androidMain/kotlin/com/algolia/search/helper/Hashing.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ internal actual fun String.sha256(key: String): String {
1818
}
1919

2020
internal actual fun String.encodeBase64(): String {
21-
return String(Base64.encode(toByteArray(), Base64.NO_WRAP))
21+
return Base64.encodeToString(toByteArray(), Base64.DEFAULT)
2222
}
2323

2424
internal actual fun String.decodeBase64(): String {
25-
return String(Base64.decode(this, Base64.NO_WRAP))
25+
return String(Base64.decode(this, Base64.DEFAULT))
2626
}

src/androidMain/kotlin/com/algolia/search/model/ClientDate.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ public actual data class ClientDate internal actual constructor(override val raw
1515
internal actual constructor(timestamp: Long) : this(DateISO8601.format(timestamp))
1616

1717
/**
18-
* In the eventuality of the Date format being wrong, we create an empty [Date] object instead of throwing an exception.
18+
* In the eventuality of the Date format being wrong, we return null.
1919
*/
20-
val date: Date = when {
20+
val date: Date? = when {
2121
raw.length == 20 -> DateISO8601.dateISO8601.parse(raw)
2222
raw.length == 24 -> DateISO8601.dateISO8601Millis.parse(raw)
23-
else -> Date()
23+
else -> null
2424
}
2525
}

0 commit comments

Comments
 (0)