From c817835f75ec21fe72f27b589d4495048454fc8c Mon Sep 17 00:00:00 2001 From: Art Pinch Date: Fri, 8 Dec 2023 21:55:06 +0300 Subject: [PATCH] Fix release builds --- app/proguard-rules-release.pro | 3 +++ buildSrc/src/main/kotlin/convention.android.base.gradle.kts | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/app/proguard-rules-release.pro b/app/proguard-rules-release.pro index e69de29b..5d7204e7 100644 --- a/app/proguard-rules-release.pro +++ b/app/proguard-rules-release.pro @@ -0,0 +1,3 @@ +-keepclassmembers class * implements androidx.viewbinding.ViewBinding { + *; +} \ No newline at end of file diff --git a/buildSrc/src/main/kotlin/convention.android.base.gradle.kts b/buildSrc/src/main/kotlin/convention.android.base.gradle.kts index 8ccf7bec..89c6afbb 100644 --- a/buildSrc/src/main/kotlin/convention.android.base.gradle.kts +++ b/buildSrc/src/main/kotlin/convention.android.base.gradle.kts @@ -151,8 +151,8 @@ fun Project.addCompose(flavor: ProductFlavor, options: ComposeOptions.() -> Unit "${taskNamePrefix}KotlinAndroid", ) - project.tasks.whenTaskAdded { - if (name !in possibleTaskNames) return@whenTaskAdded + project.tasks.configureEach { + if (name !in possibleTaskNames) return@configureEach addComposeArgsToKotlinCompile( this as KotlinCompile,