# HumanlabsLink SDK ProGuard/R8 rules
# These rules are applied to consuming apps

# Keep Moshi-generated adapters
-keep class world.humanlabs.link.sdk.models.**JsonAdapter { *; }
-keep class world.humanlabs.link.sdk.fingerprint.DeviceFingerprintJsonAdapter { *; }
-keep class world.humanlabs.link.sdk.network.**JsonAdapter { *; }

# Keep public API classes
-keep class world.humanlabs.link.sdk.HumanlabsLink { *; }
-keep class world.humanlabs.link.sdk.HumanlabsLinkLogger { *; }
-keep class world.humanlabs.link.sdk.models.** { *; }
-keep class world.humanlabs.link.sdk.errors.HumanlabsLinkError { *; }
-keep class world.humanlabs.link.sdk.errors.HumanlabsLinkError$* { *; }
-keep class world.humanlabs.link.sdk.fingerprint.DeviceFingerprint { *; }

# Keep Moshi annotations
-keepattributes *Annotation*
-keep class com.squareup.moshi.** { *; }
-keepclassmembers class * {
    @com.squareup.moshi.Json <fields>;
}

# Keep Kotlin metadata for Moshi
-keep class kotlin.Metadata { *; }

-if class world.humanlabs.link.sdk.attribution.ActiveAttribution
-keepnames class world.humanlabs.link.sdk.attribution.ActiveAttribution
-if class world.humanlabs.link.sdk.attribution.ActiveAttribution
-keep class world.humanlabs.link.sdk.attribution.ActiveAttributionJsonAdapter {
    public <init>(com.squareup.moshi.Moshi);
}
-if class world.humanlabs.link.sdk.attribution.ActiveAttribution
-keepnames class kotlin.jvm.internal.DefaultConstructorMarker
-if class world.humanlabs.link.sdk.attribution.ActiveAttribution
-keepclassmembers class world.humanlabs.link.sdk.attribution.ActiveAttribution {
    public synthetic <init>(java.lang.String,java.lang.String,java.lang.String,int,kotlin.jvm.internal.DefaultConstructorMarker);
}

-if class world.humanlabs.link.sdk.fingerprint.DeviceFingerprint
-keepnames class world.humanlabs.link.sdk.fingerprint.DeviceFingerprint
-if class world.humanlabs.link.sdk.fingerprint.DeviceFingerprint
-keep class world.humanlabs.link.sdk.fingerprint.DeviceFingerprintJsonAdapter {
    public <init>(com.squareup.moshi.Moshi);
}
-if class world.humanlabs.link.sdk.fingerprint.DeviceFingerprint
-keepnames class kotlin.jvm.internal.DefaultConstructorMarker
-if class world.humanlabs.link.sdk.fingerprint.DeviceFingerprint
-keepclassmembers class world.humanlabs.link.sdk.fingerprint.DeviceFingerprint {
    public synthetic <init>(java.lang.String,java.lang.String,java.lang.String,int,int,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,int,java.lang.String,java.lang.String,java.lang.String,int,kotlin.jvm.internal.DefaultConstructorMarker);
}

-if class world.humanlabs.link.sdk.models.DeepLinkData
-keepnames class world.humanlabs.link.sdk.models.DeepLinkData
-if class world.humanlabs.link.sdk.models.DeepLinkData
-keep class world.humanlabs.link.sdk.models.DeepLinkDataJsonAdapter {
    public <init>(com.squareup.moshi.Moshi);
}
-if class world.humanlabs.link.sdk.models.DeepLinkData
-keepnames class kotlin.jvm.internal.DefaultConstructorMarker
-if class world.humanlabs.link.sdk.models.DeepLinkData
-keepclassmembers class world.humanlabs.link.sdk.models.DeepLinkData {
    public synthetic <init>(java.lang.String,java.lang.String,java.lang.String,java.lang.String,world.humanlabs.link.sdk.models.UTMParameters,java.util.Map,java.lang.String,java.lang.String,java.lang.String,java.lang.String,int,kotlin.jvm.internal.DefaultConstructorMarker);
}

-if class world.humanlabs.link.sdk.models.EventRequest
-keepnames class world.humanlabs.link.sdk.models.EventRequest
-if class world.humanlabs.link.sdk.models.EventRequest
-keep class world.humanlabs.link.sdk.models.EventRequestJsonAdapter {
    public <init>(com.squareup.moshi.Moshi);
}
-if class world.humanlabs.link.sdk.models.EventRequest
-keepnames class kotlin.jvm.internal.DefaultConstructorMarker
-if class world.humanlabs.link.sdk.models.EventRequest
-keepclassmembers class world.humanlabs.link.sdk.models.EventRequest {
    public synthetic <init>(java.lang.String,java.lang.String,java.util.Map,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,int,kotlin.jvm.internal.DefaultConstructorMarker);
}

-if class world.humanlabs.link.sdk.models.EventResponse
-keepnames class world.humanlabs.link.sdk.models.EventResponse
-if class world.humanlabs.link.sdk.models.EventResponse
-keep class world.humanlabs.link.sdk.models.EventResponseJsonAdapter {
    public <init>(com.squareup.moshi.Moshi);
}

-if class world.humanlabs.link.sdk.models.InstallResponse
-keepnames class world.humanlabs.link.sdk.models.InstallResponse
-if class world.humanlabs.link.sdk.models.InstallResponse
-keep class world.humanlabs.link.sdk.models.InstallResponseJsonAdapter {
    public <init>(com.squareup.moshi.Moshi);
}
-if class world.humanlabs.link.sdk.models.InstallResponse
-keepnames class kotlin.jvm.internal.DefaultConstructorMarker
-if class world.humanlabs.link.sdk.models.InstallResponse
-keepclassmembers class world.humanlabs.link.sdk.models.InstallResponse {
    public synthetic <init>(java.lang.String,boolean,double,java.util.List,world.humanlabs.link.sdk.models.DeepLinkData,int,kotlin.jvm.internal.DefaultConstructorMarker);
}

-if class world.humanlabs.link.sdk.models.UTMParameters
-keepnames class world.humanlabs.link.sdk.models.UTMParameters
-if class world.humanlabs.link.sdk.models.UTMParameters
-keep class world.humanlabs.link.sdk.models.UTMParametersJsonAdapter {
    public <init>(com.squareup.moshi.Moshi);
}
-if class world.humanlabs.link.sdk.models.UTMParameters
-keepnames class kotlin.jvm.internal.DefaultConstructorMarker
-if class world.humanlabs.link.sdk.models.UTMParameters
-keepclassmembers class world.humanlabs.link.sdk.models.UTMParameters {
    public synthetic <init>(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,int,kotlin.jvm.internal.DefaultConstructorMarker);
}
