chore: upgrade to v4 of the core SDK #234
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Eppo Internal:
ποΈ Fixes related to v4.0.0 SDK migration
π Design Doc: N/A
Motivation and Context
The Android SDK needs to be upgraded to use
sdk-common-jvm:4.0.0-SNAPSHOT, which includes breaking changes to theBaseEppoClientconstructor signature and requires theformatfield in configuration JSON. Without this upgrade, the Android SDK cannot use the latest core library.Description
This PR migrates the Android SDK to be compatible with
sdk-common-jvm:4.0.0-SNAPSHOT. The migration addresses two key changes:1. BaseEppoClient Constructor Signature Change (EppoClient.java:52)
The v4.0.0-SNAPSHOT constructor removed the deprecated
hostparameter:apiKey, sdkName, sdkVersion, host, apiBaseUrl, ...apiKey, sdkName, sdkVersion, apiBaseUrl, ...Solution: Use fallback logic
apiBaseUrl != null ? apiBaseUrl : hostto maintain backward compatibility with code using the deprecated.host()builder method.2. Configuration Format Field Requirement (EppoClientTest.java:712)
v4.0.0 requires a
formatfield in configuration JSON:"format": "CLIENT"for obfuscated/hashed flag keys"format": "SERVER"for plain/unobfuscated keysSolution: Added
"format": "CLIENT"to the pre-seeded cache test data intestDifferentCacheFilesPerKey().How has this been documented?
Code Comments:
No external documentation changes required as these are internal implementation changes that maintain API compatibility. The public SDK API remains unchanged.
How has this been tested?
Unit Tests: β All passing (100%)
./gradlew test BUILD SUCCESSFULIntegration Tests: β All 23/23 passing (100%)
Test Coverage Includes:
.host()method (backward compatibility).apiBaseUrl()methodtestDifferentCacheFilesPerKey)All existing functionality works correctly with the new v4.0.0-SNAPSHOT core library.