Skip to content

Commit 3a4d0fc

Browse files
committed
fix(desktop): disable proguard return-type specialization breaking compose text
1 parent b3576c5 commit 3a4d0fc

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

composeApp/proguard-desktop-rules.pro

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
# ProGuard's return-type specialization narrows ActualParagraph()'s declared return type
2+
# from the Paragraph interface down to its only impl (SkiaParagraph). The bytecode still
3+
# pushes a Paragraph-typed value, so JVM 21's verifier rejects it at runtime with
4+
# "VerifyError: Bad return type" the moment any Text() renders (androidx.compose.ui.text).
5+
# Disable only method type-specialization; shrinking, obfuscation, class-merging,
6+
# inlining and every other optimization stay on.
7+
-optimizations !method/specialization/*
8+
19
-keepclasseswithmembers class * {
210
native <methods>;
311
}

0 commit comments

Comments
 (0)