diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 813cf1e..0d15827 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -25,7 +25,7 @@ android { } dependencies { - implementation("com.featurevisor:featurevisor-java:4.0.0") + implementation("com.featurevisor:featurevisor-java:5.0.0") coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.1.5") diff --git a/app/src/test/resources/featurevisor-sdk-v3.json b/app/src/test/resources/featurevisor-sdk-v3.json index 2dc430b..8dc2ef8 100644 --- a/app/src/test/resources/featurevisor-sdk-v3.json +++ b/app/src/test/resources/featurevisor-sdk-v3.json @@ -1 +1 @@ -{"schemaVersion":"2","featurevisorVersion":"3.7.0","revision":"15","segments":{"premiumAccounts":{"conditions":"[{\"attribute\":\"accountPlan\",\"operator\":\"in\",\"value\":[\"pro\",\"enterprise\"]}]"}},"features":{"checkout_experience":{"bucketBy":"userId","requiredFeatures":["commerce_platform"],"variations":[{"value":"standard","weight":50,"variables":{"checkout_mode":"standard","max_items":10,"payment_methods":["card"],"presentation":{"accent":"blue","showProgress":false}}},{"value":"express","weight":50,"variables":{"checkout_mode":"express","max_items":25,"payment_methods":["card","wallet"],"presentation":{"accent":"green","showProgress":true}}}],"traffic":[{"key":"premium-accounts","segments":"premiumAccounts","percentage":100000,"allocation":[{"variation":"standard","range":[0,50000]},{"variation":"express","range":[50000,100000]}]},{"key":"gradual-rollout","segments":"*","percentage":70000,"allocation":[{"variation":"standard","range":[0,35000]},{"variation":"express","range":[35000,70000]}]}],"variablesSchema":{"checkout_mode":{"type":"string","defaultValue":"standard"},"max_items":{"type":"integer","defaultValue":10},"payment_methods":{"type":"array","defaultValue":["card"]},"presentation":{"type":"object","defaultValue":{"accent":"blue","showProgress":false}}},"force":[{"segments":"premiumAccounts","enabled":true,"variation":"express"},{"conditions":"[{\"attribute\":\"country\",\"operator\":\"equals\",\"value\":\"nl\"}]","enabled":true,"variation":"express"}],"hash":"G8x8YLBx4S"},"commerce_platform":{"bucketBy":"userId","traffic":[{"key":"premium-accounts","segments":"premiumAccounts","percentage":100000},{"key":"gradual-rollout","segments":"*","percentage":80000}],"force":[{"conditions":"[{\"attribute\":\"accountPlan\",\"operator\":\"equals\",\"value\":\"disabled\"}]","enabled":false},{"segments":"premiumAccounts","enabled":true},{"conditions":"[{\"attribute\":\"country\",\"operator\":\"equals\",\"value\":\"nl\"}]","enabled":true}],"hash":"QbyP3IoHAA"}},"variables":{"serviceEndpoints":{"type":"object","defaultValue":{"baseUrl":"https://api.example.com","timeoutMs":3000,"retries":2},"overrides":[{"key":"premium","value":{"baseUrl":"https://api.eu.example.com","timeoutMs":1200,"retries":4},"keyPath":["europe","premium"],"conditions":"{\"attribute\":\"country\",\"operator\":\"in\",\"value\":[\"nl\",\"de\",\"fr\"]}","segments":"premiumAccounts"},{"key":"europe","value":{"baseUrl":"https://api.eu.example.com","timeoutMs":2500,"retries":2},"conditions":"{\"attribute\":\"country\",\"operator\":\"in\",\"value\":[\"nl\",\"de\",\"fr\"]}"},{"key":"default","value":{"baseUrl":"https://api.example.com","timeoutMs":3000,"retries":2},"segments":"*"}],"hash":"vJCOzkvpiu"},"supportContact":{"type":"string","defaultValue":"support@example.com","overrides":[{"key":"dutch","value":"support-nl@example.com","conditions":"{\"attribute\":\"locale\",\"operator\":\"equals\",\"value\":\"nl-NL\"}"},{"key":"default","value":"support@example.com","segments":"*"}],"hash":"6pGU1l8aap"}}} +{"schemaVersion":"4","featurevisorVersion":"4.0.0","revision":"16","segments":{"premiumAccounts":{"conditions":"[{\"attribute\":\"accountPlan\",\"operator\":\"in\",\"value\":[\"pro\",\"enterprise\"]}]"}},"features":{"checkout_experience":{"bucketBy":"userId","conditions":"[{\"feature\":\"commerce_platform\"}]","variations":[{"value":"standard","weight":50,"variables":{"checkout_mode":"standard","max_items":10,"payment_methods":["card"],"presentation":{"accent":"blue","showProgress":false}}},{"value":"express","weight":50,"variables":{"checkout_mode":"express","max_items":25,"payment_methods":["card","wallet"],"presentation":{"accent":"green","showProgress":true}}}],"traffic":[{"key":"premium-accounts","conditions":"premiumAccounts","percentage":100000,"allocation":[{"variation":"standard","range":[0,50000]},{"variation":"express","range":[50000,100000]}]},{"key":"gradual-rollout","conditions":"*","percentage":70000,"allocation":[{"variation":"standard","range":[0,35000]},{"variation":"express","range":[35000,70000]}]}],"variablesSchema":{"checkout_mode":{"type":"string","defaultValue":"standard"},"max_items":{"type":"integer","defaultValue":10},"payment_methods":{"type":"array","defaultValue":["card"]},"presentation":{"type":"object","defaultValue":{"accent":"blue","showProgress":false}}},"force":[{"conditions":"premiumAccounts","enabled":true,"variation":"express"},{"conditions":"[{\"attribute\":\"country\",\"operator\":\"equals\",\"value\":\"nl\"}]","enabled":true,"variation":"express"}],"hash":"wbfAMUDpjl"},"commerce_platform":{"bucketBy":"userId","traffic":[{"key":"premium-accounts","conditions":"premiumAccounts","percentage":100000},{"key":"gradual-rollout","conditions":"*","percentage":80000}],"force":[{"conditions":"[{\"attribute\":\"accountPlan\",\"operator\":\"equals\",\"value\":\"disabled\"}]","enabled":false},{"conditions":"premiumAccounts","enabled":true},{"conditions":"[{\"attribute\":\"country\",\"operator\":\"equals\",\"value\":\"nl\"}]","enabled":true}],"hash":"a1HRABQXMh"}},"variables":{"checkoutPolicy":{"type":"object","defaultValue":{"currency":"EUR","maxOrderValue":500,"allowGuest":true},"disabledValue":{"currency":"EUR","maxOrderValue":0,"allowGuest":false},"conditions":"[{\"feature\":\"commerce_platform\"}]","overrides":[{"key":"premium-express","value":{"currency":"EUR","maxOrderValue":2500,"allowGuest":false},"conditions":"[\"premiumAccounts\",{\"feature\":\"checkout_experience\",\"enabled\":true,\"variation\":\"express\"}]"},{"key":"netherlands","value":{"currency":"EUR","maxOrderValue":1500,"allowGuest":true},"conditions":"{\"attribute\":\"country\",\"operator\":\"equals\",\"value\":\"nl\"}"},{"key":"default","value":{"currency":"EUR","maxOrderValue":500,"allowGuest":true},"conditions":"*"}],"hash":"n6gxH1gGkA"},"serviceEndpoints":{"type":"object","defaultValue":{"baseUrl":"https://api.example.com","timeoutMs":3000,"retries":2},"overrides":[{"key":"premium","value":{"baseUrl":"https://api.eu.example.com","timeoutMs":1200,"retries":4},"keyPath":["europe","premium"],"conditions":"[{\"attribute\":\"country\",\"operator\":\"in\",\"value\":[\"nl\",\"de\",\"fr\"]},\"premiumAccounts\"]"},{"key":"europe","value":{"baseUrl":"https://api.eu.example.com","timeoutMs":2500,"retries":2},"conditions":"{\"attribute\":\"country\",\"operator\":\"in\",\"value\":[\"nl\",\"de\",\"fr\"]}"},{"key":"default","value":{"baseUrl":"https://api.example.com","timeoutMs":3000,"retries":2},"conditions":"*"}],"hash":"cB9cwkUYbx"},"supportContact":{"type":"string","defaultValue":"support@example.com","overrides":[{"key":"dutch","value":"support-nl@example.com","conditions":"{\"attribute\":\"locale\",\"operator\":\"equals\",\"value\":\"nl-NL\"}"},{"key":"default","value":"support@example.com","conditions":"*"}],"hash":"oCe4FwemLm"}}}