Open dkhalanskyjb opened 7 months ago
Describe the bug
https://github.com/JetBrains/compose-multiplatform/tree/master/tutorials/Native_distributions_and_local_execution#minification--obfuscation provides inaccurate instructions. When followed, they will lead to a project that doesn't work. See https://github.com/JetBrains/compose-multiplatform/issues/3047 and https://github.com/Kotlin/kotlinx.coroutines/issues/4025.
Affected platforms
Versions
Current master as of writing.
master
To Reproduce
Expected behavior The project works.
Screenshots Not applicable.
Additional context The rule that seems to do the trick is:
-keep class * implements kotlinx.coroutines.internal.MainDispatcherFactory
Anecdotally, this seems to be sufficient.
If some other issues arise with Proguard + Coroutines, here's the full list of rules that were needed for Proguard at some point https://github.com/Kotlin/kotlinx.coroutines/blob/13f27f729547e5c22d17d5b5de3582d450b037b4/kotlinx-coroutines-core/jvm/resources/META-INF/com.android.tools/proguard/coroutines.pro . A lot of this is probably only needed for older Proguard versions, though.
Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.
Describe the bug
https://github.com/JetBrains/compose-multiplatform/tree/master/tutorials/Native_distributions_and_local_execution#minification--obfuscation provides inaccurate instructions. When followed, they will lead to a project that doesn't work. See https://github.com/JetBrains/compose-multiplatform/issues/3047 and https://github.com/Kotlin/kotlinx.coroutines/issues/4025.
Affected platforms
Versions
Current
master
as of writing.To Reproduce
Expected behavior The project works.
Screenshots Not applicable.
Additional context The rule that seems to do the trick is:
Anecdotally, this seems to be sufficient.
If some other issues arise with Proguard + Coroutines, here's the full list of rules that were needed for Proguard at some point https://github.com/Kotlin/kotlinx.coroutines/blob/13f27f729547e5c22d17d5b5de3582d450b037b4/kotlinx-coroutines-core/jvm/resources/META-INF/com.android.tools/proguard/coroutines.pro . A lot of this is probably only needed for older Proguard versions, though.