refactor: r8 build optmisations
This commit is contained in:
+10
-4
@@ -33,6 +33,10 @@ android {
|
||||
targetSdk = 36
|
||||
versionCode = 1
|
||||
versionName = "0.1.0"
|
||||
androidResources {
|
||||
localeFilters += setOf("en", "es", "eu")
|
||||
}
|
||||
|
||||
|
||||
// testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||
testInstrumentationRunner = "androidx.benchmark.junit4.AndroidBenchmarkRunner"
|
||||
@@ -52,8 +56,8 @@ android {
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
// isMinifyEnabled = true // Enables R8/ProGuard shrinking
|
||||
// isShrinkResources = true // Removes unused resources
|
||||
isMinifyEnabled = true // Enables R8/ProGuard shrinking
|
||||
isShrinkResources = true // Removes unused resources
|
||||
proguardFiles(
|
||||
getDefaultProguardFile("proguard-android-optimize.txt"),
|
||||
"proguard-rules.pro"
|
||||
@@ -62,6 +66,8 @@ android {
|
||||
}
|
||||
create("benchmark") {
|
||||
initWith(buildTypes.getByName("release"))
|
||||
isMinifyEnabled = false // benchmarks must not be minified
|
||||
isShrinkResources = false // or results are meaningless
|
||||
signingConfig = signingConfigs.getByName("debug") // sign with debug key for easy deployment
|
||||
installation {
|
||||
enableBaselineProfile = false // ← disables profile embedding for this build type only
|
||||
@@ -116,7 +122,7 @@ dependencies {
|
||||
testImplementation(libs.junit)
|
||||
androidTestImplementation(platform(libs.androidx.compose.bom))
|
||||
androidTestImplementation(libs.androidx.compose.ui.test.junit4)
|
||||
implementation(libs.androidx.benchmark.junit4)
|
||||
androidTestImplementation(libs.androidx.benchmark.junit4)
|
||||
androidTestImplementation(libs.androidx.runner)
|
||||
androidTestImplementation(libs.androidx.test.ext.junit)
|
||||
androidTestImplementation(libs.androidx.espresso.core)
|
||||
@@ -128,7 +134,7 @@ dependencies {
|
||||
implementation(libs.retrofit2.retrofit)
|
||||
implementation(libs.converter.gson)
|
||||
implementation(libs.okhttp)
|
||||
implementation(libs.logging.interceptor)
|
||||
debugImplementation(libs.logging.interceptor)
|
||||
|
||||
// Coroutines
|
||||
implementation(libs.kotlinx.coroutines.android)
|
||||
|
||||
Reference in New Issue
Block a user