diff --git a/CHANGES.txt b/CHANGES.txt index 1de3274e6..51c5c684e 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,7 @@ +3.3.0 (Jul 18, 2023) +- Improved streaming architecture implementation to apply feature flag updates from the notification received which is now enhanced, improving efficiency and reliability of the whole update system. +- Added logic to do a full check of feature flags immediately when the app comes back to foreground, limited to once per minute. + 3.2.2 (Jun 7, 2023) - Refactored cipher creation to avoid NPE scenarios. diff --git a/build.gradle b/build.gradle index 9074c632f..8e1e9b273 100644 --- a/build.gradle +++ b/build.gradle @@ -16,7 +16,7 @@ apply plugin: 'signing' apply plugin: 'kotlin-android' ext { - splitVersion = '3.2.2' + splitVersion = '3.3.0' } android { @@ -98,8 +98,8 @@ dependencies { def lifecycleVersion = '2.5.1' def annotationVersion = '1.2.0' def gsonVersion = '2.9.1' - def guavaVersion = '31.1-android' - def snakeYamlVersion = '1.32' + def guavaVersion = '32.0.0-android' + def snakeYamlVersion = '2.0' def jetBrainsAnnotationsVersion = '22.0.0' def okHttpVersion = '3.12.13' def playServicesVersion = '17.6.0' diff --git a/split-proguard-rules.pro b/split-proguard-rules.pro index 7165edd00..8dc624df9 100644 --- a/split-proguard-rules.pro +++ b/split-proguard-rules.pro @@ -20,3 +20,35 @@ -dontwarn java.beans.IntrospectionException -dontwarn java.beans.Introspector -dontwarn java.beans.PropertyDescriptor + +##---------------Begin: proguard configuration for Gson ---------- +# Gson uses generic type information stored in a class file when working with fields. Proguard +# removes such information by default, so configure it to keep all of it. +-keepattributes Signature + +# For using GSON @Expose annotation +-keepattributes *Annotation* + +# Gson specific classes +-dontwarn sun.misc.** +#-keep class com.google.gson.stream.** { *; } + +# Application classes that will be serialized/deserialized over Gson +-keep class com.google.gson.examples.android.model.** { ; } + +# Prevent proguard from stripping interface information from TypeAdapter, TypeAdapterFactory, +# JsonSerializer, JsonDeserializer instances (so they can be used in @JsonAdapter) +-keep class * extends com.google.gson.TypeAdapter +-keep class * implements com.google.gson.TypeAdapterFactory +-keep class * implements com.google.gson.JsonSerializer +-keep class * implements com.google.gson.JsonDeserializer + +# Prevent R8 from leaving Data object members always null +-keepclassmembers,allowobfuscation class * { + @com.google.gson.annotations.SerializedName ; +} + +# Retain generic signatures of TypeToken and its subclasses with R8 version 3.0 and higher. +-keep,allowobfuscation,allowshrinking class com.google.gson.reflect.TypeToken +-keep,allowobfuscation,allowshrinking class * extends com.google.gson.reflect.TypeToken +##---------------End: proguard configuration for Gson ---------- diff --git a/src/main/java/io/split/android/client/service/sseclient/notifications/SplitsChangeNotification.java b/src/main/java/io/split/android/client/service/sseclient/notifications/SplitsChangeNotification.java index 59248300a..3c22888fe 100644 --- a/src/main/java/io/split/android/client/service/sseclient/notifications/SplitsChangeNotification.java +++ b/src/main/java/io/split/android/client/service/sseclient/notifications/SplitsChangeNotification.java @@ -21,7 +21,7 @@ public class SplitsChangeNotification extends IncomingNotification { @SerializedName("c") @Nullable - private CompressionType compressionType; + private Integer compressionType; public SplitsChangeNotification() { @@ -47,6 +47,16 @@ public String getData() { @Nullable public CompressionType getCompressionType() { - return compressionType; + if (compressionType != null) { + if (compressionType == 0) { + return CompressionType.NONE; + } else if (compressionType == 1) { + return CompressionType.GZIP; + } else if (compressionType == 2) { + return CompressionType.ZLIB; + } + } + + return null; } }