Skip to content

Commit 50cc66d

Browse files
committed
👷 Build size optimization
1 parent 5852fe8 commit 50cc66d

File tree

1 file changed

+20
-4
lines changed

1 file changed

+20
-4
lines changed

app/build.gradle.kts

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ android {
1111
defaultConfig {
1212
applicationId = "co.stonephone.stonecamera"
1313
minSdk = 28
14-
targetSdk = 34
14+
targetSdk = 35
1515
versionCode = 1
1616
versionName = "1.0"
1717

@@ -20,13 +20,21 @@ android {
2020

2121
buildTypes {
2222
release {
23-
isMinifyEnabled = false
23+
isMinifyEnabled = true
24+
isShrinkResources = true
2425
proguardFiles(
2526
getDefaultProguardFile("proguard-android-optimize.txt"),
2627
"proguard-rules.pro"
2728
)
2829
}
2930
debug {
31+
proguardFiles(
32+
getDefaultProguardFile("proguard-android-optimize.txt"),
33+
"proguard-rules.pro"
34+
)
35+
ndk {
36+
debugSymbolLevel = "none"
37+
}
3038
}
3139
}
3240
compileOptions {
@@ -95,10 +103,18 @@ tasks.register<JacocoReport>("jacocoTestReport") {
95103
"android/**/*.*"
96104
)
97105

98-
val debugTree = fileTree(mapOf("dir" to "$buildDir/tmp/kotlin-classes/debug", "excludes" to fileFilter))
106+
val debugTree =
107+
fileTree(mapOf("dir" to "$buildDir/tmp/kotlin-classes/debug", "excludes" to fileFilter))
99108
val mainSrc = "$projectDir/src/main/java"
100109

101110
sourceDirectories.setFrom(files(mainSrc))
102111
classDirectories.setFrom(files(debugTree))
103-
executionData.setFrom(fileTree(mapOf("dir" to "$buildDir", "includes" to listOf("jacoco/testDebugUnitTest.exec"))))
112+
executionData.setFrom(
113+
fileTree(
114+
mapOf(
115+
"dir" to "$buildDir",
116+
"includes" to listOf("jacoco/testDebugUnitTest.exec")
117+
)
118+
)
119+
)
104120
}

0 commit comments

Comments
 (0)