This commit is contained in:
5ec1cff
2024-07-11 21:50:42 +08:00
parent 1fbcfd4654
commit 81ee8bd1e4
8 changed files with 46 additions and 26 deletions

View File

@@ -14,6 +14,12 @@ val verName: String by rootProject.extra
val commitHash: String by rootProject.extra
val abiList: List<String> by rootProject.extra
val releaseFlags = arrayOf(
"-Oz", "-flto",
"-Wno-unused", "-Wno-unused-parameter",
"-Wl,--exclude-libs,ALL", "-Wl,--gc-sections",
)
android {
defaultConfig {
ndk {
@@ -34,6 +40,14 @@ android {
path("src/main/cpp/CMakeLists.txt")
}
}
buildTypes {
release {
externalNativeBuild.cmake {
cFlags += releaseFlags
cppFlags += releaseFlags
}
}
}
}
androidComponents.onVariants { variant ->