Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
85e1647
chore: remove FEEDBACK_TEST_URL references
CharlVS Aug 1, 2025
e73ce15
Merge pull request #3038 from KomodoPlatform/codex/remove-unused-feed…
CharlVS Aug 5, 2025
30256fe
fix(ui): close dropdown on window resize
CharlVS Aug 5, 2025
3dd68a7
Fix null safety issues in UiDropdown widget
cursoragent Aug 5, 2025
844683e
Merge pull request #3050 from KomodoPlatform/codex/fix-app-freeze-on-…
CharlVS Aug 6, 2025
0d84aa6
fix(build): correct env vars passing to Docker and Dart via --dart-de…
DeckerSU Aug 6, 2025
22a0833
fix(nft): add IPFS gateway resolution, retry, and fallback to improve…
takenagain Aug 6, 2025
9cdf5c1
fix(build): add --no-web-resources-cdn to the web build in build.sh (…
DeckerSU Aug 8, 2025
649001d
Remove .dgph build artifacts from iOS project (#3058)
DeckerSU Aug 11, 2025
26fe733
fix(coin-details): display fiat balance for addresses (#3049)
takenagain Aug 12, 2025
91823e7
Apply consistent "dex address" pill style (#2974)
smk762 Aug 12, 2025
a45e7b4
dispose of scrollbars thoughtfully (#3008)
smk762 Aug 12, 2025
2658d25
chore: roll SDK packages (#3067)
CharlVS Aug 12, 2025
2ee41c3
Only show memo input for Tendermint & ZHTLC (#2998)
smk762 Aug 12, 2025
0351be1
Fix/weak passwd setting (#3101)
smk762 Aug 20, 2025
a6579da
adds a disable geoblock variable (#3102)
gcharang Aug 22, 2025
96423f7
fix(windows, linux, macos): enforce single-instance; focus existing w…
CharlVS Aug 22, 2025
e6dc542
linux: guard `G_APPLICATION_DEFAULT_FLAGS` behind GLib ≥ 2.74, fallba…
DeckerSU Aug 25, 2025
7995423
chore: upgrade Flutter to 3.35.1; roll SDK deps; improve roll script …
CharlVS Aug 27, 2025
fcd85e3
build(sdk): add sdk as git submodule and update deps to path override…
takenagain Aug 27, 2025
7c1ea69
add GitHub Actions workflow to validate Linux build script (#3106)
DeckerSU Aug 27, 2025
b65f54b
chore: fix sdk market data breaking changes (#3109)
takenagain Aug 29, 2025
5e83be8
fix logging of apiCommitHash to output actual value instead of closur…
DeckerSU Aug 31, 2025
bbef719
build(devcontainer): switch to .docker images and Linux-only devconta…
CharlVS Sep 1, 2025
c15fdbe
feat(auth): implement one-click remember me sign-in functionality (#3…
CharlVS Sep 1, 2025
8ede0e2
fix(macos): show file picker by adding user-selected read-only entitl…
CharlVS Sep 2, 2025
b8858c6
fix(dex): resolve precision loss in wallet (#3123)
CharlVS Sep 3, 2025
cf0a393
Tag parent coins as native (#2988)
smk762 Sep 10, 2025
f66f16f
perf(fiat-onramp): re-implement fiat amount debounce to reduce API ca…
takenagain Sep 10, 2025
61d53c1
docs(setup): add ruby installation step for ios and macos builds (#3128)
takenagain Sep 11, 2025
4da682b
fix crash when KomodoDefiSdk is disposed during periodic fetch (#3117)
DeckerSU Sep 11, 2025
93e94db
chore(sdk): update submodule to latest dev (#3130)
CharlVS Sep 12, 2025
043e8d3
fix(asset-list): hide and use placeholders until fiat prices are avai…
takenagain Sep 12, 2025
f2d775d
Clear pubkeys on wallet change or logout (#3144)
CharlVS Sep 15, 2025
5f689c7
fix(auth): restore wallet coins for legacy wallet migrations and seed…
takenagain Sep 15, 2025
49684f1
fix(coins): unauthenticated coin list and chart issues (#3138)
CharlVS Sep 15, 2025
fed5f3a
fix: increase password length to 128 chars (#3141)
CharlVS Sep 16, 2025
970dd30
build: clean submodules before update to fix build errors (#3139)
DeckerSU Sep 16, 2025
5848741
fix(security): Consistent 128‑char password handling and hardened aut…
CharlVS Sep 18, 2025
1669ea2
fix(custom-token-import): check platform in deduplication and update …
takenagain Sep 22, 2025
b49bc45
feat(feedback): comprehensive feedback system overhaul with screensho…
CharlVS Sep 23, 2025
fc1fe61
feat(wallet): validate wallet name and allow import renaming (#2792)
CharlVS Sep 25, 2025
bfb650d
feat: route sdk logs through app logger (#3159)
CharlVS Sep 30, 2025
d33ba24
feat(geo): bouncer for privacy coin blocking (#3150)
CharlVS Oct 1, 2025
0d03442
feat(analytics): multi-provider (Firebase+Matomo), queueing with pers…
CharlVS Oct 2, 2025
a6afdf0
feat(build): add Matomo tracking params validation in build script (#…
DeckerSU Oct 2, 2025
c91431e
feat: ZHTLC support (#3158)
takenagain Oct 3, 2025
a58c900
ci: fix missing secrets and remove duplicate steps in CI workflows (#…
CharlVS Oct 4, 2025
7a532c4
chore: update SDK to chore/kw-release-v0.9.3 branch (#3170)
CharlVS Oct 4, 2025
1357991
chore: prepare version 0.9.3 (#3171)
CharlVS Oct 5, 2025
f1a92f9
docs(changelog): link SDK PRs with short labels and mark SDK items (#…
CharlVS Oct 5, 2025
137dd4f
chore: update SDK submodule to dev branch (679fd92) (#3174)
CharlVS Oct 7, 2025
2144a67
change developement team to real one (WDS9WYN969->8HPBYKKKQP) (#3177)
DeckerSU Oct 13, 2025
f042412
feat(ci): append short commit hash to upload-artifact filenames (#3181)
smk762 Oct 14, 2025
8cd8b52
fix(market-maker-bot): sell coin dropdown reverts to previous coin, w…
takenagain Oct 16, 2025
8ee26a4
fix(zcoin): ARRR not reappearing in coins list after deactivation and…
takenagain Oct 16, 2025
a1ce943
chore: roll SDK to update KDF v2.5.2-beta (#3190)
CharlVS Oct 16, 2025
c838de8
chore(analytics): update completed events and remove scroll attempt t…
CharlVS Oct 18, 2025
92d5140
chore(sdk): roll to fix/asset-chain-tagging (#3199)
CharlVS Oct 20, 2025
2ec7a2e
chore(build): Add macOS production scheme and Developer ID Applicatio…
DeckerSU Oct 20, 2025
6765fa9
use AnalyticsRepo to enqueue NFT analytics events (#3202)
smk762 Oct 20, 2025
28c9734
fix(icons,splash): mirror native app icons and startup screens from l…
CharlVS Oct 20, 2025
65b6a8b
chore(sdk): roll komodo_defi_sdk submodule to latest dev (#3205)
CharlVS Oct 21, 2025
9a9564d
Merge branch 'main' into dev
CharlVS Oct 21, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 3 additions & 0 deletions .cursorignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Add directories or file patterns to ignore during indexing (e.g. foo/ or *.csv)
AGENTS/
AGENTS.md
117 changes: 0 additions & 117 deletions .devcontainer/Dockerfile

This file was deleted.

21 changes: 13 additions & 8 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
{
"name": "flutter_docker",
"context": "..",
"dockerFile": "Dockerfile",
"dockerFile": "../.docker/komodo-wallet-android.dockerfile",
"remoteUser": "komodo",
"workspaceFolder": "/workspaces/komodo-wallet",
"postCreateCommand": "sudo chown -R komodo:komodo /workspaces/komodo-wallet",
"postAttachCommand": "flutter pub get",
"runArgs": [
"--privileged",
"-v",
"/dev/bus/usb:/dev/bus/usb"
],
"initializeCommand": "docker build -t komodo/android-sdk:35 -f ${localWorkspaceFolder}/.docker/android-sdk.dockerfile ${localWorkspaceFolder}",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Verify Android SDK version consistency across configuration files.

Line 7 builds komodo/android-sdk:35, but the PR context indicates that .docker/android-sdk.dockerfile was updated to platform 36. Ensure the tag version is consistent across:

  • initializeCommand in devcontainer.json
  • Platform version in android-sdk.dockerfile
  • Gradle wrapper version updates

🏁 Script executed:

#!/bin/bash
# Description: Check Android platform versions across Docker and Gradle configs

# Check android-sdk.dockerfile for platform version
rg -nP 'platforms;android-\d+|platform.*\d+' .docker/android-sdk.dockerfile

# Check for android-sdk tag references
rg -nP 'android-sdk:\d+' .devcontainer/

Length of output: 181


🏁 Script executed:

#!/bin/bash
# Locate dockerfile
echo "Dockerfile path:"
fd -t f android-sdk.dockerfile

# Show Android platform version in the dockerfile
echo "Platform entries:"
rg -nP 'platforms;android-\d+' $(fd -t f android-sdk.dockerfile)

# Locate Gradle wrapper properties
echo "Gradle wrapper path:"
fd -t f gradle-wrapper.properties

# Show Gradle distribution version
echo "Gradle distributionUrl:"
rg -nP 'distributionUrl.*gradle-[0-9.]+-bin\.zip' $(fd -t f gradle-wrapper.properties)

Length of output: 210


🏁 Script executed:

#!/bin/bash
# Show full contents of the Dockerfile to confirm Android platform version
cat .docker/android-sdk.dockerfile || echo "File not found"

Length of output: 2866


Update devcontainer.json initializeCommand image tag to 36.
The devcontainer is building komodo/android-sdk:35 but the Dockerfile’s ANDROID_PLATFORM_VERSION is 36.

🤖 Prompt for AI Agents
In .devcontainer/devcontainer.json around line 7 the initializeCommand builds
image tag komodo/android-sdk:35 while the Dockerfile sets
ANDROID_PLATFORM_VERSION to 36; update the initializeCommand image tag to
komodo/android-sdk:36 so the built image tag matches the Dockerfile platform
version and keep the tag consistent across the devcontainer and Dockerfile.

"postCreateCommand": "bash -lc '.devcontainer/postCreate.sh'",
"postAttachCommand": "flutter pub get --enforce-lockfile",
// Security Note: The following runArgs are commented out for security reasons.
// Uncomment these lines only when you need to debug Android apps via USB connection
// through the dev container. The --privileged flag grants extended privileges to
// the container, and USB device mounting allows direct hardware access.
// "runArgs": [
// "--privileged",
// "-v",
// "/dev/bus/usb:/dev/bus/usb"
// ],
"forwardPorts": [
8081,
5037
Expand Down
13 changes: 13 additions & 0 deletions .devcontainer/postCreate.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env bash

set -euo pipefail

# Initialize and pin submodules to the recorded commits
git submodule sync --recursive
git submodule update --init --recursive --checkout

# Recommended git settings for submodules
git config fetch.recurseSubmodules on-demand
git config submodule.sdk.ignore dirty

echo "postCreate: completed submodule initialization and permissions setup"
4 changes: 2 additions & 2 deletions .docker/android-sdk.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ ENV ANDROID_SDK_ROOT=$ANDROID_HOME \
ENV ANDROID_SDK_TOOLS_VERSION=11076708

# https://developer.android.com/studio/releases/build-tools
ENV ANDROID_PLATFORM_VERSION=35
ENV ANDROID_PLATFORM_VERSION=36
ENV ANDROID_BUILD_TOOLS_VERSION=35.0.1
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Upgrade build tools alongside the API 36 bump

We now install platforms;android-36, but still ask for build-tools 35.0.1. Those binaries (especially aapt2) don’t understand the new API 36 resources, so Gradle builds will start failing with “resource not found” once dependencies reference the new attributes. Please bump to the matching build tools release.

-ENV ANDROID_BUILD_TOOLS_VERSION=35.0.1
+ENV ANDROID_BUILD_TOOLS_VERSION=36.0.0
🤖 Prompt for AI Agents
In .docker/android-sdk.dockerfile around line 30, the Dockerfile sets
ANDROID_BUILD_TOOLS_VERSION=35.0.1 while the image now installs
platforms;android-36; bump the build-tools variable to the matching 36.x release
(e.g., 36.0.0 or the latest 36.x) so aapt2 and other build-tools understand API
36 resources; update the ENV value to the chosen 36.x version and ensure any SDK
install commands that reference the build-tools use that updated variable.


# https://developer.android.com/ndk/downloads
ENV ANDROID_NDK_VERSION=27.2.12479018
ENV ANDROID_NDK_VERSION=27.3.13750724

RUN set -o xtrace \
&& sudo chown -R $USER:$USER /opt \
Expand Down
91 changes: 71 additions & 20 deletions .docker/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,19 @@ fi

echo "Building with target: $BUILD_TARGET, mode: $BUILD_MODE"

# Ensure submodule is initialized and pinned to the recorded commit
if command -v git >/dev/null 2>&1; then
echo "Ensuring SDK submodule is initialized and pinned..."
# Keep local submodule config in sync with .gitmodules (e.g., update=checkout)
git submodule sync --recursive || true
# Clean submodules to discard local changes and untracked files
git submodule foreach --recursive "git reset --hard && git clean -fdx" || true
# Initialize and checkout recorded commits (pinned)
git submodule update --init --recursive --checkout || true
# Enable on-demand fetch for submodules (helps when switching branches)
git config fetch.recurseSubmodules on-demand || true
fi

if [ "$(uname)" = "Darwin" ]; then
PLATFORM_FLAG="--platform linux/amd64"
else
Expand All @@ -42,34 +55,72 @@ mkdir -p ./build

COMMIT_HASH=$(git rev-parse --short HEAD | cut -c1-7)

# Only pass GITHUB_API_PUBLIC_READONLY_TOKEN as environment variable
ENV_ARGS=""
ENV_VARS="GITHUB_API_PUBLIC_READONLY_TOKEN TRELLO_API_KEY \
TRELLO_TOKEN TRELLO_BOARD_ID TRELLO_LIST_ID \
FEEDBACK_API_KEY FEEDBACK_PRODUCTION_URL FEEDBACK_TEST_URL \
COMMIT_HASH"
if [ -n "$GITHUB_API_PUBLIC_READONLY_TOKEN" ]; then
ENV_ARGS="-e GITHUB_API_PUBLIC_READONLY_TOKEN=$GITHUB_API_PUBLIC_READONLY_TOKEN"
fi

for VAR in $ENV_VARS; do
case "$VAR" in
GITHUB_API_PUBLIC_READONLY_TOKEN) VALUE=$GITHUB_API_PUBLIC_READONLY_TOKEN ;;
TRELLO_API_KEY) VALUE=$TRELLO_API_KEY ;;
TRELLO_TOKEN) VALUE=$TRELLO_TOKEN ;;
TRELLO_BOARD_ID) VALUE=$TRELLO_BOARD_ID ;;
TRELLO_LIST_ID) VALUE=$TRELLO_LIST_ID ;;
FEEDBACK_API_KEY) VALUE=$FEEDBACK_API_KEY ;;
FEEDBACK_PRODUCTION_URL) VALUE=$FEEDBACK_PRODUCTION_URL ;;
FEEDBACK_TEST_URL) VALUE=$FEEDBACK_TEST_URL ;;
COMMIT_HASH) VALUE=$COMMIT_HASH ;;
*) VALUE= ;;
esac
# Build command logic
BUILD_COMMAND="flutter build $BUILD_TARGET --no-pub --$BUILD_MODE"
# Prepare build command with feedback service credentials
BUILD_CMD="$BUILD_COMMAND"
# Add commit hash to build command
BUILD_CMD="$BUILD_CMD --dart-define=COMMIT_HASH=$COMMIT_HASH"

[ -n "$VALUE" ] && ENV_ARGS="$ENV_ARGS -e $VAR=$VALUE"
done
# Check and add the shared Trello board and list IDs if they are available
HAVE_TRELLO_IDS=false
if [ -n "$TRELLO_BOARD_ID" ] && [ -n "$TRELLO_LIST_ID" ]; then
HAVE_TRELLO_IDS=true
# Add these shared IDs to the build command
BUILD_CMD="$BUILD_CMD --dart-define=TRELLO_BOARD_ID=$TRELLO_BOARD_ID"
BUILD_CMD="$BUILD_CMD --dart-define=TRELLO_LIST_ID=$TRELLO_LIST_ID"
fi

# Add Trello feedback service variables if ALL required values are provided
if [ "$HAVE_TRELLO_IDS" = true ] && [ -n "$TRELLO_API_KEY" ] && [ -n "$TRELLO_TOKEN" ]; then
echo "Adding Trello feedback service configuration"
BUILD_CMD="$BUILD_CMD --dart-define=TRELLO_API_KEY=$TRELLO_API_KEY"
BUILD_CMD="$BUILD_CMD --dart-define=TRELLO_TOKEN=$TRELLO_TOKEN"
else
# If any Trello credential is missing, log a message but continue the build
if [ -n "$TRELLO_API_KEY" ] || [ -n "$TRELLO_TOKEN" ] || [ -n "$TRELLO_BOARD_ID" ] || [ -n "$TRELLO_LIST_ID" ]; then
echo "Warning: Incomplete Trello credentials provided. All Trello credentials must be present to include them in the build."
fi
fi

# Add Cloudflare feedback service variables if ALL required values are provided
# Note: Cloudflare also needs the Trello board and list IDs to be available
if [ "$HAVE_TRELLO_IDS" = true ] && [ -n "$FEEDBACK_API_KEY" ] && [ -n "$FEEDBACK_PRODUCTION_URL" ]; then
echo "Adding Cloudflare feedback service configuration"
BUILD_CMD="$BUILD_CMD --dart-define=FEEDBACK_API_KEY=$FEEDBACK_API_KEY"
BUILD_CMD="$BUILD_CMD --dart-define=FEEDBACK_PRODUCTION_URL=$FEEDBACK_PRODUCTION_URL"
else
# If any Cloudflare credential is missing, log a message but continue the build
if [ -n "$FEEDBACK_API_KEY" ] || [ -n "$FEEDBACK_PRODUCTION_URL" ] ||
([ -n "$TRELLO_BOARD_ID" ] || [ -n "$TRELLO_LIST_ID" ]); then
echo "Warning: Incomplete Cloudflare feedback credentials provided. All Cloudflare credentials and Trello board/list IDs must be present to include them in the build."
fi
fi
# Add Matomo tracking variables if ALL required values are provided
# Matomo configuration only used when both are non-empty
if [ -n "$MATOMO_URL" ] && [ -n "$MATOMO_SITE_ID" ]; then
echo "Adding Matomo tracking configuration"
BUILD_CMD="$BUILD_CMD --dart-define=MATOMO_URL=$MATOMO_URL"
BUILD_CMD="$BUILD_CMD --dart-define=MATOMO_SITE_ID=$MATOMO_SITE_ID"
else
echo "Warning: Missing Matomo parameters. Both MATOMO_URL and MATOMO_SITE_ID must be provided."
fi
# Add web-specific build arguments if the target is web
if [ "$BUILD_TARGET" = "web" ]; then
echo "Adding web-specific build arguments: --no-web-resources-cdn"
BUILD_CMD="$BUILD_CMD --no-web-resources-cdn"
fi
# Use the provided arguments for flutter build
# Build a second time if needed, as asset downloads will require a rebuild on the first attempt
docker run $PLATFORM_FLAG --rm -v ./build:/app/build \
-v $(pwd):/app \
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Quote the workspace path in docker run.

$(pwd) is unquoted, so builds break when the repository path contains spaces (or characters subject to globbing). Please quote it.

-  -v $(pwd):/app \
+  -v "$(pwd)":/app \
🧰 Tools
🪛 Shellcheck (0.11.0)

[warning] 113-113: Quote this to prevent word splitting.

(SC2046)

🤖 Prompt for AI Agents
In .docker/build.sh around line 113, the docker run volume mount uses an
unquoted $(pwd), which breaks when the repository path contains spaces or glob
characters; update the argument to quote the expansion (change -v $(pwd):/app \
to -v "$(pwd)":/app \) so the shell treats the entire path as a single argument.

-u "$HOST_UID:$HOST_GID" \
$ENV_ARGS \
komodo/komodo-wallet:latest sh -c \
"sudo chown -R komodo:komodo /app/build; flutter pub get --enforce-lockfile; flutter build web --no-pub || true; flutter build $BUILD_TARGET --config-only; flutter build $BUILD_TARGET --no-pub --dart-define=COMMIT_HASH=$COMMIT_HASH --$BUILD_MODE"
"sudo chown -R komodo:komodo /app/build; flutter pub get --enforce-lockfile; $BUILD_COMMAND || true; flutter build $BUILD_TARGET --config-only; $BUILD_CMD"
4 changes: 2 additions & 2 deletions .docker/komodo-wallet-android.dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM komodo/android-sdk:35 AS final

ENV FLUTTER_VERSION="3.32.5"
ENV FLUTTER_VERSION="3.35.3"
ENV HOME="/home/komodo"
ENV USER="komodo"
ENV PATH=$PATH:$HOME/flutter/bin
Expand All @@ -14,4 +14,4 @@ RUN curl -O https://storage.googleapis.com/flutter_infra_release/releases/stable
rm flutter_linux_${FLUTTER_VERSION}-stable.tar.xz && \
flutter config --no-analytics && \
yes "y" | flutter doctor --android-licenses && \
flutter doctor
flutter doctor
2 changes: 1 addition & 1 deletion .github/actions/flutter-deps/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ runs:
uses: subosito/flutter-action@v2
with:
# NB! Keep up-to-date with the flutter version used for development
flutter-version: "3.32.5"
flutter-version: "3.35.3"
channel: "stable"

- name: Prepare build directory
Expand Down
43 changes: 35 additions & 8 deletions .github/actions/generate-assets/action.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: "Generates assets"
description: "Runs the flutter build command to transform and generate assets for the deployment build"
name: "Fetch packages, generate assets, and build"
description: "Runs a dry-run flutter build to fetch/register assets, then runs the actual build for deployment"

inputs:
GITHUB_TOKEN:
Expand Down Expand Up @@ -37,8 +37,18 @@ inputs:
description: "Production URL for Cloudflare feedback service"
required: false
default: ""
FEEDBACK_TEST_URL:
description: "Test URL for Cloudflare feedback service (debug mode)"

# Optional Matomo analytics configuration
MATOMO_URL:
description: "Matomo server base URL"
required: false
default: ""
MATOMO_SITE_ID:
description: "Matomo site ID"
required: false
default: ""
ANALYTICS_DISABLED:
description: "Disable analytics collection (true/false)"
required: false
default: ""

Expand Down Expand Up @@ -71,7 +81,9 @@ runs:
TRELLO_LIST_ID: ${{ inputs.TRELLO_LIST_ID }}
FEEDBACK_API_KEY: ${{ inputs.FEEDBACK_API_KEY }}
FEEDBACK_PRODUCTION_URL: ${{ inputs.FEEDBACK_PRODUCTION_URL }}
FEEDBACK_TEST_URL: ${{ inputs.FEEDBACK_TEST_URL }}
MATOMO_URL: ${{ inputs.MATOMO_URL }}
MATOMO_SITE_ID: ${{ inputs.MATOMO_SITE_ID }}
ANALYTICS_DISABLED: ${{ inputs.ANALYTICS_DISABLED }}
run: |
echo "Running \`flutter build\` to generate assets for the deployment build"

Expand Down Expand Up @@ -113,19 +125,34 @@ runs:

# Add Cloudflare feedback service variables if ALL required values are provided
# Note: Cloudflare also needs the Trello board and list IDs to be available
if [ "$HAVE_TRELLO_IDS" = true ] && [ -n "$FEEDBACK_API_KEY" ] && [ -n "$FEEDBACK_PRODUCTION_URL" ] && [ -n "$FEEDBACK_TEST_URL" ]; then
if [ "$HAVE_TRELLO_IDS" = true ] && [ -n "$FEEDBACK_API_KEY" ] && [ -n "$FEEDBACK_PRODUCTION_URL" ]; then
echo "Adding Cloudflare feedback service configuration"
BUILD_CMD="$BUILD_CMD --dart-define=FEEDBACK_API_KEY=$FEEDBACK_API_KEY"
BUILD_CMD="$BUILD_CMD --dart-define=FEEDBACK_PRODUCTION_URL=$FEEDBACK_PRODUCTION_URL"
BUILD_CMD="$BUILD_CMD --dart-define=FEEDBACK_TEST_URL=$FEEDBACK_TEST_URL"
else
# If any Cloudflare credential is missing, log a message but continue the build
if [ -n "$FEEDBACK_API_KEY" ] || [ -n "$FEEDBACK_PRODUCTION_URL" ] || [ -n "$FEEDBACK_TEST_URL" ] ||
if [ -n "$FEEDBACK_API_KEY" ] || [ -n "$FEEDBACK_PRODUCTION_URL" ] ||
([ -n "$TRELLO_BOARD_ID" ] || [ -n "$TRELLO_LIST_ID" ]); then
echo "Warning: Incomplete Cloudflare feedback credentials provided. All Cloudflare credentials and Trello board/list IDs must be present to include them in the build."
fi
fi

HAS_MATOMO_CONFIG=false
if [ -n "$MATOMO_URL" ] && [ -n "$MATOMO_SITE_ID" ]; then
HAS_MATOMO_CONFIG=true
echo "Adding Matomo analytics configuration"
BUILD_CMD="$BUILD_CMD --dart-define=MATOMO_URL=$MATOMO_URL"
BUILD_CMD="$BUILD_CMD --dart-define=MATOMO_SITE_ID=$MATOMO_SITE_ID"
fi

if [ "$ANALYTICS_DISABLED" = "true" ]; then
echo "Disabling analytics via ANALYTICS_DISABLED input"
BUILD_CMD="$BUILD_CMD --dart-define=ANALYTICS_DISABLED=true"
elif [ "$CI" = "true" ] && [ "$HAS_MATOMO_CONFIG" != "true" ]; then
echo "CI environment detected without Matomo config. Disabling analytics for this build."
BUILD_CMD="$BUILD_CMD --dart-define=CI=true --dart-define=ANALYTICS_DISABLED=true"
fi

# Run flutter build once to download coin icons and config files.
# This step is expected to "fail", since flutter build has to run again
# after the assets are downloaded to register them in AssetManifest.bin
Expand Down
Loading
Loading