build: 优化 APK 打包与 AAB 分包配置
排除冗余的 META-INF 许可证与 Kotlin 元数据资源,挑选首次出现的 INDEX.LIST,避免合并冲突;启用按语言、密度、ABI 拆分的 App Bundle。 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
feb7db718e
commit
22464d9ca6
@ -40,6 +40,29 @@ android {
|
|||||||
sourceCompatibility = JavaVersion.VERSION_17
|
sourceCompatibility = JavaVersion.VERSION_17
|
||||||
targetCompatibility = 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 {
|
dependencies {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user