This sets up the infrastructure needed to continue implementing the onboarding UI for create and import of wallets. By fleshing out the global state management in the app now, we can better manage asynchronous IO to avoid blocking the UI.
This adds:
- Load and persistence a wallet in encrypted preferences
- The stored data is written as a single JSON object, as opposed to multiple entries, to ensure atomic writes
- The data is versioned, so that we can change the JSON format readily in the future
- Detection of application state, e.g. onboarding versus loading the user's wallet
- Touch points to initialize the SDK
Note that if we want to run tests from each module on older Android versions, we would need to enable desugaring for each module that is using newer JDK features. For now, this prevents the app itself from crashing on devices with older versions of Android
Provides infrastructure to help us track exactly what build of the app is running. This provides the ability to implement a number of features in the future
- Displaying build version in an About screen
- Automatically versioning with Git commit count as an incrementing version number
- Injection of secrets, API keys, or other behaviors into the build so that the app can leverage them at runtime. The secrets can be securely stored as environment variables (e.g. on CI), so they don't need to be committed to the repository.
This adds infrastructure to read/write preferences, with both a multiplatform wrapper and an Android-specific implementation.
This implementation is primarily designed to cover the initial needs of implementing the wallet SDK integration for issue #28 for securely storing keys (with encryption) for the user's wallet.