From 22464d9ca62eaa5f4ea38048b5612b985553cd86 Mon Sep 17 00:00:00 2001 From: xfy Date: Tue, 19 May 2026 13:41:51 +0800 Subject: [PATCH] =?UTF-8?q?build:=20=E4=BC=98=E5=8C=96=20APK=20=E6=89=93?= =?UTF-8?q?=E5=8C=85=E4=B8=8E=20AAB=20=E5=88=86=E5=8C=85=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 排除冗余的 META-INF 许可证与 Kotlin 元数据资源,挑选首次出现的 INDEX.LIST,避免合并冲突;启用按语言、密度、ABI 拆分的 App Bundle。 Co-Authored-By: Claude Opus 4.7 (1M context) --- androidApp/build.gradle.kts | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/androidApp/build.gradle.kts b/androidApp/build.gradle.kts index 9635700..25c2209 100644 --- a/androidApp/build.gradle.kts +++ b/androidApp/build.gradle.kts @@ -40,6 +40,29 @@ android { sourceCompatibility = JavaVersion.VERSION_17 targetCompatibility = JavaVersion.VERSION_17 } + + packaging { + resources { + excludes += listOf( + "/META-INF/{AL2.0,LGPL2.1}", + "/META-INF/LICENSE*", + "/META-INF/NOTICE*", + "META-INF/DEPENDENCIES", + "**/*.kotlin_metadata", + "**/*.kotlin_module", + ) + pickFirsts += listOf( + "META-INF/INDEX.LIST", + "META-INF/io.netty.versions.properties", + ) + } + } + + bundle { + language { enableSplit = true } + density { enableSplit = true } + abi { enableSplit = true } + } } dependencies {