lib: enable app optimization
This commit is contained in:
parent
33987b56fa
commit
e76554304d
|
|
@ -23,8 +23,17 @@ android {
|
||||||
}
|
}
|
||||||
|
|
||||||
buildTypes {
|
buildTypes {
|
||||||
|
debug {
|
||||||
|
isMinifyEnabled = true
|
||||||
|
isShrinkResources = true
|
||||||
|
proguardFiles(
|
||||||
|
getDefaultProguardFile("proguard-android.txt"),
|
||||||
|
"proguard-rules.pro"
|
||||||
|
)
|
||||||
|
}
|
||||||
release {
|
release {
|
||||||
isMinifyEnabled = false
|
isMinifyEnabled = true
|
||||||
|
isShrinkResources = true
|
||||||
proguardFiles(
|
proguardFiles(
|
||||||
getDefaultProguardFile("proguard-android-optimize.txt"),
|
getDefaultProguardFile("proguard-android-optimize.txt"),
|
||||||
"proguard-rules.pro"
|
"proguard-rules.pro"
|
||||||
|
|
|
||||||
|
|
@ -19,3 +19,11 @@
|
||||||
# If you keep the line number information, uncomment this to
|
# If you keep the line number information, uncomment this to
|
||||||
# hide the original source file name.
|
# hide the original source file name.
|
||||||
#-renamesourcefileattribute SourceFile
|
#-renamesourcefileattribute SourceFile
|
||||||
|
|
||||||
|
-keep class com.arm.aichat.* { *; }
|
||||||
|
-keep class com.arm.aichat.gguf.* { *; }
|
||||||
|
|
||||||
|
-assumenosideeffects class android.util.Log {
|
||||||
|
public static int v(...);
|
||||||
|
public static int d(...);
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -39,16 +39,6 @@ android {
|
||||||
minCompileSdk = 35
|
minCompileSdk = 35
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
buildTypes {
|
|
||||||
release {
|
|
||||||
isMinifyEnabled = false
|
|
||||||
proguardFiles(
|
|
||||||
getDefaultProguardFile("proguard-android-optimize.txt"),
|
|
||||||
"proguard-rules.pro"
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
externalNativeBuild {
|
externalNativeBuild {
|
||||||
cmake {
|
cmake {
|
||||||
path("src/main/cpp/CMakeLists.txt")
|
path("src/main/cpp/CMakeLists.txt")
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
-keep class com.arm.aichat.* { *; }
|
||||||
|
-keep class com.arm.aichat.gguf.* { *; }
|
||||||
|
|
||||||
|
-keepclasseswithmembernames class * {
|
||||||
|
native <methods>;
|
||||||
|
}
|
||||||
|
|
||||||
|
-keep class kotlin.Metadata { *; }
|
||||||
|
|
@ -16,7 +16,7 @@
|
||||||
|
|
||||||
#ifndef LOG_MIN_LEVEL
|
#ifndef LOG_MIN_LEVEL
|
||||||
#if defined(NDEBUG)
|
#if defined(NDEBUG)
|
||||||
#define LOG_MIN_LEVEL ANDROID_LOG_WARN
|
#define LOG_MIN_LEVEL ANDROID_LOG_INFO
|
||||||
#else
|
#else
|
||||||
#define LOG_MIN_LEVEL ANDROID_LOG_VERBOSE
|
#define LOG_MIN_LEVEL ANDROID_LOG_VERBOSE
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue