diff --git a/Android.bp b/Android.bp
index 3bd010f4..98c53fc4 100644
--- a/Android.bp
+++ b/Android.bp
@@ -15,6 +15,9 @@ android_app {
resource_dirs: [
"app/src/main/res",
],
+ asset_dirs: [
+ "app/src/main/assets"
+ ],
proto: {
type: "lite",
local_include_dirs: ["app/src/main/proto"],
@@ -37,6 +40,7 @@ android_app {
// app backup related libs
"seedvault-lib-protobuf-kotlin-lite",
"seedvault-lib-kotlin-logging-jvm",
+ "seedvault-logback-android",
"seedvault-lib-chunker",
"seedvault-lib-zstd-jni",
// our own gradle module libs
diff --git a/app/build.gradle.kts b/app/build.gradle.kts
index 05285696..681a28e5 100644
--- a/app/build.gradle.kts
+++ b/app/build.gradle.kts
@@ -182,7 +182,8 @@ dependencies {
)
implementation(fileTree("${rootProject.rootDir}/libs").include("seedvault-chunker-0.1.jar"))
implementation(fileTree("${rootProject.rootDir}/libs").include("zstd-jni-1.5.6-5.aar"))
- implementation(fileTree("${rootProject.rootDir}/libs").include("kotlin-bip39-jvm-1.0.6.jar"))
+ implementation(fileTree("${rootProject.rootDir}/libs").include("kotlin-bip39-jvm-1.0.8.jar"))
+ implementation(fileTree("${rootProject.rootDir}/libs").include("logback-android-3.0.0.aar"))
implementation(fileTree("${rootProject.rootDir}/libs/dav4jvm").include("*.jar"))
diff --git a/app/src/main/assets/logback.xml b/app/src/main/assets/logback.xml
new file mode 100644
index 00000000..54793913
--- /dev/null
+++ b/app/src/main/assets/logback.xml
@@ -0,0 +1,23 @@
+
+
+
+
+ %logger{12}
+
+
+ [%-20thread] %msg
+
+
+
+
+
+
+
+
diff --git a/core/Android.bp b/core/Android.bp
index 96379108..00148d2c 100644
--- a/core/Android.bp
+++ b/core/Android.bp
@@ -34,3 +34,9 @@ android_library {
"-opt-in=kotlin.RequiresOptIn",
],
}
+
+java_import {
+ name: "seedvault-lib-tink-android",
+ jars: ["libs/tink-android-1.15.0.jar"],
+ sdk_version: "current",
+}
diff --git a/core/libs/tink-android-1.15.0.jar b/core/libs/tink-android-1.15.0.jar
new file mode 100644
index 00000000..684b8eef
Binary files /dev/null and b/core/libs/tink-android-1.15.0.jar differ
diff --git a/core/src/main/java/org/calyxos/seedvault/core/backends/webdav/GetLastModified.kt b/core/src/main/java/org/calyxos/seedvault/core/backends/webdav/GetLastModified.kt
deleted file mode 100644
index 46c78f58..00000000
--- a/core/src/main/java/org/calyxos/seedvault/core/backends/webdav/GetLastModified.kt
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * SPDX-FileCopyrightText: 2024 The Calyx Institute
- * SPDX-License-Identifier: Apache-2.0
- */
-
-package org.calyxos.seedvault.core.backends.webdav
-
-import at.bitfire.dav4jvm.Property
-import at.bitfire.dav4jvm.PropertyFactory
-import at.bitfire.dav4jvm.property.webdav.NS_WEBDAV
-import org.xmlpull.v1.XmlPullParser
-
-/**
- * A fake version of [at.bitfire.dav4jvm.property.webdav.GetLastModified] which we register
- * so we don't need to depend on `org.apache.commons.lang3` which is used for date parsing.
- */
-internal class GetLastModified : Property {
- companion object {
- @JvmField
- val NAME = Property.Name(NS_WEBDAV, "getlastmodified")
- }
-
- object Factory : PropertyFactory {
- override fun getName() = NAME
- override fun create(parser: XmlPullParser): GetLastModified? = null
- }
-}
diff --git a/core/src/main/java/org/calyxos/seedvault/core/backends/webdav/WebDavBackend.kt b/core/src/main/java/org/calyxos/seedvault/core/backends/webdav/WebDavBackend.kt
index c7de6d04..b43d97a4 100644
--- a/core/src/main/java/org/calyxos/seedvault/core/backends/webdav/WebDavBackend.kt
+++ b/core/src/main/java/org/calyxos/seedvault/core/backends/webdav/WebDavBackend.kt
@@ -7,7 +7,6 @@ package org.calyxos.seedvault.core.backends.webdav
import at.bitfire.dav4jvm.BasicDigestAuthHandler
import at.bitfire.dav4jvm.DavCollection
-import at.bitfire.dav4jvm.PropertyRegistry
import at.bitfire.dav4jvm.Response.HrefRelation.SELF
import at.bitfire.dav4jvm.exception.HttpException
import at.bitfire.dav4jvm.exception.NotFoundException
@@ -83,10 +82,6 @@ public class WebDavBackend(
private val url = "$baseUrl/$root"
private val folders = mutableSetOf() // cache for existing/created folders
- init {
- PropertyRegistry.register(GetLastModified.Factory)
- }
-
override suspend fun test(): Boolean {
val location = "$baseUrl/".toHttpUrl()
val davCollection = DavCollection(okHttpClient, location)
diff --git a/core/src/main/java/org/calyxos/seedvault/core/backends/webdav/WebDavHelper.kt b/core/src/main/java/org/calyxos/seedvault/core/backends/webdav/WebDavHelper.kt
index 8e594bce..4f223ca8 100644
--- a/core/src/main/java/org/calyxos/seedvault/core/backends/webdav/WebDavHelper.kt
+++ b/core/src/main/java/org/calyxos/seedvault/core/backends/webdav/WebDavHelper.kt
@@ -18,8 +18,11 @@ import at.bitfire.dav4jvm.property.webdav.DisplayName
import at.bitfire.dav4jvm.property.webdav.GetContentLength
import at.bitfire.dav4jvm.property.webdav.ResourceType
import io.github.oshai.kotlinlogging.KLogger
+import io.github.oshai.kotlinlogging.KotlinLogging
import okhttp3.HttpUrl
+private val log = KotlinLogging.logger {}
+
/**
* Tries to do [DavCollection.propfind] with a depth of `-1`.
* Since `infinity` isn't supported by nginx either,
@@ -65,7 +68,7 @@ internal fun DavCollection.mkColCreateMissing(callback: ResponseCallback) {
callback.onResponse(response)
}
} catch (e: ConflictException) {
- log.warning { "Error creating $location: $e" }
+ log.warn { "Error creating $location: $e" }
if (location.pathSize <= 1) throw e
val newLocation = location.newBuilder()
.removePathSegment(location.pathSize - 1)
@@ -106,7 +109,7 @@ private fun HttpException.isUnsupportedPropfind(): Boolean {
internal fun List.contentLength(): Long {
// crash intentionally, if this isn't in the list
- return filterIsInstance()[0].contentLength
+ return filterIsInstance()[0].contentLength ?: error("No contentLength")
}
internal fun Response.isFolder(): Boolean {
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml
index 65b43704..c8124dc4 100644
--- a/gradle/libs.versions.toml
+++ b/gradle/libs.versions.toml
@@ -51,7 +51,7 @@ protobuf = { strictly = "3.21.12" }
material = { strictly = "1.11.0" }
# careful with upgrading tink, so old backups continue to be decryptable
# https://github.com/tink-crypto/tink-java/releases
-tink = { strictly = "1.10.0" }
+tink = { strictly = "1.15.0" }
# Coroutines versions
# https://android.googlesource.com/platform/external/kotlinx.coroutines/+/refs/tags/android-15.0.0_r1/CHANGES.md
diff --git a/libs/Android.bp b/libs/Android.bp
index 957fd446..51ddb1df 100644
--- a/libs/Android.bp
+++ b/libs/Android.bp
@@ -10,6 +10,12 @@ android_library_import {
extract_jni: true,
}
+android_library_import {
+ name: "seedvault-logback-android",
+ aars: ["logback-android-3.0.0.aar"],
+ sdk_version: "current",
+}
+
java_import {
name: "seedvault-lib-protobuf-kotlin-lite",
jars: ["protobuf-kotlin-lite-3.21.12.jar"],
@@ -18,7 +24,7 @@ java_import {
java_import {
name: "seedvault-lib-kotlin-bip39",
- jars: ["kotlin-bip39-jvm-1.0.6.jar"],
+ jars: ["kotlin-bip39-jvm-1.0.8.jar"],
sdk_version: "current",
}
diff --git a/libs/dav4jvm/Android.bp b/libs/dav4jvm/Android.bp
index ea70b04b..69dc1b1a 100644
--- a/libs/dav4jvm/Android.bp
+++ b/libs/dav4jvm/Android.bp
@@ -5,7 +5,7 @@
java_import {
name: "seedvault-lib-dav4jvm",
- jars: ["dav4jvm-b8be778.jar"],
+ jars: ["dav4jvm-c1bc143.jar"],
sdk_version: "current",
}
diff --git a/libs/dav4jvm/dav4jvm-b8be778.jar b/libs/dav4jvm/dav4jvm-b8be778.jar
deleted file mode 100644
index 5d5d633b..00000000
Binary files a/libs/dav4jvm/dav4jvm-b8be778.jar and /dev/null differ
diff --git a/libs/dav4jvm/dav4jvm-c1bc143.jar b/libs/dav4jvm/dav4jvm-c1bc143.jar
new file mode 100644
index 00000000..2c76d16c
Binary files /dev/null and b/libs/dav4jvm/dav4jvm-c1bc143.jar differ
diff --git a/libs/koin-android/Android.bp b/libs/koin-android/Android.bp
index bb24944c..b3a20705 100644
--- a/libs/koin-android/Android.bp
+++ b/libs/koin-android/Android.bp
@@ -5,12 +5,12 @@
android_library_import {
name: "seedvault-lib-koin-android",
- aars: ["koin-android-3.2.0.aar"],
+ aars: ["koin-android-3.5.6.aar"],
sdk_version: "current",
}
java_import {
name: "seedvault-lib-koin-core-jvm",
- jars: ["koin-core-jvm-3.2.0.jar"],
+ jars: ["koin-core-jvm-3.5.6.jar"],
sdk_version: "current",
}
diff --git a/libs/koin-android/koin-android-3.2.0.aar b/libs/koin-android/koin-android-3.2.0.aar
deleted file mode 100644
index 3078638b..00000000
Binary files a/libs/koin-android/koin-android-3.2.0.aar and /dev/null differ
diff --git a/libs/koin-android/koin-android-3.5.6.aar b/libs/koin-android/koin-android-3.5.6.aar
new file mode 100644
index 00000000..05a72943
Binary files /dev/null and b/libs/koin-android/koin-android-3.5.6.aar differ
diff --git a/libs/koin-android/koin-core-jvm-3.2.0.jar b/libs/koin-android/koin-core-jvm-3.2.0.jar
deleted file mode 100644
index 912fc35f..00000000
Binary files a/libs/koin-android/koin-core-jvm-3.2.0.jar and /dev/null differ
diff --git a/libs/koin-android/koin-core-jvm-3.5.6.jar b/libs/koin-android/koin-core-jvm-3.5.6.jar
new file mode 100644
index 00000000..132ac3bd
Binary files /dev/null and b/libs/koin-android/koin-core-jvm-3.5.6.jar differ
diff --git a/libs/kotlin-bip39-jvm-1.0.6.jar b/libs/kotlin-bip39-jvm-1.0.6.jar
deleted file mode 100644
index faeabc19..00000000
Binary files a/libs/kotlin-bip39-jvm-1.0.6.jar and /dev/null differ
diff --git a/libs/kotlin-bip39-jvm-1.0.8.jar b/libs/kotlin-bip39-jvm-1.0.8.jar
new file mode 100644
index 00000000..4877fe21
Binary files /dev/null and b/libs/kotlin-bip39-jvm-1.0.8.jar differ
diff --git a/libs/logback-android-3.0.0.aar b/libs/logback-android-3.0.0.aar
new file mode 100644
index 00000000..e3aadcb8
Binary files /dev/null and b/libs/logback-android-3.0.0.aar differ
diff --git a/storage/lib/Android.bp b/storage/lib/Android.bp
index b2649be6..9d935240 100644
--- a/storage/lib/Android.bp
+++ b/storage/lib/Android.bp
@@ -43,9 +43,3 @@ android_library {
"-opt-in=kotlin.RequiresOptIn",
],
}
-
-java_import {
- name: "seedvault-lib-tink-android",
- jars: ["libs/tink-android-1.10.0.jar"],
- sdk_version: "current",
-}
diff --git a/storage/lib/libs/tink-android-1.10.0.jar b/storage/lib/libs/tink-android-1.10.0.jar
deleted file mode 100644
index 2a370011..00000000
Binary files a/storage/lib/libs/tink-android-1.10.0.jar and /dev/null differ