From 3f33cac3ed3cc83189ee8a316953c43c72b0841d Mon Sep 17 00:00:00 2001 From: shilangyu Date: Wed, 11 May 2022 22:11:07 +0200 Subject: [PATCH] Upgrade to flutter 3 --- .github/workflows/ci.yml | 4 ---- .github/workflows/release.yml | 4 ---- README.md | 6 +----- linux/flutter/generated_plugins.cmake | 8 ++++++++ pubspec.lock | 20 ++++++++++---------- pubspec.yaml | 4 ++-- windows/flutter/generated_plugins.cmake | 8 ++++++++ 7 files changed, 29 insertions(+), 25 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 931bfb7..9ad4bdd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -91,10 +91,6 @@ jobs: sudo apt-get update -y sudo apt-get install -y clang cmake ninja-build pkg-config libgtk-3-dev libblkid-dev - - name: Enable linux support - run: | - flutter config --enable-linux-desktop - - name: Build run: | flutter build linux --release --target lib/main_prod.dart diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b8a10b3..cc3245e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -90,10 +90,6 @@ jobs: sudo apt-get update -y sudo apt-get install -y clang cmake ninja-build pkg-config libgtk-3-dev libblkid-dev - - name: Enable linux support - run: | - flutter config --enable-linux-desktop - - name: Build run: | flutter build linux --release --target lib/main_prod.dart diff --git a/README.md b/README.md index fe48f30..0eef476 100644 --- a/README.md +++ b/README.md @@ -44,11 +44,7 @@ The apk will be in `build/app/outputs/flutter-apk/app-prod-release.apk` ### Linux 1. Make sure you have the additional [linux requirements](https://flutter.dev/desktop#additional-linux-requirements) (verify with `flutter doctor`) -2. Enable linux desktop: - ```sh - flutter config --enable-linux-desktop - ``` -3. Build: `flutter build linux --target lib/main_prod.dart --release` +2. Build: `flutter build linux --target lib/main_prod.dart --release` The executable will be in `build/linux/x64/release/bundle/lemmur` (be aware, however, that this executable is not standalone) diff --git a/linux/flutter/generated_plugins.cmake b/linux/flutter/generated_plugins.cmake index 1fc8ed3..f16b4c3 100644 --- a/linux/flutter/generated_plugins.cmake +++ b/linux/flutter/generated_plugins.cmake @@ -6,6 +6,9 @@ list(APPEND FLUTTER_PLUGIN_LIST url_launcher_linux ) +list(APPEND FLUTTER_FFI_PLUGIN_LIST +) + set(PLUGIN_BUNDLED_LIBRARIES) foreach(plugin ${FLUTTER_PLUGIN_LIST}) @@ -14,3 +17,8 @@ foreach(plugin ${FLUTTER_PLUGIN_LIST}) list(APPEND PLUGIN_BUNDLED_LIBRARIES $) list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) endforeach(plugin) + +foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) + add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/linux plugins/${ffi_plugin}) + list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) +endforeach(ffi_plugin) diff --git a/pubspec.lock b/pubspec.lock index c83feb4..786366b 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -147,7 +147,7 @@ packages: name: collection url: "https://pub.dartlang.org" source: hosted - version: "1.15.0" + version: "1.16.0" convert: dependency: transitive description: @@ -196,7 +196,7 @@ packages: name: fake_async url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.3.0" ffi: dependency: transitive description: @@ -447,7 +447,7 @@ packages: name: js url: "https://pub.dartlang.org" source: hosted - version: "0.6.3" + version: "0.6.4" json_annotation: dependency: "direct main" description: @@ -510,7 +510,7 @@ packages: name: material_color_utilities url: "https://pub.dartlang.org" source: hosted - version: "0.1.3" + version: "0.1.4" matrix4_transform: dependency: "direct main" description: @@ -615,7 +615,7 @@ packages: name: path url: "https://pub.dartlang.org" source: hosted - version: "1.8.0" + version: "1.8.1" path_provider: dependency: transitive description: @@ -865,7 +865,7 @@ packages: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.8.1" + version: "1.8.2" stack_trace: dependency: transitive description: @@ -907,7 +907,7 @@ packages: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.4.8" + version: "0.4.9" timeago: dependency: "direct main" description: @@ -991,7 +991,7 @@ packages: name: vector_math url: "https://pub.dartlang.org" source: hosted - version: "2.1.1" + version: "2.1.2" watcher: dependency: transitive description: @@ -1042,5 +1042,5 @@ packages: source: hosted version: "3.1.0" sdks: - dart: ">=2.16.0 <3.0.0" - flutter: ">=2.10.0" + dart: ">=2.17.0 <3.0.0" + flutter: ">=3.0.0" diff --git a/pubspec.yaml b/pubspec.yaml index 2eed916..f69b76a 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -18,8 +18,8 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev version: 0.8.0+19 environment: - sdk: ">=2.16.0 <3.0.0" - flutter: ">=2.10.0 <3.0.0" + sdk: ">=2.17.0 <3.0.0" + flutter: ">=3.0.0 <4.0.0" dependencies: # widgets diff --git a/windows/flutter/generated_plugins.cmake b/windows/flutter/generated_plugins.cmake index 411af46..88b22e5 100644 --- a/windows/flutter/generated_plugins.cmake +++ b/windows/flutter/generated_plugins.cmake @@ -6,6 +6,9 @@ list(APPEND FLUTTER_PLUGIN_LIST url_launcher_windows ) +list(APPEND FLUTTER_FFI_PLUGIN_LIST +) + set(PLUGIN_BUNDLED_LIBRARIES) foreach(plugin ${FLUTTER_PLUGIN_LIST}) @@ -14,3 +17,8 @@ foreach(plugin ${FLUTTER_PLUGIN_LIST}) list(APPEND PLUGIN_BUNDLED_LIBRARIES $) list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) endforeach(plugin) + +foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) + add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/windows plugins/${ffi_plugin}) + list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) +endforeach(ffi_plugin)