Enable basic R8 minification for macro targets
Test: SmallListStartupBenchmark (View + Compose)
Test: Validated minification enabled via studio APK inspection
Change-Id: I0b9372624cceb2b6fc2da3a57f2cc6d209f82393
diff --git a/benchmark/integration-tests/macrobenchmark-target/build.gradle b/benchmark/integration-tests/macrobenchmark-target/build.gradle
index 1e72999..4de1d5d 100644
--- a/benchmark/integration-tests/macrobenchmark-target/build.gradle
+++ b/benchmark/integration-tests/macrobenchmark-target/build.gradle
@@ -22,8 +22,18 @@
id("kotlin-android")
}
+android {
+ buildTypes {
+ release {
+ minifyEnabled true
+ shrinkResources true
+ proguardFiles getDefaultProguardFile('proguard-android-optimize.txt')
+ }
+ }
+}
+
dependencies {
- api(KOTLIN_STDLIB)
+ implementation(KOTLIN_STDLIB)
implementation(CONSTRAINT_LAYOUT, { transitive = true })
implementation("androidx.arch.core:core-runtime:2.1.0")
implementation("androidx.appcompat:appcompat:1.2.0")
diff --git a/compose/integration-tests/macrobenchmark-target/build.gradle b/compose/integration-tests/macrobenchmark-target/build.gradle
index 7666c45..666cb1c 100644
--- a/compose/integration-tests/macrobenchmark-target/build.gradle
+++ b/compose/integration-tests/macrobenchmark-target/build.gradle
@@ -9,11 +9,20 @@
id("org.jetbrains.kotlin.android")
}
+android {
+ buildTypes {
+ release {
+ minifyEnabled true
+ shrinkResources true
+ proguardFiles getDefaultProguardFile('proguard-android-optimize.txt')
+ }
+ }
+}
+
dependencies {
kotlinPlugin project(":compose:compiler:compiler")
implementation(KOTLIN_STDLIB)
-
implementation project(":compose:foundation:foundation-layout")
implementation project(":compose:material:material")
implementation project(":compose:runtime:runtime")