排除冗余的 META-INF 许可证与 Kotlin 元数据资源,挑选首次出现的 INDEX.LIST,避免合并冲突;启用按语言、密度、ABI 拆分的 App Bundle。 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
73 lines
1.8 KiB
Plaintext
73 lines
1.8 KiB
Plaintext
plugins {
|
|
alias(libs.plugins.androidApplication)
|
|
alias(libs.plugins.composeMultiplatform)
|
|
alias(libs.plugins.composeCompiler)
|
|
}
|
|
|
|
android {
|
|
namespace = "plus.rua.project"
|
|
compileSdk = libs.versions.android.compileSdk.get().toInt()
|
|
|
|
defaultConfig {
|
|
applicationId = "plus.rua.project"
|
|
minSdk = libs.versions.android.minSdk.get().toInt()
|
|
targetSdk = libs.versions.android.targetSdk.get().toInt()
|
|
versionCode = 1
|
|
versionName = "1.0"
|
|
|
|
ndk {
|
|
abiFilters += listOf("arm64-v8a", "armeabi-v7a")
|
|
}
|
|
}
|
|
|
|
buildTypes {
|
|
release {
|
|
isMinifyEnabled = true
|
|
isShrinkResources = true
|
|
proguardFiles(
|
|
getDefaultProguardFile("proguard-android-optimize.txt"),
|
|
"proguard-rules.pro"
|
|
)
|
|
signingConfig = signingConfigs.getByName("debug")
|
|
}
|
|
}
|
|
|
|
buildFeatures {
|
|
buildConfig = false
|
|
}
|
|
|
|
compileOptions {
|
|
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 {
|
|
implementation(project(":shared"))
|
|
implementation(libs.androidx.activity.compose)
|
|
implementation(libs.compose.uiToolingPreview)
|
|
}
|