From 20215a2d37b6ce88a970e013d032028d82706389 Mon Sep 17 00:00:00 2001 From: Levi Lesches Date: Mon, 28 Oct 2024 00:47:43 -0400 Subject: [PATCH 1/7] Don't use SDL on non-supported (Windows/Linux) --- lib/src/services/gamepad/gamepad.dart | 5 ++++- lib/src/services/gamepad/sdl.dart | 12 ++++++++++++ lib/src/services/gamepad/service.dart | 11 +++++++---- 3 files changed, 23 insertions(+), 5 deletions(-) diff --git a/lib/src/services/gamepad/gamepad.dart b/lib/src/services/gamepad/gamepad.dart index 8e1520b7d..272d31669 100644 --- a/lib/src/services/gamepad/gamepad.dart +++ b/lib/src/services/gamepad/gamepad.dart @@ -1,3 +1,5 @@ +import "package:rover_dashboard/src/services/gamepad/mock.dart"; + import "state.dart"; import "sdl.dart"; @@ -18,7 +20,8 @@ abstract class Gamepad extends Service { Gamepad(this.controllerIndex); /// Returns a functional instance of this class, or a mock on unsupported platforms. - factory Gamepad.forPlatform(int index) => DesktopGamepad(index); + factory Gamepad.forPlatform(int index) => isSdlSupported + ? DesktopGamepad(index) : MockGamepad(index); /// Gets the current state of the gamepad, or null if it's not connected. GamepadState? getState(); diff --git a/lib/src/services/gamepad/sdl.dart b/lib/src/services/gamepad/sdl.dart index 97aaa020d..6bf9d3a1d 100644 --- a/lib/src/services/gamepad/sdl.dart +++ b/lib/src/services/gamepad/sdl.dart @@ -1,8 +1,20 @@ +import "dart:io"; import "package:flutter_sdl_gamepad/flutter_sdl_gamepad.dart" as sdl; import "state.dart"; import "gamepad.dart"; +/// Whether `package:sdl_gamepad` has been tested on this platform. +bool get isSdlSupported => Platform.isWindows || Platform.isLinux; + +/// Initializes the SDL libraries. +void initSdl() { + if (!isSdlSupported) return; + if (!sdl.SdlLibrary.init()) { + throw StateError("Could not initialize SDL libraries"); + } +} + /// A cross-platform implementation based on the `sdl_gamepad` package. class DesktopGamepad extends Gamepad { final sdl.SdlGamepad _sdl; diff --git a/lib/src/services/gamepad/service.dart b/lib/src/services/gamepad/service.dart index e9908ed45..139a75b68 100644 --- a/lib/src/services/gamepad/service.dart +++ b/lib/src/services/gamepad/service.dart @@ -1,4 +1,5 @@ import "package:flutter_sdl_gamepad/flutter_sdl_gamepad.dart"; +import "package:rover_dashboard/src/services/gamepad/sdl.dart"; import "../service.dart"; import "gamepad.dart"; @@ -24,6 +25,10 @@ class GamepadService extends Service { /// The maximum number of gamepads that will be connected. static const maxGamepads = 3; + /// Gets a list of currently connected gamepads. + static Iterable getConnectedGamepads() => isSdlSupported + ? SdlGamepad.getConnectedGamepadIds() : []; + /// A list of gamepads that are currently connected. /// /// Note that the index in this list does **not** correspond to [Gamepad.controllerIndex]. The @@ -45,9 +50,7 @@ class GamepadService extends Service { @override Future init() async { - if (!SdlLibrary.init()) { - throw StateError("Could not initialize SDL libraries"); - } + if (isSdlSupported) initSdl(); gamepads = List.generate(maxGamepads, MockGamepad.new); for (var i = 0; i < maxGamepads; i++) { await connect(i); @@ -69,7 +72,7 @@ class GamepadService extends Service { return; } gamepads[operatorIndex] = MockGamepad(0); - for (final osIndex in SdlGamepad.getConnectedGamepadIds()) { + for (final osIndex in getConnectedGamepads()) { if (osIndexes.contains(osIndex)) continue; final gamepad = Gamepad.forPlatform(osIndex); await gamepad.init(); From 206b09d68b921927ba9f871c5d41be8555656639 Mon Sep 17 00:00:00 2001 From: Levi Lesches Date: Mon, 28 Oct 2024 01:07:45 -0400 Subject: [PATCH 2/7] Migrated to new Android build.gradle format --- android/app/build.gradle | 19 ++++++------------- android/build.gradle | 13 ------------- android/settings.gradle | 30 ++++++++++++++++++++++-------- 3 files changed, 28 insertions(+), 34 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index 8ca3a6a6a..fe88e2871 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -1,3 +1,9 @@ +plugins { + id "com.android.application" + id "kotlin-android" + id "dev.flutter.flutter-gradle-plugin" +} + def localProperties = new Properties() def localPropertiesFile = rootProject.file('local.properties') if (localPropertiesFile.exists()) { @@ -6,11 +12,6 @@ if (localPropertiesFile.exists()) { } } -def flutterRoot = localProperties.getProperty('flutter.sdk') -if (flutterRoot == null) { - throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") -} - def flutterVersionCode = localProperties.getProperty('flutter.versionCode') if (flutterVersionCode == null) { flutterVersionCode = '1' @@ -21,10 +22,6 @@ if (flutterVersionName == null) { flutterVersionName = '1.0' } -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' -apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" - android { compileSdkVersion 34 ndkVersion flutter.ndkVersion @@ -61,7 +58,3 @@ android { flutter { source '../..' } - -dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" -} diff --git a/android/build.gradle b/android/build.gradle index 0a40a9865..bc157bd1a 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,16 +1,3 @@ -buildscript { - ext.kotlin_version = '1.8.21' - repositories { - google() - mavenCentral() - } - - dependencies { - classpath 'com.android.tools.build:gradle:7.1.2' - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - } -} - allprojects { repositories { google() diff --git a/android/settings.gradle b/android/settings.gradle index 44e62bcf0..6f2cdec82 100644 --- a/android/settings.gradle +++ b/android/settings.gradle @@ -1,11 +1,25 @@ -include ':app' +pluginManagement { + def flutterSdkPath = { + def properties = new Properties() + file("local.properties").withInputStream { properties.load(it) } + def flutterSdkPath = properties.getProperty("flutter.sdk") + assert flutterSdkPath != null, "flutter.sdk not set in local.properties" + return flutterSdkPath + }() -def localPropertiesFile = new File(rootProject.projectDir, "local.properties") -def properties = new Properties() + includeBuild("$flutterSdkPath/packages/flutter_tools/gradle") -assert localPropertiesFile.exists() -localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } + repositories { + google() + mavenCentral() + gradlePluginPortal() + } +} -def flutterSdkPath = properties.getProperty("flutter.sdk") -assert flutterSdkPath != null, "flutter.sdk not set in local.properties" -apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" +plugins { + id "dev.flutter.flutter-plugin-loader" version "1.0.0" + id "com.android.application" version "7.1.2" apply false + id "org.jetbrains.kotlin.android" version "1.8.21" apply false +} + +include ":app" From 49887278f2674e60268a11757131c34bb4a137c9 Mon Sep 17 00:00:00 2001 From: Levi Lesches Date: Mon, 28 Oct 2024 01:18:43 -0400 Subject: [PATCH 3/7] Upgraded to latest versions of packages --- pubspec.lock | 94 ++++++++++++++++++++++++++-------------------------- pubspec.yaml | 10 +++--- 2 files changed, 52 insertions(+), 52 deletions(-) diff --git a/pubspec.lock b/pubspec.lock index 225af0afb..fd4a77ad8 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -13,10 +13,10 @@ packages: dependency: transitive description: name: args - sha256: "7cf60b9f0cc88203c5a190b4cd62a99feea42759a7fa695010eb5de1c0b2252a" + sha256: bf9f5caeea8d8fe6721a9c358dd8a5c1947b27f1cfaa18b39c301273594919e6 url: "https://pub.dev" source: hosted - version: "2.5.0" + version: "2.6.0" async: dependency: transitive description: @@ -110,10 +110,10 @@ packages: dependency: transitive description: name: crypto - sha256: ec30d999af904f33454ba22ed9a86162b35e52b44ac4807d1d93c288041d7d27 + sha256: "1e445881f28f22d6140f181e07737b22f1e099a5e1ff94b0af2f9e4a463f4855" url: "https://pub.dev" source: hosted - version: "3.0.5" + version: "3.0.6" dylib: dependency: transitive description: @@ -150,26 +150,26 @@ packages: dependency: "direct main" description: name: file_picker - sha256: "167bb619cdddaa10ef2907609feb8a79c16dfa479d3afaf960f8e223f754bf12" + sha256: aac85f20436608e01a6ffd1fdd4e746a7f33c93a2c83752e626bdfaea139b877 url: "https://pub.dev" source: hosted - version: "8.1.2" + version: "8.1.3" fixnum: dependency: transitive description: name: fixnum - sha256: "25517a4deb0c03aa0f32fd12db525856438902d9c16536311e76cdc57b31d7d1" + sha256: b6dc7065e46c974bc7c5f143080a6764ec7a4be6da1285ececdc37be96de53be url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "1.1.1" fl_chart: dependency: "direct main" description: name: fl_chart - sha256: d0f0d49112f2f4b192481c16d05b6418bd7820e021e265a3c22db98acf7ed7fb + sha256: "94307bef3a324a0d329d3ab77b2f0c6e5ed739185ffc029ed28c0f9b019ea7ef" url: "https://pub.dev" source: hosted - version: "0.68.0" + version: "0.69.0" flutter: dependency: "direct main" description: flutter @@ -179,10 +179,10 @@ packages: dependency: "direct dev" description: name: flutter_launcher_icons - sha256: "526faf84284b86a4cb36d20a5e45147747b7563d921373d4ee0559c54fcdbcea" + sha256: "619817c4b65b322b5104b6bb6dfe6cda62d9729bd7ad4303ecc8b4e690a67a77" url: "https://pub.dev" source: hosted - version: "0.13.1" + version: "0.14.1" flutter_libserialport: dependency: "direct main" description: @@ -195,10 +195,10 @@ packages: dependency: transitive description: name: flutter_plugin_android_lifecycle - sha256: "9ee02950848f61c4129af3d6ec84a1cfc0e47931abc746b03e7a3bc3e8ff6eda" + sha256: "9b78450b89f059e96c9ebb355fa6b3df1d6b330436e0b885fb49594c41721398" url: "https://pub.dev" source: hosted - version: "2.0.22" + version: "2.0.23" flutter_resizable_container: dependency: "direct main" description: @@ -253,18 +253,18 @@ packages: dependency: "direct dev" description: name: icons_launcher - sha256: "9b514ffed6ed69b232fd2bf34c44878c8526be71fc74129a658f35c04c9d4a9d" + sha256: a7c83fbc837dc6f81944ef35c3756f533bb2aba32fcca5cbcdb2dbcd877d5ae9 url: "https://pub.dev" source: hosted - version: "2.1.7" + version: "3.0.0" image: dependency: transitive description: name: image - sha256: "2237616a36c0d69aef7549ab439b833fb7f9fb9fc861af2cc9ac3eedddd69ca8" + sha256: f31d52537dc417fdcde36088fdf11d191026fd5e4fae742491ebd40e5a8bea7d url: "https://pub.dev" source: hosted - version: "4.2.0" + version: "4.3.0" json_annotation: dependency: transitive description: @@ -277,10 +277,10 @@ packages: dependency: "direct main" description: name: just_audio - sha256: d8e8aaf417d33e345299c17f6457f72bd4ba0c549dc34607abb5183a354edc4d + sha256: b41646a8241688f1d99c2e69c4da2bb26aa4b3a99795f6ff205c2a165e033fda url: "https://pub.dev" source: hosted - version: "0.9.40" + version: "0.9.41" just_audio_platform_interface: dependency: transitive description: @@ -293,10 +293,10 @@ packages: dependency: transitive description: name: just_audio_web - sha256: b163878529d9b028c53a6972fcd58cae2405bcd11cbfcea620b6fb9f151429d6 + sha256: "9a98035b8b24b40749507687520ec5ab404e291d2b0937823ff45d92cb18d448" url: "https://pub.dev" source: hosted - version: "0.4.12" + version: "0.4.13" leak_tracker: dependency: transitive description: @@ -381,10 +381,10 @@ packages: dependency: "direct main" description: name: package_info_plus - sha256: a75164ade98cb7d24cfd0a13c6408927c6b217fa60dee5a7ff5c116a58f28918 + sha256: df3eb3e0aed5c1107bb0fdb80a8e82e778114958b1c5ac5644fb1ac9cae8a998 url: "https://pub.dev" source: hosted - version: "8.0.2" + version: "8.1.0" package_info_plus_platform_interface: dependency: transitive description: @@ -413,10 +413,10 @@ packages: dependency: transitive description: name: path_provider_android - sha256: "6f01f8e37ec30b07bc424b4deabac37cacb1bc7e2e515ad74486039918a37eb7" + sha256: c464428172cb986b758c6d1724c603097febb8fb855aa265aeecc9280c294d4a url: "https://pub.dev" source: hosted - version: "2.2.10" + version: "2.2.12" path_provider_foundation: dependency: transitive description: @@ -461,10 +461,10 @@ packages: dependency: transitive description: name: platform - sha256: "9b71283fc13df574056616011fb138fd3b793ea47cc509c189a6c3fa5f8a1a65" + sha256: "5d6b1b0036a5f331ebc77c850ebc8506cbc1e9416c27e59b439f917a902a4984" url: "https://pub.dev" source: hosted - version: "3.1.5" + version: "3.1.6" plugin_platform_interface: dependency: transitive description: @@ -501,10 +501,10 @@ packages: dependency: transitive description: name: sdl3 - sha256: "9998e3c40778978c9836d1460c40ab912e9fdc0ae83084d356913303deb2b14f" + sha256: abe5e6ffe27029f3de176a136503ada7ccd4d4c113e3beb32604d971a055e0f7 url: "https://pub.dev" source: hosted - version: "0.1.34" + version: "0.1.39" sdl_gamepad: dependency: transitive description: @@ -578,10 +578,10 @@ packages: dependency: transitive description: name: typed_data - sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c + sha256: f9049c039ebfeb4cf7a7104a675823cd72dba8297f264b6637062516699fa006 url: "https://pub.dev" source: hosted - version: "1.3.2" + version: "1.4.0" universal_io: dependency: transitive description: @@ -594,18 +594,18 @@ packages: dependency: "direct main" description: name: url_launcher - sha256: "21b704ce5fa560ea9f3b525b43601c678728ba46725bab9b01187b4831377ed3" + sha256: "9d06212b1362abc2f0f0d78e6f09f726608c74e3b9462e8368bb03314aa8d603" url: "https://pub.dev" source: hosted - version: "6.3.0" + version: "6.3.1" url_launcher_android: dependency: transitive description: name: url_launcher_android - sha256: e35a698ac302dd68e41f73250bd9517fe3ab5fa4f18fe4647a0872db61bacbab + sha256: "0dea215895a4d254401730ca0ba8204b29109a34a99fb06ae559a2b60988d2de" url: "https://pub.dev" source: hosted - version: "6.3.10" + version: "6.3.13" url_launcher_ios: dependency: transitive description: @@ -650,18 +650,18 @@ packages: dependency: transitive description: name: url_launcher_windows - sha256: "49c10f879746271804767cb45551ec5592cdab00ee105c06dddde1a98f73b185" + sha256: "44cf3aabcedde30f2dba119a9dea3b0f2672fbe6fa96e85536251d678216b3c4" url: "https://pub.dev" source: hosted - version: "3.1.2" + version: "3.1.3" uuid: dependency: transitive description: name: uuid - sha256: f33d6bb662f0e4f79dcd7ada2e6170f3b3a2530c28fc41f49a411ddedd576a77 + sha256: a5be9ef6618a7ac1e964353ef476418026db906c4facdedaa299b7a2e71690ff url: "https://pub.dev" source: hosted - version: "4.5.0" + version: "4.5.1" vector_math: dependency: transitive description: @@ -674,10 +674,10 @@ packages: dependency: "direct dev" description: name: very_good_analysis - sha256: "9ae7f3a3bd5764fb021b335ca28a34f040cd0ab6eec00a1b213b445dae58a4b8" + sha256: "1fb637c0022034b1f19ea2acb42a3603cbd8314a470646a59a2fb01f5f3a8629" url: "https://pub.dev" source: hosted - version: "5.1.0" + version: "6.0.0" vm_service: dependency: transitive description: @@ -698,18 +698,18 @@ packages: dependency: transitive description: name: win32 - sha256: "68d1e89a91ed61ad9c370f9f8b6effed9ae5e0ede22a270bdfa6daf79fc2290a" + sha256: e1d0cc62e65dc2561f5071fcbccecf58ff20c344f8f3dc7d4922df372a11df1f url: "https://pub.dev" source: hosted - version: "5.5.4" + version: "5.7.1" xdg_directories: dependency: transitive description: name: xdg_directories - sha256: faea9dee56b520b55a566385b84f2e8de55e7496104adada9962e0bd11bcff1d + sha256: "7a3f37b05d989967cdddcbb571f1ea834867ae2faa29725fd085180e0883aa15" url: "https://pub.dev" source: hosted - version: "1.0.4" + version: "1.1.0" xml: dependency: transitive description: @@ -727,5 +727,5 @@ packages: source: hosted version: "3.1.2" sdks: - dart: ">=3.5.2 <4.0.0" + dart: ">=3.5.3 <4.0.0" flutter: ">=3.24.0" diff --git a/pubspec.yaml b/pubspec.yaml index f695a8887..3a1753948 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -4,7 +4,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev version: 2024.9.26+15 # Always increment the build number, never go down, even on new versions environment: - sdk: ^3.2.2 + sdk: ^3.5.0 # Prefer to use `flutter pub add packageName` rather than modify this section by hand. dependencies: @@ -13,7 +13,7 @@ dependencies: burt_network: git: https://github.com/BinghamtonRover/Networking.git file_picker: ^8.0.0+1 - fl_chart: ^0.68.0 + fl_chart: ^0.69.0 flutter_libserialport: ^0.4.0 package_info_plus: ^8.0.0 flutter_resizable_container: ^3.0.0 @@ -26,12 +26,12 @@ dependencies: # Prefer to use `flutter pub add --dev packageName` rather than modify this section by hand. dev_dependencies: - flutter_launcher_icons: ^0.13.1 + flutter_launcher_icons: ^0.14.1 flutter_test: sdk: flutter - icons_launcher: ^2.1.0 + icons_launcher: ^3.0.0 msix: ^3.9.1 - very_good_analysis: ^5.0.0+1 + very_good_analysis: ^6.0.0 # Generates icons for the given platforms # Run: flutter pub run icons_launcher:create From c9d44a718e20c691df4b18feca52b4bc1abb4cf3 Mon Sep 17 00:00:00 2001 From: Levi Lesches Date: Mon, 28 Oct 2024 05:33:06 -0400 Subject: [PATCH 4/7] Upgraded to Java 17 --- android/app/build.gradle | 8 +++++--- android/gradle/wrapper/gradle-wrapper.properties | 4 +++- android/settings.gradle | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index fe88e2871..94f8bb707 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -23,16 +23,18 @@ if (flutterVersionName == null) { } android { + namespace "com.example.dashboard" + compileSdkVersion 34 ndkVersion flutter.ndkVersion compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 + sourceCompatibility JavaVersion.VERSION_17 + targetCompatibility JavaVersion.VERSION_17 } kotlinOptions { - jvmTarget = '1.8' + jvmTarget = '17' } sourceSets { diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties index cb24abda1..164080a81 100644 --- a/android/gradle/wrapper/gradle-wrapper.properties +++ b/android/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,7 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip +networkTimeout=10000 +validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip diff --git a/android/settings.gradle b/android/settings.gradle index 6f2cdec82..fa7b9e20e 100644 --- a/android/settings.gradle +++ b/android/settings.gradle @@ -18,7 +18,7 @@ pluginManagement { plugins { id "dev.flutter.flutter-plugin-loader" version "1.0.0" - id "com.android.application" version "7.1.2" apply false + id "com.android.application" version "7.3.0" apply false id "org.jetbrains.kotlin.android" version "1.8.21" apply false } From dc116e1ef4ac95e9471632b5686021688d8010c8 Mon Sep 17 00:00:00 2001 From: Levi Lesches Date: Mon, 28 Oct 2024 05:33:12 -0400 Subject: [PATCH 5/7] Re-instated workflow --- .github/workflows/publish.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index c115356dd..385e7fd19 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -25,7 +25,7 @@ jobs: - name: Setup Java uses: actions/setup-java@v1 with: - java-version: '12.x' + java-version: '17' - name: Load certificate run: | @@ -45,15 +45,14 @@ jobs: dart analyze dart run msix:create - # Temporarily removed because Android builds are broken - # - name: Build APK - # run: flutter build apk + - name: Build APK + run: flutter build apk - name: Create Release uses: softprops/action-gh-release@v0.1.15 with: - # build/app/outputs/apk/release/app-release.apk files: | + build/app/outputs/apk/release/app-release.apk build/windows/x64/runner/Release/Dashboard.msix name: ${{ github.ref_name }} generate_release_notes: true From bbf487b2f144f63fca7dbf9164e15da3bf4751d5 Mon Sep 17 00:00:00 2001 From: Levi Lesches Date: Mon, 28 Oct 2024 05:34:51 -0400 Subject: [PATCH 6/7] Version bump --- pubspec.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pubspec.yaml b/pubspec.yaml index 3a1753948..181ebf9ce 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: rover_dashboard description: Graphical application for remotely operating the rover. publish_to: 'none' # Remove this line if you wish to publish to pub.dev -version: 2024.9.26+15 # Always increment the build number, never go down, even on new versions +version: 2024.10.28+16 # Always increment the build number, never go down, even on new versions environment: sdk: ^3.5.0 @@ -52,7 +52,7 @@ flutter_launcher_icons: # Builds a Windows .msix App Installer file for the Dashboard. # Command: dart run msix:create msix_config: - msix_version: 2024.9.26.15 + msix_version: 2024.10.28.16 display_name: Dashboard publisher_display_name: Binghamton University Rover Team identity_name: edu.binghamton.rover From d6b2d06410d04f50a13ef8da201eba8165e29b1b Mon Sep 17 00:00:00 2001 From: Levi Lesches Date: Mon, 28 Oct 2024 06:19:22 -0400 Subject: [PATCH 7/7] Switch to flutter_libserialport fork --- android/settings.gradle | 4 ++-- pubspec.lock | 11 ++++++----- pubspec.yaml | 4 ++++ 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/android/settings.gradle b/android/settings.gradle index fa7b9e20e..5fd7f48b3 100644 --- a/android/settings.gradle +++ b/android/settings.gradle @@ -18,8 +18,8 @@ pluginManagement { plugins { id "dev.flutter.flutter-plugin-loader" version "1.0.0" - id "com.android.application" version "7.3.0" apply false - id "org.jetbrains.kotlin.android" version "1.8.21" apply false + id "com.android.application" version "7.4.2" apply false + id "org.jetbrains.kotlin.android" version "1.8.10" apply false } include ":app" diff --git a/pubspec.lock b/pubspec.lock index fd4a77ad8..82d8cfa24 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -186,11 +186,12 @@ packages: flutter_libserialport: dependency: "direct main" description: - name: flutter_libserialport - sha256: "20c320dcde8592a16f9badc0cacad61b1fb283dbec647b6ebfc1020f8274c67b" - url: "https://pub.dev" - source: hosted - version: "0.4.0" + path: "." + ref: HEAD + resolved-ref: "6d8b2807c132041da9fa06c34bce8a6f831ff1f5" + url: "https://github.com/snabble/flutter_libserialport.git" + source: git + version: "0.5.0" flutter_plugin_android_lifecycle: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 181ebf9ce..d838d417d 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -24,6 +24,10 @@ dependencies: collection: ^1.18.0 flutter_sdl_gamepad: ^1.0.0 +dependency_overrides: + flutter_libserialport: + git: https://github.com/snabble/flutter_libserialport.git + # Prefer to use `flutter pub add --dev packageName` rather than modify this section by hand. dev_dependencies: flutter_launcher_icons: ^0.14.1