-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle being able to be minified by ProGuard (#43)
* tests passing * clean up serialization code * consistent ordering for getters and setters * changes from self-review of PR * pass in API key using root-level local.properties * feedback from PR * cache images also based on gradle settings
- Loading branch information
Showing
18 changed files
with
439 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package cloud.eppo.android; | ||
|
||
public interface CacheLoadCallback { | ||
void onCacheLoadSuccess(); | ||
|
||
void onCacheLoadFail(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,25 @@ | ||
package cloud.eppo.android.dto; | ||
|
||
import java.util.List; | ||
import com.google.gson.annotations.SerializedName; | ||
|
||
public class Allocation { | ||
@SerializedName("percentExposure") | ||
private float percentExposure; | ||
|
||
@SerializedName("variations") | ||
private List<Variation> variations; | ||
|
||
public float getPercentExposure() { | ||
return percentExposure; | ||
} | ||
|
||
public void setPercentExposure(float percentExposure) { | ||
this.percentExposure = percentExposure; | ||
} | ||
|
||
public List<Variation> getVariations() { | ||
return variations; | ||
} | ||
|
||
public void setVariations(List<Variation> variations) { | ||
this.variations = variations; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,57 @@ | ||
package cloud.eppo.android.dto; | ||
|
||
import com.google.gson.annotations.SerializedName; | ||
|
||
import java.util.List; | ||
import java.util.Map; | ||
import java.util.HashMap; | ||
|
||
public class FlagConfig { | ||
@SerializedName("subjectShards") | ||
private int subjectShards; | ||
|
||
@SerializedName("enabled") | ||
private boolean enabled; | ||
|
||
@SerializedName("typedOverrides") | ||
private Map<String, String> typedOverrides = new HashMap<>(); | ||
|
||
@SerializedName("rules") | ||
private List<TargetingRule> rules; | ||
|
||
@SerializedName("allocations") | ||
private Map<String, Allocation> allocations; | ||
|
||
public int getSubjectShards() { | ||
return subjectShards; | ||
} | ||
|
||
public void setSubjectShards(int subjectShards) { | ||
this.subjectShards = subjectShards; | ||
} | ||
|
||
public boolean isEnabled() { | ||
return enabled; | ||
} | ||
|
||
public void setEnabled(boolean enabled) { | ||
this.enabled = enabled; | ||
} | ||
|
||
public Map<String, String> getTypedOverrides() { | ||
return typedOverrides; | ||
} | ||
|
||
public void setTypedOverrides(Map<String, String> typedOverrides) { | ||
this.typedOverrides = typedOverrides; | ||
} | ||
|
||
public Map<String, Allocation> getAllocations() { | ||
return allocations; | ||
} | ||
|
||
public void setAllocations(Map<String, Allocation> allocations) { | ||
this.allocations = allocations; | ||
} | ||
|
||
public List<TargetingRule> getRules() { | ||
return rules; | ||
} | ||
|
||
public void setRules(List<TargetingRule> rules) { | ||
this.rules = rules; | ||
} | ||
} |
6 changes: 4 additions & 2 deletions
6
eppo/src/main/java/cloud/eppo/android/dto/RandomizationConfigResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,15 @@ | ||
package cloud.eppo.android.dto; | ||
|
||
import java.util.concurrent.ConcurrentHashMap; | ||
import com.google.gson.annotations.SerializedName; | ||
|
||
public class RandomizationConfigResponse { | ||
@SerializedName("flags") | ||
private ConcurrentHashMap<String, FlagConfig> flags; | ||
|
||
public ConcurrentHashMap<String, FlagConfig> getFlags() { | ||
return flags; | ||
} | ||
|
||
public void setFlags(ConcurrentHashMap<String, FlagConfig> flags) { | ||
this.flags = flags; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 8 additions & 13 deletions
21
eppo/src/main/java/cloud/eppo/android/dto/TargetingCondition.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,23 @@ | ||
package cloud.eppo.android.dto; | ||
|
||
import com.google.gson.annotations.SerializedName; | ||
|
||
public class Variation { | ||
@SerializedName("typedValue") | ||
private EppoValue typedValue; | ||
|
||
@SerializedName("shardRange") | ||
|
||
private ShardRange shardRange; | ||
|
||
public EppoValue getTypedValue() { | ||
return typedValue; | ||
} | ||
|
||
public void setTypedValue(EppoValue typedValue) { | ||
this.typedValue = typedValue; | ||
} | ||
|
||
public ShardRange getShardRange() { | ||
return shardRange; | ||
} | ||
|
||
public void setShardRange(ShardRange shardRange) { | ||
this.shardRange = shardRange; | ||
} | ||
} |
Oops, something went wrong.