From d583b73d749988fc19e9c8099a5eb6c1683aa8d9 Mon Sep 17 00:00:00 2001 From: kalarina Date: Sat, 31 Oct 2026 11:34:33 +0200 Subject: [PATCH] Leave unused library files out of the APK --- app/build.gradle.kts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index b48af39..e1689db 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -49,6 +49,21 @@ android { includeInBundle = false } + packaging { + resources { + // Library files the app never reads: Kotlin metadata for reflection, the coroutines debug + // agent, version markers for tooling and OkHttp's public suffix list, which only cookies use + excludes += listOf( + "/META-INF/*.version", + "/META-INF/*.kotlin_module", + "/kotlin/**", + "/kotlin-tooling-metadata.json", + "/DebugProbesKt.bin", + "/okhttp3/internal/publicsuffix/**", + ) + } + } + testOptions { // android.util.Log and friends are no-ops in JVM unit tests unitTests.isReturnDefaultValues = true