Gleec Wallet is a cross-platform application, meaning it can be built for multiple target platforms using the same code base. It is important to note that some target platforms may only be accessible from specific host platforms. Below is a list of all supported host platforms and their corresponding target platforms:
| Host Platform | Target Platform |
|---|---|
| macOS | Web, macOS, iOS, iPadOS, Android |
| Windows | Web, Windows, Android |
| Linux | Web, Linux, Android |
-
Install IDEs
- VS Code
- Install and enable
DartandFlutterextensions - Enable
Dart: Use recommended settingsvia the Command Palette
- Install and enable
- Android Studio
- Install and enable
DartandFlutterplugins - Ensure that the following tools are installed and updated in SDK Manager -> SDK Tools:
- Android SDK Build-Tools
- NDK (Side by side)
- Android command line tools
- CMake
- Install and enable
- (macOS only) xCode
- (Windows only) Visual Studio
Desktop development with C++workload required- Nuget CLI required for Windows desktop builds
- Enable long paths in Windows registry
- VS Code
-
(macOS only) CocoaPods and Ruby setup:
- Ruby: 3.0+ (recommended: 3.4.x). See Ruby setup.
- CocoaPods: 1.15+ (assuming latest Xcode). See CocoaPods installation.
-
Run
flutter doctorand make sure all checks (except version) pass -
Initialize SDK submodule: After cloning, initialize the komodo-defi-sdk-flutter submodule:
cd gleec-wallet git submodule update --init --recursive -
Build and run the App for each target platform:
- Web
- Android mobile
- iOS mobile (macOS host only)
- macOS desktop (macOS host only)
- Windows desktop (Windows host only)
- Linux desktop (Linux host only)
- Install Docker for your operating system.
- Linux: Install Docker for your distribution and add your user to the group by using terminal to run:
sudo usermod -aG docker $USER. - Windows/macOS: Install Docker Desktop for Windows/macOS, and if you are using WSL in Windows, please ensure that the WSL 2 back-end is installed and configured.
- Linux: Install Docker for your distribution and add your user to the group by using terminal to run:
- Install VS Code
- Install and enable
DartandFlutterextensions - Enable
Dart: Use recommended settingsvia the Command Palette
- Install and enable
- Install the VSCode Dev Container extension
- Open the command palette (Ctrl+Shift+P) and run
Remote-Containers: Reopen in Container
If you get a 403 error when trying to build or run your app, it is likely that you have hit the GitHub API rate limit. You can either wait for some time or create and add a personal access token to your environment variables.
NOTE: The name of the environment variable should be GITHUB_API_PUBLIC_READONLY_TOKEN.
export GITHUB_API_PUBLIC_READONLY_TOKEN=<TOKEN>Example of the 403 error message (more likely after multiple repeated builds):
test@test gleec-wallet % flutter build web
Expected to find fonts for (MaterialIcons, packages/komodo_ui_kit/Custom, packages/cupertino_icons/CupertinoIcons), but found (MaterialIcons, packages/komodo_ui_kit/Custom). This usually means you are referring to font families in an IconData class but not including them in the assets section of your pubspec.yaml, are missing the package that would include
them, or are missing "uses-material-design: true".
Font asset "MaterialIcons-Regular.otf" was tree-shaken, reducing it from 1645184 to 13640 bytes (99.2% reduction). Tree-shaking can be disabled by providing the --no-tree-shake-icons flag when building your app.
Target web_release_bundle failed: Error: User-defined transformation of asset "/Users/test/Repos/gleec/gleec-wallet/app_build/build_config.json" failed.
Transformer process terminated with non-zero exit code: 1
Transformer package: komodo_wallet_build_transformer
Full command: /Users/test/fvm/versions/3.22.3/bin/cache/dart-sdk/bin/dart run komodo_wallet_build_transformer --input=/var/folders/p7/4z261zj174l1hw7q7q7pnc200000gn/T/flutter_tools.2WE4fK/build_config.json-transformOutput0.json --output=/var/folders/p7/4z261zj174l1hw7q7q7pnc200000gn/T/flutter_tools.2WE4fK/build_config.json-transformOutput1.json
--fetch_defi_api --fetch_coin_assets --copy_platform_assets --artifact_output_package=web_dex --config_output_path=app_build/build_config.json
stdout:
SHOUT: 2024-09-30 13:18:58.286118: Error running build steps
Exception: Failed to retrieve latest commit hash: master[403]: rate limit exceeded
#0 GithubApiProvider.getLatestCommitHash (package:komodo_wallet_build_transformer/src/steps/github/github_api_provider.dart:92:7)
<asynchronous suspension>
#1 FetchCoinAssetsBuildStep.canSkip (package:komodo_wallet_build_transformer/src/steps/fetch_coin_assets_build_step.dart:139:30)
<asynchronous suspension>
#2 _runStep (file:///Users/test/.pub-cache/git/komodo-defi-sdk-flutter-388f04296a5531c3cdad766269a3040d2b4ee9ac/packages/komodo_wallet_build_transformer/bin/komodo_wallet_build_transformer.dart:224:7)
<asynchronous suspension>
#3 main (file:///Users/test/.pub-cache/git/komodo-defi-sdk-flutter-388f04296a5531c3cdad766269a3040d2b4ee9ac/packages/komodo_wallet_build_transformer/bin/komodo_wallet_build_transformer.dart:189:9)
<asynchronous suspension>