Niklas Wintrén
03/13/2025, 9:35 AMapp_cmp:composeApp: packageReleaseDistributionForCurrentOS
I get this exception: io.ktor.client.HttpClienEngineContainer: Provider io.ktor.client.engine. cio. CIOEngineContainer not found.
My Gradle/Module setup
// This hasn't changed since an initial setup; so things might be over-engineered in places.
root
| - app_cmp
| - composeApp (src)
| - androidMain
| - commonMain
| - desktopMain
| - iosMain
| - wasmJsMain
| - studio (shared design module)
| - core (shared util/models module)
| - sdk
| - clientDomain (common)
| - dataModels (common)
| - clientData (all targets)
| - clientPlatform (all targets)
We're using Supabase bom + auth.ui :composeApp. And bom+auth/postgres/realtime in :clientPlatform.
Have anyone experience with the Supabase-kt
lib for a release build?
And I suspect this has to do with Proguard etc. If anyone has an example of a KMP/CMP project targeting all platforms that uses proguard (with different module) that would be a great resource to have a look at.
ThanK you!Colton Idle
03/13/2025, 1:04 PMNiklas Wintrén
03/13/2025, 1:18 PM-dontoptimize
# Keep `Companion` object fields of serializable classes.
# This avoids serializer lookup through `getDeclaredClasses` as done for named companion objects.
-if @kotlinx.serialization.Serializable class **
-keepclassmembers class <1> {
static <1>$Companion Companion;
}
# Keep `serializer()` on companion objects (both default and named) of serializable classes.
-if @kotlinx.serialization.Serializable class ** {
static **$* *;
}
-keepclassmembers class <2>$<3> {
kotlinx.serialization.KSerializer serializer(...);
}
# Keep `INSTANCE.serializer()` of serializable objects.
-if @kotlinx.serialization.Serializable class ** {
public static ** INSTANCE;
}
-keepclassmembers class <1> {
public static <1> INSTANCE;
kotlinx.serialization.KSerializer serializer(...);
}
# @Serializable and @Polymorphic are used at runtime for polymorphic serialization.
-keepattributes RuntimeVisibleAnnotations,AnnotationDefault
# Don't print notes about potential mistakes or omissions in the configuration for kotlinx-serialization classes
# See also <https://github.com/Kotlin/kotlinx.serialization/issues/1900>
-dontnote kotlinx.serialization.**
# Serialization core uses `java.lang.ClassValue` for caching inside these specified classes.
# If there is no `java.lang.ClassValue` (for example, in Android), then R8/ProGuard will print a warning.
# However, since in this case they will not be used, we can disable these warnings
-dontwarn kotlinx.serialization.internal.ClassValueReferences
# disable optimisation for descriptor field because in some versions of ProGuard, optimization generates incorrect bytecode that causes a verification error
# see <https://github.com/Kotlin/kotlinx.serialization/issues/2719>
-keepclassmembers public class **$$serializer {
private ** descriptor;
}
Niklas Wintrén
03/13/2025, 1:23 PMColton Idle
03/13/2025, 1:59 PM