# Consumer proguard rules for nav-core

#-dontshrink

# --- OkHttp ---
-dontwarn okhttp3.**
-dontwarn okio.**
# A resource is loaded with a relative path so the package of this class must be preserved.
-keepnames class okhttp3.internal.publicsuffix.PublicSuffixDatabase
-dontwarn com.squareup.okhttp3.**
-keep class com.squareup.okhttp3.** { *;}
-dontwarn okio.**

# --- Java ---
-dontwarn java.awt.Color

# --- ai.nextbillion.kits.directions.NBDirections ---
-dontwarn com.sun.xml.internal.ws.spi.db.BindingContextFactory

# --- AutoValue ---
# AutoValue annotations are retained but dependency is compileOnly.
-dontwarn com.google.auto.value.**

-keepnames class com.google.android.gms.** {*;}

-dontwarn retrofit2.**
-keep class retrofit2.** { *; }
-keepattributes Signature
-keepattributes Exceptions

-keep class com.google.gson.** {*;}
-keep class com.google.**{*;}
-keep class sun.misc.Unsafe { *; }
-keep class com.google.gson.stream.** { *; }
-keep class com.google.gson.examples.android.model.** { *; }

-keepclasseswithmembernames class * {
    native <methods>;
}

-keepclassmembers enum * {
    public static **[] values();
    public static ** valueOf(java.lang.String);
}

-keep class **.R$* {*;}

-keep class * implements android.os.Parcelable {
  public static final android.os.Parcelable$Creator *;
}

-keepclassmembers class * implements java.io.Serializable {
    static final long serialVersionUID;
    private static final java.io.ObjectStreamField[] serialPersistentFields;
    !static !transient <fields>;
    private void writeObject(java.io.ObjectOutputStream);
    private void readObject(java.io.ObjectInputStream);
    java.lang.Object writeReplace();
    java.lang.Object readResolve();
}

# keep all class name
-keep class ai.nextbillion.navigation.core.**{*;}
-keep class ai.nextbillion.kits.**{*;}
-keep class ai.nextbillion.kits.directions.models.**{ *; }
-keep public class ai.nextbillion.navigation.core.navigation.NavEngineConfig{*;}
-keep public class ai.nextbillion.navigation.core.navigation.NavEngineConfig$*{*;}
-keep class ai.nextbillion.kits.core.NBService{*;}
-keep class ai.nextbillion.kits.core.NBFeatureFlag{*;}
-keep class ai.nextbillion.kits.core.constants.Constants{*;}
-keep public class ai.nextbillion.navigation.core.fasterroute.FasterRoute
-keep public class ai.nextbillion.navigation.core.navigation.NavigationConstants{*;}
-keep class ai.nextbillion.navigation.core.routefetcher.**{*;}
-keep class ai.nextbillion.navigation.core.**Listener{*;}

-keep class ai.nextbillion.location.**{ *; }