Merge pull request #641 from zjs81/flutter-3.47-upgrade
Upgrade to Flutter 3.47.9 and require it for all builds
This commit is contained in:
10 files changed
+52
-26
No files matched your search
@@ -17,7 +17,7 @@ jobs:
|
||||
java-version: "17"
|
||||
- uses: subosito/flutter-action@v2
|
||||
with:
|
||||
channel: "stable"
|
||||
flutter-version-file: pubspec.yaml
|
||||
cache: true
|
||||
- name: Cache Gradle
|
||||
uses: actions/cache@v4
|
||||
@@ -37,7 +37,7 @@ jobs:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: subosito/flutter-action@v2
|
||||
with:
|
||||
channel: "stable"
|
||||
flutter-version-file: pubspec.yaml
|
||||
cache: true
|
||||
- run: flutter pub get
|
||||
- run: flutter build ios --release --no-codesign --no-pub
|
||||
@@ -122,7 +122,7 @@ jobs:
|
||||
mkdir -p build
|
||||
flutter --version
|
||||
flutter --version --machine > build/flutter-version.json
|
||||
jq -e --arg revision "$FLUTTER_REVISION" '.frameworkVersion == "3.47.4" and .frameworkRevision == $revision' build/flutter-version.json
|
||||
jq -e --arg revision "$FLUTTER_REVISION" --arg version "$(jq -r '.flutter.version' scripts/appimage-tools.json)" '.frameworkVersion == $version and .frameworkRevision == $revision' build/flutter-version.json
|
||||
- name: Install Linux build deps
|
||||
run: |
|
||||
sudo apt-get update
|
||||
@@ -183,7 +183,7 @@ jobs:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: subosito/flutter-action@v2
|
||||
with:
|
||||
channel: "stable"
|
||||
flutter-version-file: pubspec.yaml
|
||||
cache: true
|
||||
- run: flutter pub get
|
||||
- run: flutter build macos --release --no-pub
|
||||
@@ -194,7 +194,7 @@ jobs:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: subosito/flutter-action@v2
|
||||
with:
|
||||
channel: "stable"
|
||||
flutter-version-file: pubspec.yaml
|
||||
cache: true
|
||||
- run: flutter pub get
|
||||
- run: flutter build web --release --no-pub
|
||||
@@ -15,9 +15,7 @@ jobs:
|
||||
- name: Setup Flutter
|
||||
uses: subosito/flutter-action@v2
|
||||
with:
|
||||
channel: 'stable'
|
||||
# Match local development version which provides Dart 3.11.0
|
||||
flutter-version: '3.41.2'
|
||||
flutter-version-file: pubspec.yaml
|
||||
|
||||
- name: Setup Bun
|
||||
uses: oven-sh/setup-bun@v2
|
||||
|
||||
@@ -16,7 +16,16 @@ jobs:
|
||||
- name: Set up Flutter
|
||||
uses: subosito/flutter-action@v2
|
||||
with:
|
||||
channel: stable
|
||||
flutter-version-file: pubspec.yaml
|
||||
|
||||
- name: Check Flutter pins agree
|
||||
run: |
|
||||
pubspec=$(sed -n 's/^ flutter: *//p' pubspec.yaml)
|
||||
appimage=$(jq -r '.flutter.version' scripts/appimage-tools.json)
|
||||
if [ "$pubspec" != "$appimage" ]; then
|
||||
echo "pubspec.yaml pins Flutter $pubspec but scripts/appimage-tools.json pins $appimage" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Install dependencies
|
||||
run: flutter pub get
|
||||
|
||||
@@ -22,7 +22,7 @@ MESHCORE_BUILD_APPIMAGE=0 flutter build linux --release
|
||||
bash scripts/appimage/test_packaging.sh
|
||||
```
|
||||
|
||||
The versioned web build uses `dart run build_pipe:build` (also `bun run build`). Web deployment pins Flutter 3.41.2; Linux packaging uses the SDK pin in `scripts/appimage-tools.json`; other CI jobs track stable. Read `pubspec.yaml` for current app version and dependencies rather than copying them into this guide.
|
||||
The versioned web build uses `dart run build_pipe:build` (also `bun run build`). `pubspec.yaml` pins an exact Flutter release (`environment.flutter`); `flutter pub get` refuses other versions and every CI job reads it via `flutter-version-file`. Linux packaging uses the matching pin in `scripts/appimage-tools.json`, and CI fails if the two differ. The Nix shell does not provide Flutter; use the pinned SDK on PATH. Read `pubspec.yaml` for current app version and dependencies rather than copying them into this guide.
|
||||
|
||||
Linux Release installs generate architecture-matched AppImages using linuxdeploy/GTK and appimagetool: x86_64 on x64 and AArch64 on ARM64. Tools and runtime download automatically with pinned SHA-256 checksums. `MESHCORE_BUILD_APPIMAGE=0` skips packaging at install time, without a CMake cache reset. Debug/Profile are unchanged. Nix-linked x64 bundles and hosts with glibc newer than the pinned baseline trigger an isolated Ubuntu rebuild through an available Podman/Docker engine. Rootless Podman uses `--userns=keep-id` for host-owned bind mounts; see [Linux AppImage](README.md#linux-appimage) for prerequisites, cache/offline behavior and limitations. Preserve binary/data/lib adjacency and nested native assets when changing packaging.
|
||||
|
||||
|
||||
@@ -85,7 +85,7 @@ See the [user documentation](documentation/README.md), [connection guide](docume
|
||||
|
||||
### Architecture
|
||||
|
||||
- **Framework**: Flutter (web deployment pins 3.41.2); Dart SDK constraint `^3.9.2`
|
||||
- **Framework**: Flutter, pinned to an exact release in `pubspec.yaml` (`environment.flutter`); Dart SDK constraint `^3.9.2`
|
||||
- **State Management**: Provider pattern with ChangeNotifier
|
||||
- **BLE Protocol**: Nordic UART Service (NUS) over Bluetooth Low Energy
|
||||
- **Storage**: JSON in SharedPreferences for messages and contacts; files for models, images, and map caches
|
||||
@@ -125,7 +125,7 @@ The matrix describes implemented functionality, not a guarantee that every featu
|
||||
|
||||
### Prerequisites
|
||||
|
||||
- Flutter SDK; web deployment currently pins 3.41.2. The Dart SDK constraint is `^3.9.2` (see `pubspec.yaml`).
|
||||
- Flutter SDK at exactly the version in `pubspec.yaml` under `environment.flutter`. `flutter pub get` refuses any other version; run `flutter upgrade` or check out that release.
|
||||
- Android Studio / Xcode (for mobile development)
|
||||
- A MeshCore-compatible LoRa device
|
||||
|
||||
@@ -184,8 +184,8 @@ downloads must also be available. A packaging failure fails the enabled build,
|
||||
without publishing a stale image as a new artifact.
|
||||
|
||||
GitHub Actions builds ARM64 on a native `ubuntu-24.04-arm` runner. Flutter's
|
||||
Linux release SDK archive is x64-only, so that job bootstraps Flutter 3.47.4
|
||||
from its pinned source revision. Flutter does not support x64-to-ARM64 Linux
|
||||
Linux release SDK archive is x64-only, so that job bootstraps the pinned Flutter
|
||||
release from its source revision in `scripts/appimage-tools.json`. Flutter does not support x64-to-ARM64 Linux
|
||||
cross-builds; use an ARM64 Linux host to build the ARM64 bundle locally. The
|
||||
ARM64 AppImage is CI-built and hardware validation on a Raspberry Pi 5 is still
|
||||
needed for graphics, BLE, USB and inference behavior.
|
||||
@@ -223,8 +223,10 @@ flutter build linux --debug
|
||||
flutter build linux --profile
|
||||
```
|
||||
|
||||
The lockfile currently supplies Flutter 3.47.4 and its matching Dart SDK. The
|
||||
app requires Flutter 3.41.2 or newer. The Linux shell provides wrapped Clang
|
||||
The shell does not provide Flutter, because `pubspec.yaml` pins an exact
|
||||
release that nixpkgs may not package yet. Put that Flutter SDK on PATH before
|
||||
entering the shell; the shell warns when it is missing or the wrong version.
|
||||
The Linux shell provides wrapped Clang
|
||||
compilers, native headers and libraries, and Sysprof capture development files.
|
||||
Android SDK warnings do not prevent Linux builds.
|
||||
|
||||
|
||||
@@ -22,9 +22,6 @@
|
||||
];
|
||||
|
||||
buildInputs = with pkgs; [
|
||||
# Flutter and Dart
|
||||
flutter
|
||||
|
||||
# Java (required for Android development)
|
||||
jdk17
|
||||
|
||||
@@ -50,6 +47,14 @@
|
||||
|
||||
shellHook = ''
|
||||
echo "MeshCore Flutter Development Environment"
|
||||
# Flutter itself is not provided here: pubspec.yaml pins an exact
|
||||
# release that nixpkgs may not have yet. Use that SDK from PATH.
|
||||
required_flutter=$(sed -n 's/^ flutter: *//p' pubspec.yaml 2>/dev/null)
|
||||
if ! command -v flutter >/dev/null; then
|
||||
echo "WARNING: flutter not on PATH; install Flutter $required_flutter"
|
||||
elif ! flutter --version 2>/dev/null | grep -q "^Flutter $required_flutter "; then
|
||||
echo "WARNING: this project requires Flutter $required_flutter; found $(flutter --version 2>/dev/null | head -1)"
|
||||
fi
|
||||
export LD_LIBRARY_PATH="${pkgs.lib.makeLibraryPath [pkgs.gtk3 pkgs.glib pkgs.sysprof pkgs.libdatrie]}:$LD_LIBRARY_PATH"
|
||||
|
||||
# Setup Android SDK in home directory (standard location)
|
||||
|
||||
+5
-1
@@ -16,10 +16,14 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
|
||||
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
||||
# In Windows, build-name is used as the major, minor, and patch parts
|
||||
# of the product and file versions while build-number is used as the build suffix.
|
||||
version: 99.0.1+26
|
||||
version: 99.0.2+27
|
||||
|
||||
environment:
|
||||
sdk: ^3.9.2
|
||||
# Everyone builds with this exact Flutter release; pub get refuses others.
|
||||
# CI reads it via flutter-version-file. Keep scripts/appimage-tools.json in
|
||||
# step when changing it.
|
||||
flutter: 3.47.9
|
||||
|
||||
# Dependencies specify other packages that your package needs in order to work.
|
||||
# To automatically upgrade your package dependencies to the latest versions
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
"ubuntu": "ubuntu:24.04@sha256:fe81560990fae86dc4743202b2cb4d3df98d0bcf949173cecef15ce1127ef852",
|
||||
"glibc": "2.39",
|
||||
"flutter": {
|
||||
"version": "3.47.4",
|
||||
"source_revision": "9584c6713b324636289d067944a46fd6b49df14b",
|
||||
"url": "https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_3.47.4-stable.tar.xz",
|
||||
"sha256": "5b45f0ceda99b9bebdc873e7e69f6450aeb4c30f454b505e2e62fc9255a907d3"
|
||||
"version": "3.47.9",
|
||||
"source_revision": "c197ca5199e9ee5661e865596c9c07294dfab51c",
|
||||
"url": "https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_3.47.9-stable.tar.xz",
|
||||
"sha256": "25ed8c3c29d51a7353f2a944310b478af8214920639524b19c50a19e6c044c5a"
|
||||
},
|
||||
"tools": {
|
||||
"gtk": {
|
||||
|
||||
@@ -38,7 +38,7 @@ bash "$project/scripts/build_appimage.sh" "$project" /missing "$temporary/output
|
||||
assert_fails bash "$project/scripts/build_appimage.sh" \
|
||||
"$project" /missing "$temporary/output" Release riscv64
|
||||
# shellcheck disable=SC2218
|
||||
jq -e '.flutter.source_revision == "9584c6713b324636289d067944a46fd6b49df14b" and
|
||||
jq -e '.flutter.source_revision == "c197ca5199e9ee5661e865596c9c07294dfab51c" and
|
||||
(.tools.x86_64.linuxdeploy.sha256 | length == 64) and
|
||||
(.tools.aarch64.linuxdeploy.sha256 | length == 64) and
|
||||
(.tools.aarch64.appimagetool.sha256 | length == 64) and
|
||||
@@ -87,7 +87,7 @@ cp "$project/scripts/appimage/Dockerfile" "$temporary/project/scripts/appimage/"
|
||||
# shellcheck disable=SC2329
|
||||
jq() {
|
||||
case "$*" in
|
||||
*'.flutter.version'*) printf '3.47.4\n' ;;
|
||||
*'.flutter.version'*) printf '3.47.9\n' ;;
|
||||
*'.ubuntu'*) printf 'ubuntu:24.04\n' ;;
|
||||
*) return 1 ;;
|
||||
esac
|
||||
|
||||
+8
@@ -1,3 +1,11 @@
|
||||
analyzer:
|
||||
exclude:
|
||||
- build/**
|
||||
- android/**
|
||||
- ios/**
|
||||
- windows/**
|
||||
- macos/**
|
||||
- linux/**
|
||||
include: package:flutter_lints/flutter.yaml
|
||||
|
||||
# Additional information about this file can be found at
|
||||
|
||||
Reference in new issue
Block a user