Skip to content

Commit

Permalink
maint: Bump Flutter and Yaru major versions (#965)
Browse files Browse the repository at this point in the history
Updates Flutter and Yaru to the newest major versions. As a side effect,
some other packages had to be bumped as well as some minor code updates.

----

UDENG-5290
  • Loading branch information
ashuntu authored Nov 19, 2024
2 parents b8cd5ae + 6cea573 commit c6c1db5
Show file tree
Hide file tree
Showing 10 changed files with 128 additions and 47 deletions.
4 changes: 2 additions & 2 deletions gui/packages/ubuntupro/lib/core/agent_monitor.dart
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ class AgentStartupMonitor {
await File(_addrFilePath!).parent.create(recursive: true);
final watch = agentDir.watch(events: FileSystemEvent.create).firstWhere(
(event) =>
p.canonicalize(event.path) == p.canonicalize(_addrFilePath!),
p.canonicalize(event.path) == p.canonicalize(_addrFilePath),
);
if (!await agentLauncher()) {
// Terminal state, cannot recover nor retry.
Expand Down Expand Up @@ -197,7 +197,7 @@ class AgentStartupMonitor {
Future<void> reset() async {
if (_addrFilePath != null) {
try {
await File(_addrFilePath!).delete();
await File(_addrFilePath).delete();
} on PathNotFoundException {
// TODO: Log
// ignore: avoid_print
Expand Down
4 changes: 2 additions & 2 deletions gui/packages/ubuntupro/lib/core/environment.dart
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ class Environment {
/// Checks first in the overrides map and the falls back to
/// Platform.environment map.
String? operator [](String key) {
if (_overrides != null && _overrides!.containsKey(key)) {
return _overrides![key];
if (_overrides != null && _overrides.containsKey(key)) {
return _overrides[key];
}

return Platform.environment[key];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,7 @@ class _ConfigTypeRadio extends StatelessWidget {
selectionColor: Theme.of(context).colorScheme.tertiaryContainer,
child: YaruRadioListTile(
contentPadding: EdgeInsets.zero,
visualDensity: VisualDensity.compact,
dense: true,
title: Text(title),
subtitle: Text(subtitle),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#include <gtk/gtk_plugin.h>
#include <p4w_ms_store/p4w_ms_store_plugin.h>
#include <screen_retriever/screen_retriever_plugin.h>
#include <screen_retriever_linux/screen_retriever_linux_plugin.h>
#include <url_launcher_linux/url_launcher_plugin.h>
#include <window_manager/window_manager_plugin.h>
#include <yaru_window_linux/yaru_window_linux_plugin.h>
Expand All @@ -20,9 +20,9 @@ void fl_register_plugins(FlPluginRegistry* registry) {
g_autoptr(FlPluginRegistrar) p4w_ms_store_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "P4wMsStorePlugin");
p4w_ms_store_plugin_register_with_registrar(p4w_ms_store_registrar);
g_autoptr(FlPluginRegistrar) screen_retriever_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "ScreenRetrieverPlugin");
screen_retriever_plugin_register_with_registrar(screen_retriever_registrar);
g_autoptr(FlPluginRegistrar) screen_retriever_linux_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "ScreenRetrieverLinuxPlugin");
screen_retriever_linux_plugin_register_with_registrar(screen_retriever_linux_registrar);
g_autoptr(FlPluginRegistrar) url_launcher_linux_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "UrlLauncherPlugin");
url_launcher_plugin_register_with_registrar(url_launcher_linux_registrar);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
list(APPEND FLUTTER_PLUGIN_LIST
gtk
p4w_ms_store
screen_retriever
screen_retriever_linux
url_launcher_linux
window_manager
yaru_window_linux
Expand Down
136 changes: 108 additions & 28 deletions gui/packages/ubuntupro/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,18 @@ packages:
dependency: transitive
description:
name: animated_vector
sha256: e15c6596549ca6e2e7491c11fbe168a1dead87475a828a4bc81cf104feca0432
sha256: f1beb10e6fcfd8bd15abb788e20345def786d1c7391d7c1426bb2a1f2adf2132
url: "https://pub.dev"
source: hosted
version: "0.2.0"
version: "0.2.2"
animated_vector_annotations:
dependency: transitive
description:
name: animated_vector_annotations
sha256: baa6b4ed98407220f2c9634f7da3cfa5eedb46798e090466f441e666e2f7c8c0
sha256: "07c1ea603a2096f7eb6f1c2b8f16c3c330c680843ea78b7782a3217c3c53f979"
url: "https://pub.dev"
source: hosted
version: "0.2.0"
version: "0.2.2"
archive:
dependency: transitive
description:
Expand All @@ -58,6 +58,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.5.0"
assorted_layout_widgets:
dependency: transitive
description:
name: assorted_layout_widgets
sha256: "5b7f7c76a1a4c7cf95edfb854c3ed09ce9cb7f25a372f2d9a8d4c1569d42ecfb"
url: "https://pub.dev"
source: hosted
version: "9.0.2"
async:
dependency: "direct main"
description:
Expand Down Expand Up @@ -226,6 +234,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.3.6"
dbus:
dependency: transitive
description:
name: dbus
sha256: "365c771ac3b0e58845f39ec6deebc76e3276aa9922b0cc60840712094d9047ac"
url: "https://pub.dev"
source: hosted
version: "0.7.10"
fake_async:
dependency: transitive
description:
Expand Down Expand Up @@ -288,10 +304,10 @@ packages:
dependency: "direct dev"
description:
name: flutter_lints
sha256: "3f41d009ba7172d5ff9be5f6e6e6abb4300e263aab8866d2a0842ed2a70f8f0c"
sha256: "5398f14efa795ffb7a33e9b6a08798b26a180edac4ad7db3f231e40f82ce11e1"
url: "https://pub.dev"
source: hosted
version: "4.0.0"
version: "5.0.0"
flutter_localizations:
dependency: "direct main"
description: flutter
Expand Down Expand Up @@ -392,6 +408,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "4.0.1"
gsettings:
dependency: transitive
description:
name: gsettings
sha256: "1b0ce661f5436d2db1e51f3c4295a49849f03d304003a7ba177d01e3a858249c"
url: "https://pub.dev"
source: hosted
version: "0.2.8"
gtk:
dependency: transitive
description:
Expand Down Expand Up @@ -513,10 +537,10 @@ packages:
dependency: transitive
description:
name: lints
sha256: "976c774dd944a42e83e2467f4cc670daef7eed6295b10b36ae8c85bcbf828235"
sha256: "3315600f3fb3b135be672bf4a178c55f274bebe368325ae18462c89ac1e3b413"
url: "https://pub.dev"
source: hosted
version: "4.0.0"
version: "5.0.0"
logging:
dependency: transitive
description:
Expand Down Expand Up @@ -549,6 +573,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "0.11.1"
matrix4_transform:
dependency: transitive
description:
name: matrix4_transform
sha256: "42c42610deecc382be2653f4a21358537401bd5b027c168a174c7c6a64959908"
url: "https://pub.dev"
source: hosted
version: "3.0.1"
meta:
dependency: "direct main"
description:
Expand Down Expand Up @@ -644,6 +676,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "3.1.5"
platform_linux:
dependency: transitive
description:
name: platform_linux
sha256: "856cfc9871e3ff3df6926991729d24bba9b70d0229ae377fa08b562344baaaa8"
url: "https://pub.dev"
source: hosted
version: "0.1.2"
plugin_platform_interface:
dependency: transitive
description:
Expand Down Expand Up @@ -720,10 +760,42 @@ packages:
dependency: transitive
description:
name: screen_retriever
sha256: "6ee02c8a1158e6dae7ca430da79436e3b1c9563c8cf02f524af997c201ac2b90"
sha256: "570dbc8e4f70bac451e0efc9c9bb19fa2d6799a11e6ef04f946d7886d2e23d0c"
url: "https://pub.dev"
source: hosted
version: "0.1.9"
version: "0.2.0"
screen_retriever_linux:
dependency: transitive
description:
name: screen_retriever_linux
sha256: f7f8120c92ef0784e58491ab664d01efda79a922b025ff286e29aa123ea3dd18
url: "https://pub.dev"
source: hosted
version: "0.2.0"
screen_retriever_macos:
dependency: transitive
description:
name: screen_retriever_macos
sha256: "71f956e65c97315dd661d71f828708bd97b6d358e776f1a30d5aa7d22d78a149"
url: "https://pub.dev"
source: hosted
version: "0.2.0"
screen_retriever_platform_interface:
dependency: transitive
description:
name: screen_retriever_platform_interface
sha256: ee197f4581ff0d5608587819af40490748e1e39e648d7680ecf95c05197240c0
url: "https://pub.dev"
source: hosted
version: "0.2.0"
screen_retriever_windows:
dependency: transitive
description:
name: screen_retriever_windows
sha256: "449ee257f03ca98a57288ee526a301a430a344a161f9202b4fcc38576716fe13"
url: "https://pub.dev"
source: hosted
version: "0.2.0"
shelf:
dependency: transitive
description:
Expand Down Expand Up @@ -1013,10 +1085,10 @@ packages:
dependency: transitive
description:
name: window_manager
sha256: "8699323b30da4cdbe2aa2e7c9de567a6abd8a97d9a5c850a3c86dcd0b34bbfbf"
sha256: "732896e1416297c63c9e3fb95aea72d0355f61390263982a47fd519169dc5059"
url: "https://pub.dev"
source: hosted
version: "0.3.9"
version: "0.4.3"
windows_single_instance:
dependency: "direct main"
description:
Expand All @@ -1033,6 +1105,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.2.0"
xdg_directories:
dependency: transitive
description:
name: xdg_directories
sha256: "7a3f37b05d989967cdddcbb571f1ea834867ae2faa29725fd085180e0883aa15"
url: "https://pub.dev"
source: hosted
version: "1.1.0"
xml:
dependency: transitive
description:
Expand All @@ -1053,58 +1133,58 @@ packages:
dependency: "direct main"
description:
name: yaru
sha256: e868965bcfbca568f54916e3f59a636a8a6ee39f2e102df8844061cd78a8d20e
sha256: afc659f78a0bef5e06ebbbd516979afceca7526b7703daa444bf419a54b2dc85
url: "https://pub.dev"
source: hosted
version: "4.1.0"
version: "5.3.2"
yaru_test:
dependency: "direct dev"
description:
name: yaru_test
sha256: f6a4cb60706950fa09e6d86d4db0770432124ad7924f6220cc01c66bf6e45caa
sha256: d45f0099db88e997e69218d232fd27d9c024a4fe4d918371b3012b3b95b8e419
url: "https://pub.dev"
source: hosted
version: "0.1.6"
version: "0.2.0"
yaru_window:
dependency: transitive
description:
name: yaru_window
sha256: c9d16f78962652ad71aa160ab0a1e2e5924359439303394f980fd00eefc905eb
sha256: bc2a1df3c6f33477b47f84bf0a9325df411dbb7bd483ac88e5bc1c019d2f2560
url: "https://pub.dev"
source: hosted
version: "0.2.1"
version: "0.2.1+1"
yaru_window_linux:
dependency: transitive
description:
name: yaru_window_linux
sha256: "3676355492eba0461f03acf1b7420f7885982d1bffe113fccdca9415fbe39f5d"
sha256: "46a1a0743dfd45794cdaf8c5b3a48771ab73632b50a693f59c83b07988e96689"
url: "https://pub.dev"
source: hosted
version: "0.2.0"
version: "0.2.1"
yaru_window_manager:
dependency: transitive
description:
name: yaru_window_manager
sha256: "2d358263d19ae6598df21d6d8c0d25e75c79a82f459b63b0013a13e395c48b23"
sha256: b36c909fa082a7cb6e2f259d4357e16f08d3d8ab086685b81d1916e457100d1e
url: "https://pub.dev"
source: hosted
version: "0.1.2"
version: "0.1.2+1"
yaru_window_platform_interface:
dependency: transitive
description:
name: yaru_window_platform_interface
sha256: e9f8cd34e207d7f7b771ae70dee347ed974cee06b981819c4181b3e474e52254
sha256: "93493d7e17a9e887ffa94c518bc5a4b3eb5425c009446e3294c689cb1a87b7e1"
url: "https://pub.dev"
source: hosted
version: "0.1.2"
version: "0.1.2+1"
yaru_window_web:
dependency: transitive
description:
name: yaru_window_web
sha256: "3ff30758a330d7626d54643df0cca6c179782f401aba7752da9cc0d60c9a6f74"
sha256: "31468aeb515f72d5eeddcd62773094a4f48fee96f7f0494f8ce53ad3b38054f1"
url: "https://pub.dev"
source: hosted
version: "0.0.3"
version: "0.0.3+1"
sdks:
dart: ">=3.4.0 <4.0.0"
flutter: ">=3.22.0"
dart: ">=3.5.0 <4.0.0"
flutter: ">=3.24.0"
10 changes: 5 additions & 5 deletions gui/packages/ubuntupro/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev
version: 1.0.0+1

environment:
sdk: ">=3.0.0 <4.0.0"
flutter: ">=3.22.0 <3.23.0"
sdk: ">=3.5.0 <4.0.0"
flutter: ">=3.24.0"

# Dependencies specify other packages that your package needs in order to work.
# To automatically upgrade your package dependencies to the latest versions
Expand Down Expand Up @@ -61,7 +61,7 @@ dependencies:
win32_registry: ^1.1.5
windows_single_instance: ^1.0.1
wizard_router: ^1.2.0
yaru: ^4.0.0
yaru: ^5.3.2

dev_dependencies:
build_runner: ^2.4.8
Expand All @@ -70,7 +70,7 @@ dev_dependencies:
# activated in the `analysis_options.yaml` file located at the root of your
# package. See that file for information about deactivating specific lint
# rules and activating additional ones.
flutter_lints: ^4.0.0
flutter_lints: ^5.0.0
flutter_test:
sdk: flutter
ini: ^2.1.0
Expand All @@ -79,7 +79,7 @@ dev_dependencies:
nested: ^1.0.0
protobuf: ^3.1.0
stack_trace: ^1.11.0
yaru_test: ^0.1.5
yaru_test: ^0.2.0

# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@
#include "generated_plugin_registrant.h"

#include <p4w_ms_store/p4w_ms_store_plugin_c_api.h>
#include <screen_retriever/screen_retriever_plugin.h>
#include <screen_retriever_windows/screen_retriever_windows_plugin_c_api.h>
#include <url_launcher_windows/url_launcher_windows.h>
#include <window_manager/window_manager_plugin.h>
#include <windows_single_instance/windows_single_instance_plugin.h>

void RegisterPlugins(flutter::PluginRegistry* registry) {
P4wMsStorePluginCApiRegisterWithRegistrar(
registry->GetRegistrarForPlugin("P4wMsStorePluginCApi"));
ScreenRetrieverPluginRegisterWithRegistrar(
registry->GetRegistrarForPlugin("ScreenRetrieverPlugin"));
ScreenRetrieverWindowsPluginCApiRegisterWithRegistrar(
registry->GetRegistrarForPlugin("ScreenRetrieverWindowsPluginCApi"));
UrlLauncherWindowsRegisterWithRegistrar(
registry->GetRegistrarForPlugin("UrlLauncherWindows"));
WindowManagerPluginRegisterWithRegistrar(
Expand Down
Loading

0 comments on commit c6c1db5

Please sign in to comment.