diff --git a/libraries/designsystem/build.gradle.kts b/libraries/designsystem/build.gradle.kts index c159659fb0..9ef66f7b2f 100644 --- a/libraries/designsystem/build.gradle.kts +++ b/libraries/designsystem/build.gradle.kts @@ -23,7 +23,7 @@ android { buildTypes { getByName("release") { - consumerProguardFiles("consumer-rules.pro") + consumerProguardFiles("consumer-rules.keep") } } } diff --git a/libraries/designsystem/consumer-rules.keep b/libraries/designsystem/consumer-rules.keep new file mode 100644 index 0000000000..c84e1c0613 --- /dev/null +++ b/libraries/designsystem/consumer-rules.keep @@ -0,0 +1,5 @@ +# Showkase generates this class, and Showkase's ShowkaseBrowserActivity loads it reflectively with +# Class.forName(...).getDeclaredConstructor().newInstance(), so its constructor must be kept too. +-keep class io.element.android.libraries.designsystem.showkase.DesignSystemShowkaseRootModuleCodegen { + (); +} diff --git a/libraries/designsystem/consumer-rules.pro b/libraries/designsystem/consumer-rules.pro deleted file mode 100644 index dabf5661a4..0000000000 --- a/libraries/designsystem/consumer-rules.pro +++ /dev/null @@ -1,23 +0,0 @@ -# Add project specific ProGuard rules here. -# You can control the set of applied configuration files using the -# proguardFiles setting in build.gradle.kts. -# -# For more details, see -# http://developer.android.com/guide/developing/tools/proguard.html - -# If your project uses WebView with JS, uncomment the following -# and specify the fully qualified class name to the JavaScript interface -# class: -#-keepclassmembers class fqcn.of.javascript.interface.for.webview { -# public *; -#} - -# Uncomment this to preserve the line number information for -# debugging stack traces. -#-keepattributes SourceFile,LineNumberTable - -# If you keep the line number information, uncomment this to -# hide the original source file name. -#-renamesourcefileattribute SourceFile - --keep class io.element.android.libraries.designsystem.showkase.DesignSystemShowkaseRootModuleCodegen { }