Files
file-manager/gradle/libs.versions.toml
T
SoftwareApp ba92cf392d Support 7z extraction, and fix .xz extraction which would have crashed at runtime
Commons Compress declares its LZMA/LZMA2 support against org.tukaani:xz as an *optional* dependency, so nothing pulled it in transitively and nothing failed at build time. The app nevertheless advertised .xz as extractable, so the first user to open one would have got NoClassDefFoundError: org/tukaani/xz/FilterOptions. XZCompressorInputStream references org/tukaani/xz/XZInputStream directly. The library is now declared, and a round-trip test covers the path that was silently missing.

That same library is what 7z needs, and Commons Compress already ships a pure-Java 7z reader, so 7z extraction costs no native code and no further dependency. The docs had assumed the format was off limits and said so in three places, including the customer-facing store copy.

7z is the only format here that cannot arrive through a stream: its header sits at the end of the file, so the reader has to seek. That is now a capability the backend advertises, StorageSource.openSeekable: the all-files backend answers with a real FileChannel, the SAF fallback with null, so folder mode reports needs-a-seekable-file instead of failing obscurely. Entry names go through the same ArchivePath.safeRelativePath zip-slip guard. 7z creation stays deferred.
2026-10-15 08:47:37 +02:00

72 lines
3.8 KiB
TOML

[versions]
agp = "9.1.0"
kotlin = "2.4.10"
# AndroidX / Compose
coreKtx = "1.18.0"
lifecycle = "2.10.0"
activityCompose = "1.13.0"
# SAF backend: DocumentFile over a persisted tree URI.
documentfile = "1.1.0"
# Compose BOM 2026.06.01 -> Compose UI/foundation 1.11.4, material3 1.4.0.
# Newer BOMs (2026.08.00+) ship Compose 1.12.x, which requires compileSdk 37 —
# that is newer than what AGP 9.1.0 supports (36) and newer than the API level
# Google Play requires for targetSdk, so we deliberately stay on 1.11.4.
composeBom = "2026.06.01"
# Coil 3.6.x requires compileSdk 37; 3.5.0 requires 36.
coil = "3.5.0"
# Kotlin libraries
coroutines = "1.9.0"
# Archives. Commons Compress is pure Java (zip/tar/gzip/bzip2/xz, 7z read),
# so it adds no native code and therefore no NDK dependency to the build.
commonsCompress = "1.27.1"
# Commons Compress declares its LZMA/LZMA2 support — the `.xz` compressor and the 7z
# format — against this library, as an *optional* dependency. Optional means it is NOT
# pulled in transitively, so leaving it out breaks `.xz` and `.7z` at **runtime** with
# NoClassDefFoundError rather than failing the build. 1.10 is the version Commons
# Compress 1.27.1 itself compiles against.
xz = "1.10"
# Testing
junit = "4.13.2"
robolectric = "4.17"
[libraries]
androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" }
androidx-documentfile = { group = "androidx.documentfile", name = "documentfile", version.ref = "documentfile" }
androidx-lifecycle-runtime-ktx = { group = "androidx.lifecycle", name = "lifecycle-runtime-ktx", version.ref = "lifecycle" }
androidx-lifecycle-runtime-compose = { group = "androidx.lifecycle", name = "lifecycle-runtime-compose", version.ref = "lifecycle" }
androidx-lifecycle-viewmodel-compose = { group = "androidx.lifecycle", name = "lifecycle-viewmodel-compose", version.ref = "lifecycle" }
androidx-activity-compose = { group = "androidx.activity", name = "activity-compose", version.ref = "activityCompose" }
androidx-compose-bom = { group = "androidx.compose", name = "compose-bom", version.ref = "composeBom" }
androidx-compose-ui = { group = "androidx.compose.ui", name = "ui" }
androidx-compose-ui-graphics = { group = "androidx.compose.ui", name = "ui-graphics" }
androidx-compose-ui-tooling = { group = "androidx.compose.ui", name = "ui-tooling" }
androidx-compose-ui-tooling-preview = { group = "androidx.compose.ui", name = "ui-tooling-preview" }
androidx-compose-material3 = { group = "androidx.compose.material3", name = "material3" }
androidx-compose-material-icons-core = { group = "androidx.compose.material", name = "material-icons-core" }
androidx-compose-material-icons-extended = { group = "androidx.compose.material", name = "material-icons-extended" }
kotlinx-coroutines-android = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-android", version.ref = "coroutines" }
coil-compose = { group = "io.coil-kt.coil3", name = "coil-compose", version.ref = "coil" }
commons-compress = { group = "org.apache.commons", name = "commons-compress", version.ref = "commonsCompress" }
# Commons Compress's LZMA/LZMA2 support: the `.xz` compressor and the 7z format.
xz = { group = "org.tukaani", name = "xz", version.ref = "xz" }
junit = { group = "junit", name = "junit", version.ref = "junit" }
robolectric = { group = "org.robolectric", name = "robolectric", version.ref = "robolectric" }
kotlinx-coroutines-test = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-test", version.ref = "coroutines" }
[plugins]
android-application = { id = "com.android.application", version.ref = "agp" }
# NOTE: `org.jetbrains.kotlin.android` is intentionally absent — AGP 9.x provides
# built-in Kotlin support and applying that plugin is now an error.
kotlin-compose = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }