Upgrade all the binary dependencies we include
Since this is for Android 15 and the new v2 format, this is a good time for upgrading, because we need to test the app extensively anyway.
This commit is contained in:
parent
03d2946c93
commit
83fd0ba5d1
23 changed files with 51 additions and 46 deletions
|
@ -15,6 +15,9 @@ android_app {
|
||||||
resource_dirs: [
|
resource_dirs: [
|
||||||
"app/src/main/res",
|
"app/src/main/res",
|
||||||
],
|
],
|
||||||
|
asset_dirs: [
|
||||||
|
"app/src/main/assets"
|
||||||
|
],
|
||||||
proto: {
|
proto: {
|
||||||
type: "lite",
|
type: "lite",
|
||||||
local_include_dirs: ["app/src/main/proto"],
|
local_include_dirs: ["app/src/main/proto"],
|
||||||
|
@ -37,6 +40,7 @@ android_app {
|
||||||
// app backup related libs
|
// app backup related libs
|
||||||
"seedvault-lib-protobuf-kotlin-lite",
|
"seedvault-lib-protobuf-kotlin-lite",
|
||||||
"seedvault-lib-kotlin-logging-jvm",
|
"seedvault-lib-kotlin-logging-jvm",
|
||||||
|
"seedvault-logback-android",
|
||||||
"seedvault-lib-chunker",
|
"seedvault-lib-chunker",
|
||||||
"seedvault-lib-zstd-jni",
|
"seedvault-lib-zstd-jni",
|
||||||
// our own gradle module libs
|
// our own gradle module libs
|
||||||
|
|
|
@ -182,7 +182,8 @@ dependencies {
|
||||||
)
|
)
|
||||||
implementation(fileTree("${rootProject.rootDir}/libs").include("seedvault-chunker-0.1.jar"))
|
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("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"))
|
implementation(fileTree("${rootProject.rootDir}/libs/dav4jvm").include("*.jar"))
|
||||||
|
|
||||||
|
|
23
app/src/main/assets/logback.xml
Normal file
23
app/src/main/assets/logback.xml
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
<!--
|
||||||
|
SPDX-FileCopyrightText: 2024 The Calyx Institute
|
||||||
|
SPDX-License-Identifier: Apache-2.0
|
||||||
|
-->
|
||||||
|
<configuration
|
||||||
|
xmlns="https://tony19.github.io/logback-android/xml"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="https://tony19.github.io/logback-android/xml https://cdn.jsdelivr.net/gh/tony19/logback-android/logback.xsd"
|
||||||
|
>
|
||||||
|
<appender name="logcat" class="ch.qos.logback.classic.android.LogcatAppender">
|
||||||
|
<tagEncoder>
|
||||||
|
<pattern>%logger{12}</pattern>
|
||||||
|
</tagEncoder>
|
||||||
|
<encoder>
|
||||||
|
<pattern>[%-20thread] %msg</pattern>
|
||||||
|
</encoder>
|
||||||
|
</appender>
|
||||||
|
|
||||||
|
<root level="DEBUG">
|
||||||
|
<appender-ref ref="logcat" />
|
||||||
|
</root>
|
||||||
|
</configuration>
|
||||||
|
|
|
@ -34,3 +34,9 @@ android_library {
|
||||||
"-opt-in=kotlin.RequiresOptIn",
|
"-opt-in=kotlin.RequiresOptIn",
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
java_import {
|
||||||
|
name: "seedvault-lib-tink-android",
|
||||||
|
jars: ["libs/tink-android-1.15.0.jar"],
|
||||||
|
sdk_version: "current",
|
||||||
|
}
|
||||||
|
|
BIN
core/libs/tink-android-1.15.0.jar
Normal file
BIN
core/libs/tink-android-1.15.0.jar
Normal file
Binary file not shown.
|
@ -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
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -7,7 +7,6 @@ package org.calyxos.seedvault.core.backends.webdav
|
||||||
|
|
||||||
import at.bitfire.dav4jvm.BasicDigestAuthHandler
|
import at.bitfire.dav4jvm.BasicDigestAuthHandler
|
||||||
import at.bitfire.dav4jvm.DavCollection
|
import at.bitfire.dav4jvm.DavCollection
|
||||||
import at.bitfire.dav4jvm.PropertyRegistry
|
|
||||||
import at.bitfire.dav4jvm.Response.HrefRelation.SELF
|
import at.bitfire.dav4jvm.Response.HrefRelation.SELF
|
||||||
import at.bitfire.dav4jvm.exception.HttpException
|
import at.bitfire.dav4jvm.exception.HttpException
|
||||||
import at.bitfire.dav4jvm.exception.NotFoundException
|
import at.bitfire.dav4jvm.exception.NotFoundException
|
||||||
|
@ -83,10 +82,6 @@ public class WebDavBackend(
|
||||||
private val url = "$baseUrl/$root"
|
private val url = "$baseUrl/$root"
|
||||||
private val folders = mutableSetOf<HttpUrl>() // cache for existing/created folders
|
private val folders = mutableSetOf<HttpUrl>() // cache for existing/created folders
|
||||||
|
|
||||||
init {
|
|
||||||
PropertyRegistry.register(GetLastModified.Factory)
|
|
||||||
}
|
|
||||||
|
|
||||||
override suspend fun test(): Boolean {
|
override suspend fun test(): Boolean {
|
||||||
val location = "$baseUrl/".toHttpUrl()
|
val location = "$baseUrl/".toHttpUrl()
|
||||||
val davCollection = DavCollection(okHttpClient, location)
|
val davCollection = DavCollection(okHttpClient, location)
|
||||||
|
|
|
@ -18,8 +18,11 @@ import at.bitfire.dav4jvm.property.webdav.DisplayName
|
||||||
import at.bitfire.dav4jvm.property.webdav.GetContentLength
|
import at.bitfire.dav4jvm.property.webdav.GetContentLength
|
||||||
import at.bitfire.dav4jvm.property.webdav.ResourceType
|
import at.bitfire.dav4jvm.property.webdav.ResourceType
|
||||||
import io.github.oshai.kotlinlogging.KLogger
|
import io.github.oshai.kotlinlogging.KLogger
|
||||||
|
import io.github.oshai.kotlinlogging.KotlinLogging
|
||||||
import okhttp3.HttpUrl
|
import okhttp3.HttpUrl
|
||||||
|
|
||||||
|
private val log = KotlinLogging.logger {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tries to do [DavCollection.propfind] with a depth of `-1`.
|
* Tries to do [DavCollection.propfind] with a depth of `-1`.
|
||||||
* Since `infinity` isn't supported by nginx either,
|
* Since `infinity` isn't supported by nginx either,
|
||||||
|
@ -65,7 +68,7 @@ internal fun DavCollection.mkColCreateMissing(callback: ResponseCallback) {
|
||||||
callback.onResponse(response)
|
callback.onResponse(response)
|
||||||
}
|
}
|
||||||
} catch (e: ConflictException) {
|
} catch (e: ConflictException) {
|
||||||
log.warning { "Error creating $location: $e" }
|
log.warn { "Error creating $location: $e" }
|
||||||
if (location.pathSize <= 1) throw e
|
if (location.pathSize <= 1) throw e
|
||||||
val newLocation = location.newBuilder()
|
val newLocation = location.newBuilder()
|
||||||
.removePathSegment(location.pathSize - 1)
|
.removePathSegment(location.pathSize - 1)
|
||||||
|
@ -106,7 +109,7 @@ private fun HttpException.isUnsupportedPropfind(): Boolean {
|
||||||
|
|
||||||
internal fun List<Property>.contentLength(): Long {
|
internal fun List<Property>.contentLength(): Long {
|
||||||
// crash intentionally, if this isn't in the list
|
// crash intentionally, if this isn't in the list
|
||||||
return filterIsInstance<GetContentLength>()[0].contentLength
|
return filterIsInstance<GetContentLength>()[0].contentLength ?: error("No contentLength")
|
||||||
}
|
}
|
||||||
|
|
||||||
internal fun Response.isFolder(): Boolean {
|
internal fun Response.isFolder(): Boolean {
|
||||||
|
|
|
@ -51,7 +51,7 @@ protobuf = { strictly = "3.21.12" }
|
||||||
material = { strictly = "1.11.0" }
|
material = { strictly = "1.11.0" }
|
||||||
# careful with upgrading tink, so old backups continue to be decryptable
|
# careful with upgrading tink, so old backups continue to be decryptable
|
||||||
# https://github.com/tink-crypto/tink-java/releases
|
# https://github.com/tink-crypto/tink-java/releases
|
||||||
tink = { strictly = "1.10.0" }
|
tink = { strictly = "1.15.0" }
|
||||||
|
|
||||||
# Coroutines versions
|
# Coroutines versions
|
||||||
# https://android.googlesource.com/platform/external/kotlinx.coroutines/+/refs/tags/android-15.0.0_r1/CHANGES.md
|
# https://android.googlesource.com/platform/external/kotlinx.coroutines/+/refs/tags/android-15.0.0_r1/CHANGES.md
|
||||||
|
|
|
@ -10,6 +10,12 @@ android_library_import {
|
||||||
extract_jni: true,
|
extract_jni: true,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
android_library_import {
|
||||||
|
name: "seedvault-logback-android",
|
||||||
|
aars: ["logback-android-3.0.0.aar"],
|
||||||
|
sdk_version: "current",
|
||||||
|
}
|
||||||
|
|
||||||
java_import {
|
java_import {
|
||||||
name: "seedvault-lib-protobuf-kotlin-lite",
|
name: "seedvault-lib-protobuf-kotlin-lite",
|
||||||
jars: ["protobuf-kotlin-lite-3.21.12.jar"],
|
jars: ["protobuf-kotlin-lite-3.21.12.jar"],
|
||||||
|
@ -18,7 +24,7 @@ java_import {
|
||||||
|
|
||||||
java_import {
|
java_import {
|
||||||
name: "seedvault-lib-kotlin-bip39",
|
name: "seedvault-lib-kotlin-bip39",
|
||||||
jars: ["kotlin-bip39-jvm-1.0.6.jar"],
|
jars: ["kotlin-bip39-jvm-1.0.8.jar"],
|
||||||
sdk_version: "current",
|
sdk_version: "current",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
java_import {
|
java_import {
|
||||||
name: "seedvault-lib-dav4jvm",
|
name: "seedvault-lib-dav4jvm",
|
||||||
jars: ["dav4jvm-b8be778.jar"],
|
jars: ["dav4jvm-c1bc143.jar"],
|
||||||
sdk_version: "current",
|
sdk_version: "current",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Binary file not shown.
BIN
libs/dav4jvm/dav4jvm-c1bc143.jar
Normal file
BIN
libs/dav4jvm/dav4jvm-c1bc143.jar
Normal file
Binary file not shown.
|
@ -5,12 +5,12 @@
|
||||||
|
|
||||||
android_library_import {
|
android_library_import {
|
||||||
name: "seedvault-lib-koin-android",
|
name: "seedvault-lib-koin-android",
|
||||||
aars: ["koin-android-3.2.0.aar"],
|
aars: ["koin-android-3.5.6.aar"],
|
||||||
sdk_version: "current",
|
sdk_version: "current",
|
||||||
}
|
}
|
||||||
|
|
||||||
java_import {
|
java_import {
|
||||||
name: "seedvault-lib-koin-core-jvm",
|
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",
|
sdk_version: "current",
|
||||||
}
|
}
|
||||||
|
|
Binary file not shown.
BIN
libs/koin-android/koin-android-3.5.6.aar
Normal file
BIN
libs/koin-android/koin-android-3.5.6.aar
Normal file
Binary file not shown.
Binary file not shown.
BIN
libs/koin-android/koin-core-jvm-3.5.6.jar
Normal file
BIN
libs/koin-android/koin-core-jvm-3.5.6.jar
Normal file
Binary file not shown.
Binary file not shown.
BIN
libs/kotlin-bip39-jvm-1.0.8.jar
Normal file
BIN
libs/kotlin-bip39-jvm-1.0.8.jar
Normal file
Binary file not shown.
BIN
libs/logback-android-3.0.0.aar
Normal file
BIN
libs/logback-android-3.0.0.aar
Normal file
Binary file not shown.
|
@ -43,9 +43,3 @@ android_library {
|
||||||
"-opt-in=kotlin.RequiresOptIn",
|
"-opt-in=kotlin.RequiresOptIn",
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
|
|
||||||
java_import {
|
|
||||||
name: "seedvault-lib-tink-android",
|
|
||||||
jars: ["libs/tink-android-1.10.0.jar"],
|
|
||||||
sdk_version: "current",
|
|
||||||
}
|
|
||||||
|
|
Binary file not shown.
Loading…
Reference in a new issue