Skip to content

Latest commit

 

History

History
98 lines (82 loc) · 6.55 KB

File metadata and controls

98 lines (82 loc) · 6.55 KB

Project setup

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

Host Platform Setup

  1. Install Flutter, pin Flutter version

  2. Install IDEs

    • VS Code
      • Install and enable Dart and Flutter extensions
      • Enable Dart: Use recommended settings via the Command Palette
    • Android Studio
      • Install and enable Dart and Flutter plugins
      • 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
    • (macOS only) xCode
    • (Windows only) Visual Studio
  3. (macOS only) CocoaPods and Ruby setup:

  4. Run flutter doctor and make sure all checks (except version) pass

  5. Clone project repository

  6. Initialize SDK submodule: After cloning, initialize the komodo-defi-sdk-flutter submodule:

    cd gleec-wallet
    git submodule update --init --recursive
  7. Build and run the App for each target platform:

  8. Build release version

Dev Container setup (Web and Android builds only)

  1. Install Docker for your operating system.
  2. Install VS Code
    • Install and enable Dart and Flutter extensions
    • Enable Dart: Use recommended settings via the Command Palette
  3. Install the VSCode Dev Container extension
  4. Open the command palette (Ctrl+Shift+P) and run Remote-Containers: Reopen in Container

Possible Issues

GitHub API 403 rate limit exceeded

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>