-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
76 lines (67 loc) · 2.06 KB
/
build.gradle.kts
File metadata and controls
76 lines (67 loc) · 2.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
plugins {
id("com.android.application")
id("kotlin-android")
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
id("dev.flutter.flutter-gradle-plugin")
}
android {
namespace = "dev.koshika.koshika"
compileSdk = flutter.compileSdkVersion
ndkVersion = flutter.ndkVersion
compileOptions {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_11.toString()
}
defaultConfig {
applicationId = "dev.koshika.koshika"
minSdk = flutter.minSdkVersion
targetSdk = flutter.targetSdkVersion
versionCode = flutter.versionCode
versionName = flutter.versionName
}
buildTypes {
release {
signingConfig = signingConfigs.getByName("debug")
isMinifyEnabled = true
isShrinkResources = true
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
}
}
packaging {
jniLibs {
excludes += "**/libVkLayer_khronos_validation.so"
excludes += "**/libmediapipe_tasks_vision_image_generator_jni.so"
excludes += "**/libimagegenerator_gpu.so"
}
}
flavorDimensions += "appType"
productFlavors {
create("lite") {
dimension = "appType"
applicationIdSuffix = ".lite"
versionNameSuffix = "-lite"
}
create("full") {
dimension = "appType"
}
}
}
// Strip llama.cpp native libs from the lite flavor APK.
// This runs after packaging to remove AI inference libraries,
// keeping the lite APK small (~15MB smaller).
androidComponents {
onVariants(selector().withFlavor("appType" to "lite")) { variant ->
variant.packaging.jniLibs.excludes.addAll(listOf(
"**/libllama.so",
"**/libggml*.so",
"**/libmtmd.so",
"**/libllamadart.so",
))
}
}
flutter {
source = "../.."
}