Skip to content

Commit 2302795

Browse files
bmartyclaude
andcommitted
Keep the Showkase codegen constructor in the designsystem module
The rule only kept the class, but ShowkaseBrowserActivity instantiates it with Class.forName(...).getDeclaredConstructor().newInstance(), so R8 was free to strip the constructor. Also drop the AGP template comments and rename the file to .keep, for consistency with app/proguard. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent fc519c7 commit 2302795

3 files changed

Lines changed: 6 additions & 24 deletions

File tree

libraries/designsystem/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ android {
2323

2424
buildTypes {
2525
getByName("release") {
26-
consumerProguardFiles("consumer-rules.pro")
26+
consumerProguardFiles("consumer-rules.keep")
2727
}
2828
}
2929
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Showkase generates this class, and Showkase's ShowkaseBrowserActivity loads it reflectively with
2+
# Class.forName(...).getDeclaredConstructor().newInstance(), so its constructor must be kept too.
3+
-keep class io.element.android.libraries.designsystem.showkase.DesignSystemShowkaseRootModuleCodegen {
4+
<init>();
5+
}

libraries/designsystem/consumer-rules.pro

Lines changed: 0 additions & 23 deletions
This file was deleted.

0 commit comments

Comments
 (0)