From dd034b1fcfb1f60d66a6edeba1205e95a9c4c050 Mon Sep 17 00:00:00 2001 From: fzyzcjy Date: Fri, 17 May 2024 20:18:00 +0800 Subject: [PATCH 1/6] feat: bump --- .github/workflows/ci.yaml | 4 ++-- .github/workflows/post_release.yaml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 3bb4e91f7f..d34869e8ef 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -10,8 +10,8 @@ on: env: CARGO_TERM_COLOR: always FRB_MAIN_RUST_VERSION: 1.74.0 - FRB_MAIN_DART_VERSION: 3.3.0 - FRB_MAIN_FLUTTER_VERSION: 3.19.2 + FRB_MAIN_DART_VERSION: 3.4.0 + FRB_MAIN_FLUTTER_VERSION: 3.22.0 concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} diff --git a/.github/workflows/post_release.yaml b/.github/workflows/post_release.yaml index f61fa5cab1..7f431ec990 100644 --- a/.github/workflows/post_release.yaml +++ b/.github/workflows/post_release.yaml @@ -12,8 +12,8 @@ on: env: CARGO_TERM_COLOR: always FRB_MAIN_RUST_VERSION: 1.74.0 - FRB_MAIN_DART_VERSION: 3.3.0 - FRB_MAIN_FLUTTER_VERSION: 3.19.2 + FRB_MAIN_DART_VERSION: 3.4.0 + FRB_MAIN_FLUTTER_VERSION: 3.22.0 jobs: test_mimic_quickstart: From 262167039bd874ce6cc9daad7cb415fc76a05101 Mon Sep 17 00:00:00 2001 From: fzyzcjy Date: Fri, 17 May 2024 20:35:48 +0800 Subject: [PATCH 2/6] chore: fix linter --- frb_example/gallery/lib/main.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frb_example/gallery/lib/main.dart b/frb_example/gallery/lib/main.dart index 60b73b0cf6..2e6c931969 100644 --- a/frb_example/gallery/lib/main.dart +++ b/frb_example/gallery/lib/main.dart @@ -15,7 +15,7 @@ class MyApp extends StatelessWidget { return MaterialApp( theme: ThemeData( colorScheme: const ColorScheme.light( - background: Colors.white, + surface: Colors.white, primary: Colors.blue, ), ), From 7a4eae86b469d53ceb0a143d284fea5b99c9a03b Mon Sep 17 00:00:00 2001 From: fzyzcjy Date: Fri, 17 May 2024 20:39:28 +0800 Subject: [PATCH 3/6] chore: gen --- frb_example/flutter_via_create/.metadata | 30 ++++++------ .../android/app/build.gradle | 47 ++++++++----------- .../android/app/src/main/AndroidManifest.xml | 3 +- .../flutter_via_create/android/build.gradle | 4 +- .../android/gradle.properties | 2 +- .../android/settings.gradle | 5 +- .../ios/Runner/AppDelegate.swift | 2 +- .../macos/RunnerTests/RunnerTests.swift | 2 +- frb_example/flutter_via_create/pubspec.lock | 28 +++++------ frb_example/flutter_via_create/pubspec.yaml | 2 +- frb_example/flutter_via_create/web/index.html | 23 +-------- .../windows/runner/utils.cpp | 4 +- frb_example/flutter_via_integrate/.metadata | 30 ++++++------ .../android/app/build.gradle | 47 ++++++++----------- .../android/app/src/main/AndroidManifest.xml | 3 +- .../android/build.gradle | 4 +- .../android/gradle.properties | 2 +- .../android/settings.gradle | 5 +- .../ios/Runner/AppDelegate.swift | 2 +- .../macos/RunnerTests/RunnerTests.swift | 2 +- .../flutter_via_integrate/pubspec.lock | 28 +++++------ .../flutter_via_integrate/pubspec.yaml | 2 +- .../flutter_via_integrate/web/index.html | 23 +-------- .../windows/runner/utils.cpp | 4 +- 24 files changed, 122 insertions(+), 182 deletions(-) diff --git a/frb_example/flutter_via_create/.metadata b/frb_example/flutter_via_create/.metadata index bae49f356f..8ca14df433 100644 --- a/frb_example/flutter_via_create/.metadata +++ b/frb_example/flutter_via_create/.metadata @@ -4,7 +4,7 @@ # This file should be version controlled and should not be manually edited. version: - revision: "7482962148e8d758338d8a28f589f317e1e42ba4" + revision: "5dcb86f68f239346676ceb1ed1ea385bd215fba1" channel: "stable" project_type: app @@ -13,26 +13,26 @@ project_type: app migration: platforms: - platform: root - create_revision: 7482962148e8d758338d8a28f589f317e1e42ba4 - base_revision: 7482962148e8d758338d8a28f589f317e1e42ba4 + create_revision: 5dcb86f68f239346676ceb1ed1ea385bd215fba1 + base_revision: 5dcb86f68f239346676ceb1ed1ea385bd215fba1 - platform: android - create_revision: 7482962148e8d758338d8a28f589f317e1e42ba4 - base_revision: 7482962148e8d758338d8a28f589f317e1e42ba4 + create_revision: 5dcb86f68f239346676ceb1ed1ea385bd215fba1 + base_revision: 5dcb86f68f239346676ceb1ed1ea385bd215fba1 - platform: ios - create_revision: 7482962148e8d758338d8a28f589f317e1e42ba4 - base_revision: 7482962148e8d758338d8a28f589f317e1e42ba4 + create_revision: 5dcb86f68f239346676ceb1ed1ea385bd215fba1 + base_revision: 5dcb86f68f239346676ceb1ed1ea385bd215fba1 - platform: linux - create_revision: 7482962148e8d758338d8a28f589f317e1e42ba4 - base_revision: 7482962148e8d758338d8a28f589f317e1e42ba4 + create_revision: 5dcb86f68f239346676ceb1ed1ea385bd215fba1 + base_revision: 5dcb86f68f239346676ceb1ed1ea385bd215fba1 - platform: macos - create_revision: 7482962148e8d758338d8a28f589f317e1e42ba4 - base_revision: 7482962148e8d758338d8a28f589f317e1e42ba4 + create_revision: 5dcb86f68f239346676ceb1ed1ea385bd215fba1 + base_revision: 5dcb86f68f239346676ceb1ed1ea385bd215fba1 - platform: web - create_revision: 7482962148e8d758338d8a28f589f317e1e42ba4 - base_revision: 7482962148e8d758338d8a28f589f317e1e42ba4 + create_revision: 5dcb86f68f239346676ceb1ed1ea385bd215fba1 + base_revision: 5dcb86f68f239346676ceb1ed1ea385bd215fba1 - platform: windows - create_revision: 7482962148e8d758338d8a28f589f317e1e42ba4 - base_revision: 7482962148e8d758338d8a28f589f317e1e42ba4 + create_revision: 5dcb86f68f239346676ceb1ed1ea385bd215fba1 + base_revision: 5dcb86f68f239346676ceb1ed1ea385bd215fba1 # User provided section diff --git a/frb_example/flutter_via_create/android/app/build.gradle b/frb_example/flutter_via_create/android/app/build.gradle index a68d619dfd..da523b306b 100644 --- a/frb_example/flutter_via_create/android/app/build.gradle +++ b/frb_example/flutter_via_create/android/app/build.gradle @@ -1,67 +1,58 @@ plugins { id "com.android.application" id "kotlin-android" + // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins. id "dev.flutter.flutter-gradle-plugin" } def localProperties = new Properties() -def localPropertiesFile = rootProject.file('local.properties') +def localPropertiesFile = rootProject.file("local.properties") if (localPropertiesFile.exists()) { - localPropertiesFile.withReader('UTF-8') { reader -> + localPropertiesFile.withReader("UTF-8") { reader -> localProperties.load(reader) } } -def flutterVersionCode = localProperties.getProperty('flutter.versionCode') +def flutterVersionCode = localProperties.getProperty("flutter.versionCode") if (flutterVersionCode == null) { - flutterVersionCode = '1' + flutterVersionCode = "1" } -def flutterVersionName = localProperties.getProperty('flutter.versionName') +def flutterVersionName = localProperties.getProperty("flutter.versionName") if (flutterVersionName == null) { - flutterVersionName = '1.0' + flutterVersionName = "1.0" } android { - namespace "com.example.flutter_via_create" - compileSdk flutter.compileSdkVersion - ndkVersion flutter.ndkVersion + namespace = "com.example.flutter_via_create" + compileSdk = flutter.compileSdkVersion + ndkVersion = flutter.ndkVersion compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 - } - - kotlinOptions { - jvmTarget = '1.8' - } - - sourceSets { - main.java.srcDirs += 'src/main/kotlin' + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 } defaultConfig { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId "com.example.flutter_via_create" + applicationId = "com.example.flutter_via_create" // You can update the following values to match your application needs. // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. - minSdkVersion flutter.minSdkVersion - targetSdkVersion flutter.targetSdkVersion - versionCode flutterVersionCode.toInteger() - versionName flutterVersionName + minSdk = flutter.minSdkVersion + targetSdk = flutter.targetSdkVersion + versionCode = flutterVersionCode.toInteger() + versionName = flutterVersionName } buildTypes { release { // TODO: Add your own signing config for the release build. // Signing with the debug keys for now, so `flutter run --release` works. - signingConfig signingConfigs.debug + signingConfig = signingConfigs.debug } } } flutter { - source '../..' + source = "../.." } - -dependencies {} diff --git a/frb_example/flutter_via_create/android/app/src/main/AndroidManifest.xml b/frb_example/flutter_via_create/android/app/src/main/AndroidManifest.xml index 14d1d08625..85b2e07c3b 100644 --- a/frb_example/flutter_via_create/android/app/src/main/AndroidManifest.xml +++ b/frb_example/flutter_via_create/android/app/src/main/AndroidManifest.xml @@ -7,6 +7,7 @@ android:name=".MainActivity" android:exported="true" android:launchMode="singleTop" + android:taskAffinity="" android:theme="@style/LaunchTheme" android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode" android:hardwareAccelerated="true" @@ -31,7 +32,7 @@ android:value="2" /> diff --git a/frb_example/flutter_via_create/android/build.gradle b/frb_example/flutter_via_create/android/build.gradle index bc157bd1a1..d2ffbffa4c 100644 --- a/frb_example/flutter_via_create/android/build.gradle +++ b/frb_example/flutter_via_create/android/build.gradle @@ -5,12 +5,12 @@ allprojects { } } -rootProject.buildDir = '../build' +rootProject.buildDir = "../build" subprojects { project.buildDir = "${rootProject.buildDir}/${project.name}" } subprojects { - project.evaluationDependsOn(':app') + project.evaluationDependsOn(":app") } tasks.register("clean", Delete) { diff --git a/frb_example/flutter_via_create/android/gradle.properties b/frb_example/flutter_via_create/android/gradle.properties index 598d13fee4..3b5b324f6e 100644 --- a/frb_example/flutter_via_create/android/gradle.properties +++ b/frb_example/flutter_via_create/android/gradle.properties @@ -1,3 +1,3 @@ -org.gradle.jvmargs=-Xmx4G +org.gradle.jvmargs=-Xmx4G -XX:+HeapDumpOnOutOfMemoryError android.useAndroidX=true android.enableJetifier=true diff --git a/frb_example/flutter_via_create/android/settings.gradle b/frb_example/flutter_via_create/android/settings.gradle index 1d6d19b7f8..536165d35a 100644 --- a/frb_example/flutter_via_create/android/settings.gradle +++ b/frb_example/flutter_via_create/android/settings.gradle @@ -5,10 +5,9 @@ pluginManagement { def flutterSdkPath = properties.getProperty("flutter.sdk") assert flutterSdkPath != null, "flutter.sdk not set in local.properties" return flutterSdkPath - } - settings.ext.flutterSdkPath = flutterSdkPath() + }() - includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle") + includeBuild("$flutterSdkPath/packages/flutter_tools/gradle") repositories { google() diff --git a/frb_example/flutter_via_create/ios/Runner/AppDelegate.swift b/frb_example/flutter_via_create/ios/Runner/AppDelegate.swift index 70693e4a8c..9074fee929 100644 --- a/frb_example/flutter_via_create/ios/Runner/AppDelegate.swift +++ b/frb_example/flutter_via_create/ios/Runner/AppDelegate.swift @@ -1,5 +1,5 @@ -import UIKit import Flutter +import UIKit @UIApplicationMain @objc class AppDelegate: FlutterAppDelegate { diff --git a/frb_example/flutter_via_create/macos/RunnerTests/RunnerTests.swift b/frb_example/flutter_via_create/macos/RunnerTests/RunnerTests.swift index 5418c9f539..61f3bd1fc5 100644 --- a/frb_example/flutter_via_create/macos/RunnerTests/RunnerTests.swift +++ b/frb_example/flutter_via_create/macos/RunnerTests/RunnerTests.swift @@ -1,5 +1,5 @@ -import FlutterMacOS import Cocoa +import FlutterMacOS import XCTest class RunnerTests: XCTestCase { diff --git a/frb_example/flutter_via_create/pubspec.lock b/frb_example/flutter_via_create/pubspec.lock index 06c709de60..d0be0c251b 100644 --- a/frb_example/flutter_via_create/pubspec.lock +++ b/frb_example/flutter_via_create/pubspec.lock @@ -133,26 +133,26 @@ packages: dependency: transitive description: name: leak_tracker - sha256: "78eb209deea09858f5269f5a5b02be4049535f568c07b275096836f01ea323fa" + sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a" url: "https://pub.dev" source: hosted - version: "10.0.0" + version: "10.0.4" leak_tracker_flutter_testing: dependency: transitive description: name: leak_tracker_flutter_testing - sha256: b46c5e37c19120a8a01918cfaf293547f47269f7cb4b0058f21531c2465d6ef0 + sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8" url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "3.0.3" leak_tracker_testing: dependency: transitive description: name: leak_tracker_testing - sha256: a597f72a664dbd293f3bfc51f9ba69816f84dcd403cdac7066cb3f6003f3ab47 + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "3.0.1" lints: dependency: transitive description: @@ -181,10 +181,10 @@ packages: dependency: transitive description: name: meta - sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04 + sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136" url: "https://pub.dev" source: hosted - version: "1.11.0" + version: "1.12.0" path: dependency: transitive description: @@ -281,10 +281,10 @@ packages: dependency: transitive description: name: test_api - sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" + sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f" url: "https://pub.dev" source: hosted - version: "0.6.1" + version: "0.7.0" vector_math: dependency: transitive description: @@ -297,10 +297,10 @@ packages: dependency: transitive description: name: vm_service - sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957 + sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec" url: "https://pub.dev" source: hosted - version: "13.0.0" + version: "14.2.1" webdriver: dependency: transitive description: @@ -310,5 +310,5 @@ packages: source: hosted version: "3.0.3" sdks: - dart: ">=3.3.0 <4.0.0" - flutter: ">=3.3.0" + dart: ">=3.4.0 <4.0.0" + flutter: ">=3.18.0-18.0.pre.54" diff --git a/frb_example/flutter_via_create/pubspec.yaml b/frb_example/flutter_via_create/pubspec.yaml index a556ad1a19..2a4c21006b 100644 --- a/frb_example/flutter_via_create/pubspec.yaml +++ b/frb_example/flutter_via_create/pubspec.yaml @@ -19,7 +19,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev version: 1.0.0+1 environment: - sdk: '>=3.3.0 <4.0.0' + sdk: '>=3.4.0 <4.0.0' # Dependencies specify other packages that your package needs in order to work. # To automatically upgrade your package dependencies to the latest versions diff --git a/frb_example/flutter_via_create/web/index.html b/frb_example/flutter_via_create/web/index.html index 3f05969207..2ff65142e7 100644 --- a/frb_example/flutter_via_create/web/index.html +++ b/frb_example/flutter_via_create/web/index.html @@ -31,29 +31,8 @@ flutter_via_create - - - - - + diff --git a/frb_example/flutter_via_create/windows/runner/utils.cpp b/frb_example/flutter_via_create/windows/runner/utils.cpp index b2b08734db..3a0b46511a 100644 --- a/frb_example/flutter_via_create/windows/runner/utils.cpp +++ b/frb_example/flutter_via_create/windows/runner/utils.cpp @@ -45,13 +45,13 @@ std::string Utf8FromUtf16(const wchar_t* utf16_string) { if (utf16_string == nullptr) { return std::string(); } - int target_length = ::WideCharToMultiByte( + unsigned int target_length = ::WideCharToMultiByte( CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string, -1, nullptr, 0, nullptr, nullptr) -1; // remove the trailing null character int input_length = (int)wcslen(utf16_string); std::string utf8_string; - if (target_length <= 0 || target_length > utf8_string.max_size()) { + if (target_length == 0 || target_length > utf8_string.max_size()) { return utf8_string; } utf8_string.resize(target_length); diff --git a/frb_example/flutter_via_integrate/.metadata b/frb_example/flutter_via_integrate/.metadata index bae49f356f..8ca14df433 100644 --- a/frb_example/flutter_via_integrate/.metadata +++ b/frb_example/flutter_via_integrate/.metadata @@ -4,7 +4,7 @@ # This file should be version controlled and should not be manually edited. version: - revision: "7482962148e8d758338d8a28f589f317e1e42ba4" + revision: "5dcb86f68f239346676ceb1ed1ea385bd215fba1" channel: "stable" project_type: app @@ -13,26 +13,26 @@ project_type: app migration: platforms: - platform: root - create_revision: 7482962148e8d758338d8a28f589f317e1e42ba4 - base_revision: 7482962148e8d758338d8a28f589f317e1e42ba4 + create_revision: 5dcb86f68f239346676ceb1ed1ea385bd215fba1 + base_revision: 5dcb86f68f239346676ceb1ed1ea385bd215fba1 - platform: android - create_revision: 7482962148e8d758338d8a28f589f317e1e42ba4 - base_revision: 7482962148e8d758338d8a28f589f317e1e42ba4 + create_revision: 5dcb86f68f239346676ceb1ed1ea385bd215fba1 + base_revision: 5dcb86f68f239346676ceb1ed1ea385bd215fba1 - platform: ios - create_revision: 7482962148e8d758338d8a28f589f317e1e42ba4 - base_revision: 7482962148e8d758338d8a28f589f317e1e42ba4 + create_revision: 5dcb86f68f239346676ceb1ed1ea385bd215fba1 + base_revision: 5dcb86f68f239346676ceb1ed1ea385bd215fba1 - platform: linux - create_revision: 7482962148e8d758338d8a28f589f317e1e42ba4 - base_revision: 7482962148e8d758338d8a28f589f317e1e42ba4 + create_revision: 5dcb86f68f239346676ceb1ed1ea385bd215fba1 + base_revision: 5dcb86f68f239346676ceb1ed1ea385bd215fba1 - platform: macos - create_revision: 7482962148e8d758338d8a28f589f317e1e42ba4 - base_revision: 7482962148e8d758338d8a28f589f317e1e42ba4 + create_revision: 5dcb86f68f239346676ceb1ed1ea385bd215fba1 + base_revision: 5dcb86f68f239346676ceb1ed1ea385bd215fba1 - platform: web - create_revision: 7482962148e8d758338d8a28f589f317e1e42ba4 - base_revision: 7482962148e8d758338d8a28f589f317e1e42ba4 + create_revision: 5dcb86f68f239346676ceb1ed1ea385bd215fba1 + base_revision: 5dcb86f68f239346676ceb1ed1ea385bd215fba1 - platform: windows - create_revision: 7482962148e8d758338d8a28f589f317e1e42ba4 - base_revision: 7482962148e8d758338d8a28f589f317e1e42ba4 + create_revision: 5dcb86f68f239346676ceb1ed1ea385bd215fba1 + base_revision: 5dcb86f68f239346676ceb1ed1ea385bd215fba1 # User provided section diff --git a/frb_example/flutter_via_integrate/android/app/build.gradle b/frb_example/flutter_via_integrate/android/app/build.gradle index 062a9a69cb..3d9da919d0 100644 --- a/frb_example/flutter_via_integrate/android/app/build.gradle +++ b/frb_example/flutter_via_integrate/android/app/build.gradle @@ -1,67 +1,58 @@ plugins { id "com.android.application" id "kotlin-android" + // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins. id "dev.flutter.flutter-gradle-plugin" } def localProperties = new Properties() -def localPropertiesFile = rootProject.file('local.properties') +def localPropertiesFile = rootProject.file("local.properties") if (localPropertiesFile.exists()) { - localPropertiesFile.withReader('UTF-8') { reader -> + localPropertiesFile.withReader("UTF-8") { reader -> localProperties.load(reader) } } -def flutterVersionCode = localProperties.getProperty('flutter.versionCode') +def flutterVersionCode = localProperties.getProperty("flutter.versionCode") if (flutterVersionCode == null) { - flutterVersionCode = '1' + flutterVersionCode = "1" } -def flutterVersionName = localProperties.getProperty('flutter.versionName') +def flutterVersionName = localProperties.getProperty("flutter.versionName") if (flutterVersionName == null) { - flutterVersionName = '1.0' + flutterVersionName = "1.0" } android { - namespace "com.example.flutter_via_integrate" - compileSdk flutter.compileSdkVersion - ndkVersion flutter.ndkVersion + namespace = "com.example.flutter_via_integrate" + compileSdk = flutter.compileSdkVersion + ndkVersion = flutter.ndkVersion compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 - } - - kotlinOptions { - jvmTarget = '1.8' - } - - sourceSets { - main.java.srcDirs += 'src/main/kotlin' + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 } defaultConfig { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId "com.example.flutter_via_integrate" + applicationId = "com.example.flutter_via_integrate" // You can update the following values to match your application needs. // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. - minSdkVersion flutter.minSdkVersion - targetSdkVersion flutter.targetSdkVersion - versionCode flutterVersionCode.toInteger() - versionName flutterVersionName + minSdk = flutter.minSdkVersion + targetSdk = flutter.targetSdkVersion + versionCode = flutterVersionCode.toInteger() + versionName = flutterVersionName } buildTypes { release { // TODO: Add your own signing config for the release build. // Signing with the debug keys for now, so `flutter run --release` works. - signingConfig signingConfigs.debug + signingConfig = signingConfigs.debug } } } flutter { - source '../..' + source = "../.." } - -dependencies {} diff --git a/frb_example/flutter_via_integrate/android/app/src/main/AndroidManifest.xml b/frb_example/flutter_via_integrate/android/app/src/main/AndroidManifest.xml index 6f9885f6b5..ded5160660 100644 --- a/frb_example/flutter_via_integrate/android/app/src/main/AndroidManifest.xml +++ b/frb_example/flutter_via_integrate/android/app/src/main/AndroidManifest.xml @@ -7,6 +7,7 @@ android:name=".MainActivity" android:exported="true" android:launchMode="singleTop" + android:taskAffinity="" android:theme="@style/LaunchTheme" android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode" android:hardwareAccelerated="true" @@ -31,7 +32,7 @@ android:value="2" /> diff --git a/frb_example/flutter_via_integrate/android/build.gradle b/frb_example/flutter_via_integrate/android/build.gradle index bc157bd1a1..d2ffbffa4c 100644 --- a/frb_example/flutter_via_integrate/android/build.gradle +++ b/frb_example/flutter_via_integrate/android/build.gradle @@ -5,12 +5,12 @@ allprojects { } } -rootProject.buildDir = '../build' +rootProject.buildDir = "../build" subprojects { project.buildDir = "${rootProject.buildDir}/${project.name}" } subprojects { - project.evaluationDependsOn(':app') + project.evaluationDependsOn(":app") } tasks.register("clean", Delete) { diff --git a/frb_example/flutter_via_integrate/android/gradle.properties b/frb_example/flutter_via_integrate/android/gradle.properties index 598d13fee4..3b5b324f6e 100644 --- a/frb_example/flutter_via_integrate/android/gradle.properties +++ b/frb_example/flutter_via_integrate/android/gradle.properties @@ -1,3 +1,3 @@ -org.gradle.jvmargs=-Xmx4G +org.gradle.jvmargs=-Xmx4G -XX:+HeapDumpOnOutOfMemoryError android.useAndroidX=true android.enableJetifier=true diff --git a/frb_example/flutter_via_integrate/android/settings.gradle b/frb_example/flutter_via_integrate/android/settings.gradle index 1d6d19b7f8..536165d35a 100644 --- a/frb_example/flutter_via_integrate/android/settings.gradle +++ b/frb_example/flutter_via_integrate/android/settings.gradle @@ -5,10 +5,9 @@ pluginManagement { def flutterSdkPath = properties.getProperty("flutter.sdk") assert flutterSdkPath != null, "flutter.sdk not set in local.properties" return flutterSdkPath - } - settings.ext.flutterSdkPath = flutterSdkPath() + }() - includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle") + includeBuild("$flutterSdkPath/packages/flutter_tools/gradle") repositories { google() diff --git a/frb_example/flutter_via_integrate/ios/Runner/AppDelegate.swift b/frb_example/flutter_via_integrate/ios/Runner/AppDelegate.swift index 70693e4a8c..9074fee929 100644 --- a/frb_example/flutter_via_integrate/ios/Runner/AppDelegate.swift +++ b/frb_example/flutter_via_integrate/ios/Runner/AppDelegate.swift @@ -1,5 +1,5 @@ -import UIKit import Flutter +import UIKit @UIApplicationMain @objc class AppDelegate: FlutterAppDelegate { diff --git a/frb_example/flutter_via_integrate/macos/RunnerTests/RunnerTests.swift b/frb_example/flutter_via_integrate/macos/RunnerTests/RunnerTests.swift index 5418c9f539..61f3bd1fc5 100644 --- a/frb_example/flutter_via_integrate/macos/RunnerTests/RunnerTests.swift +++ b/frb_example/flutter_via_integrate/macos/RunnerTests/RunnerTests.swift @@ -1,5 +1,5 @@ -import FlutterMacOS import Cocoa +import FlutterMacOS import XCTest class RunnerTests: XCTestCase { diff --git a/frb_example/flutter_via_integrate/pubspec.lock b/frb_example/flutter_via_integrate/pubspec.lock index bcd2ef6e8f..50b17bdf5b 100644 --- a/frb_example/flutter_via_integrate/pubspec.lock +++ b/frb_example/flutter_via_integrate/pubspec.lock @@ -133,26 +133,26 @@ packages: dependency: transitive description: name: leak_tracker - sha256: "78eb209deea09858f5269f5a5b02be4049535f568c07b275096836f01ea323fa" + sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a" url: "https://pub.dev" source: hosted - version: "10.0.0" + version: "10.0.4" leak_tracker_flutter_testing: dependency: transitive description: name: leak_tracker_flutter_testing - sha256: b46c5e37c19120a8a01918cfaf293547f47269f7cb4b0058f21531c2465d6ef0 + sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8" url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "3.0.3" leak_tracker_testing: dependency: transitive description: name: leak_tracker_testing - sha256: a597f72a664dbd293f3bfc51f9ba69816f84dcd403cdac7066cb3f6003f3ab47 + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "3.0.1" lints: dependency: transitive description: @@ -181,10 +181,10 @@ packages: dependency: transitive description: name: meta - sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04 + sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136" url: "https://pub.dev" source: hosted - version: "1.11.0" + version: "1.12.0" path: dependency: transitive description: @@ -281,10 +281,10 @@ packages: dependency: transitive description: name: test_api - sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" + sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f" url: "https://pub.dev" source: hosted - version: "0.6.1" + version: "0.7.0" vector_math: dependency: transitive description: @@ -297,10 +297,10 @@ packages: dependency: transitive description: name: vm_service - sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957 + sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec" url: "https://pub.dev" source: hosted - version: "13.0.0" + version: "14.2.1" webdriver: dependency: transitive description: @@ -310,5 +310,5 @@ packages: source: hosted version: "3.0.3" sdks: - dart: ">=3.3.0 <4.0.0" - flutter: ">=3.3.0" + dart: ">=3.4.0 <4.0.0" + flutter: ">=3.18.0-18.0.pre.54" diff --git a/frb_example/flutter_via_integrate/pubspec.yaml b/frb_example/flutter_via_integrate/pubspec.yaml index cb706f2c1c..5f26027ac1 100644 --- a/frb_example/flutter_via_integrate/pubspec.yaml +++ b/frb_example/flutter_via_integrate/pubspec.yaml @@ -19,7 +19,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev version: 1.0.0+1 environment: - sdk: '>=3.3.0 <4.0.0' + sdk: '>=3.4.0 <4.0.0' # Dependencies specify other packages that your package needs in order to work. # To automatically upgrade your package dependencies to the latest versions diff --git a/frb_example/flutter_via_integrate/web/index.html b/frb_example/flutter_via_integrate/web/index.html index e04b5a52ca..5c65ed2e7b 100644 --- a/frb_example/flutter_via_integrate/web/index.html +++ b/frb_example/flutter_via_integrate/web/index.html @@ -31,29 +31,8 @@ flutter_via_integrate - - - - - + diff --git a/frb_example/flutter_via_integrate/windows/runner/utils.cpp b/frb_example/flutter_via_integrate/windows/runner/utils.cpp index b2b08734db..3a0b46511a 100644 --- a/frb_example/flutter_via_integrate/windows/runner/utils.cpp +++ b/frb_example/flutter_via_integrate/windows/runner/utils.cpp @@ -45,13 +45,13 @@ std::string Utf8FromUtf16(const wchar_t* utf16_string) { if (utf16_string == nullptr) { return std::string(); } - int target_length = ::WideCharToMultiByte( + unsigned int target_length = ::WideCharToMultiByte( CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string, -1, nullptr, 0, nullptr, nullptr) -1; // remove the trailing null character int input_length = (int)wcslen(utf16_string); std::string utf8_string; - if (target_length <= 0 || target_length > utf8_string.max_size()) { + if (target_length == 0 || target_length > utf8_string.max_size()) { return utf8_string; } utf8_string.resize(target_length); From 90c8fe281aadcdd11a50c0baf892ac1131a1b36a Mon Sep 17 00:00:00 2001 From: fzyzcjy Date: Fri, 17 May 2024 21:18:29 +0800 Subject: [PATCH 4/6] chore: pub-get --- frb_example/gallery/pubspec.lock | 34 ++++++++++++++++---------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/frb_example/gallery/pubspec.lock b/frb_example/gallery/pubspec.lock index 0f5940615d..6e415e39c9 100644 --- a/frb_example/gallery/pubspec.lock +++ b/frb_example/gallery/pubspec.lock @@ -357,26 +357,26 @@ packages: dependency: transitive description: name: leak_tracker - sha256: "78eb209deea09858f5269f5a5b02be4049535f568c07b275096836f01ea323fa" + sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a" url: "https://pub.dev" source: hosted - version: "10.0.0" + version: "10.0.4" leak_tracker_flutter_testing: dependency: transitive description: name: leak_tracker_flutter_testing - sha256: b46c5e37c19120a8a01918cfaf293547f47269f7cb4b0058f21531c2465d6ef0 + sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8" url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "3.0.3" leak_tracker_testing: dependency: transitive description: name: leak_tracker_testing - sha256: a597f72a664dbd293f3bfc51f9ba69816f84dcd403cdac7066cb3f6003f3ab47 + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "3.0.1" lints: dependency: "direct main" description: @@ -413,10 +413,10 @@ packages: dependency: transitive description: name: meta - sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04 + sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136" url: "https://pub.dev" source: hosted - version: "1.11.0" + version: "1.12.0" mime: dependency: transitive description: @@ -633,26 +633,26 @@ packages: dependency: "direct dev" description: name: test - sha256: a1f7595805820fcc05e5c52e3a231aedd0b72972cb333e8c738a8b1239448b6f + sha256: "7ee446762c2c50b3bd4ea96fe13ffac69919352bd3b4b17bac3f3465edc58073" url: "https://pub.dev" source: hosted - version: "1.24.9" + version: "1.25.2" test_api: dependency: transitive description: name: test_api - sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" + sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f" url: "https://pub.dev" source: hosted - version: "0.6.1" + version: "0.7.0" test_core: dependency: transitive description: name: test_core - sha256: a757b14fc47507060a162cc2530d9a4a2f92f5100a952c7443b5cad5ef5b106a + sha256: "2bc4b4ecddd75309300d8096f781c0e3280ca1ef85beda558d33fcbedc2eead4" url: "https://pub.dev" source: hosted - version: "0.5.9" + version: "0.6.0" timing: dependency: transitive description: @@ -681,10 +681,10 @@ packages: dependency: transitive description: name: vm_service - sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957 + sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec" url: "https://pub.dev" source: hosted - version: "13.0.0" + version: "14.2.1" watcher: dependency: transitive description: @@ -735,4 +735,4 @@ packages: version: "2.1.1" sdks: dart: ">=3.3.0 <4.0.0" - flutter: ">=3.3.0" + flutter: ">=3.18.0-18.0.pre.54" From a7535b9f210a0f5d567c7bc5a2ce6da0e6dbbc3d Mon Sep 17 00:00:00 2001 From: fzyzcjy Date: Fri, 17 May 2024 22:03:27 +0800 Subject: [PATCH 5/6] fix: lint --- .../src/library/codegen/generator/codec/sse/ty/delegate.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frb_codegen/src/library/codegen/generator/codec/sse/ty/delegate.rs b/frb_codegen/src/library/codegen/generator/codec/sse/ty/delegate.rs index 28d33e4ae6..7aea7ef30f 100644 --- a/frb_codegen/src/library/codegen/generator/codec/sse/ty/delegate.rs +++ b/frb_codegen/src/library/codegen/generator/codec/sse/ty/delegate.rs @@ -63,7 +63,7 @@ impl<'a> CodecSseTyTrait for DelegateCodecSseTy<'a> { IrTypeDelegate::Time(ir) => match ir { IrTypeDelegateTime::Utc | IrTypeDelegateTime::Local - | IrTypeDelegateTime::Naive => "self.timestamp_micros()".to_owned(), + | IrTypeDelegateTime::Naive => "self.and_utc().timestamp_micros()".to_owned(), IrTypeDelegateTime::Duration => { r#"self.num_microseconds().expect("cannot get microseconds from time")"# .to_owned() From cfd5c3e06b0b0784671fe94e48a7640274503309 Mon Sep 17 00:00:00 2001 From: fzyzcjy Date: Fri, 17 May 2024 22:04:11 +0800 Subject: [PATCH 6/6] Revert "fix: lint" This reverts commit a7535b9f210a0f5d567c7bc5a2ce6da0e6dbbc3d. --- .../src/library/codegen/generator/codec/sse/ty/delegate.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frb_codegen/src/library/codegen/generator/codec/sse/ty/delegate.rs b/frb_codegen/src/library/codegen/generator/codec/sse/ty/delegate.rs index 7aea7ef30f..28d33e4ae6 100644 --- a/frb_codegen/src/library/codegen/generator/codec/sse/ty/delegate.rs +++ b/frb_codegen/src/library/codegen/generator/codec/sse/ty/delegate.rs @@ -63,7 +63,7 @@ impl<'a> CodecSseTyTrait for DelegateCodecSseTy<'a> { IrTypeDelegate::Time(ir) => match ir { IrTypeDelegateTime::Utc | IrTypeDelegateTime::Local - | IrTypeDelegateTime::Naive => "self.and_utc().timestamp_micros()".to_owned(), + | IrTypeDelegateTime::Naive => "self.timestamp_micros()".to_owned(), IrTypeDelegateTime::Duration => { r#"self.num_microseconds().expect("cannot get microseconds from time")"# .to_owned()