From 4db7a1decabf4d9dabdf1b4f8761b80fa839533a Mon Sep 17 00:00:00 2001 From: Scott Murray Date: Wed, 15 Nov 2023 08:06:48 +0900 Subject: Rename config directory to avoid collisions The application was failing to build due to the presence of the "config" directory, which seems to conflict with the generation of files with "flutter config" during builds with meta-flutter's flutter-app bbclass. Rename the directory and update references to it to allow building. Bug-AGL: SPEC-4969 Change-Id: I5d36d8fb2c91f0a1aa6c4deb86a040424bc35ac5 Signed-off-by: Scott Murray --- app-config/config.yaml | 2 ++ config/config.yaml | 2 -- lib/data/data_providers/vehicle_notifier.dart | 2 +- pubspec.yaml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) create mode 100644 app-config/config.yaml delete mode 100644 config/config.yaml diff --git a/app-config/config.yaml b/app-config/config.yaml new file mode 100644 index 0000000..138fe4b --- /dev/null +++ b/app-config/config.yaml @@ -0,0 +1,2 @@ +hostname: localhost +port: 55556 diff --git a/config/config.yaml b/config/config.yaml deleted file mode 100644 index 138fe4b..0000000 --- a/config/config.yaml +++ /dev/null @@ -1,2 +0,0 @@ -hostname: localhost -port: 55556 diff --git a/lib/data/data_providers/vehicle_notifier.dart b/lib/data/data_providers/vehicle_notifier.dart index 7842311..b12cbfd 100644 --- a/lib/data/data_providers/vehicle_notifier.dart +++ b/lib/data/data_providers/vehicle_notifier.dart @@ -127,7 +127,7 @@ class VehicleNotifier extends StateNotifier { String hostName = 'localhost'; int port = 8080; try { - var data = await rootBundle.loadString('config/config.yaml'); + var data = await rootBundle.loadString('app-config/config.yaml'); final dynamic yamlMap = loadYaml(data); if (yamlMap.containsKey('hostname')) { diff --git a/pubspec.yaml b/pubspec.yaml index 5dc5224..6aa9639 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -82,7 +82,7 @@ flutter: - assets/ - animations/ - animations/hybrid_model/ - - config/ + - app-config/ # An image asset can refer to one or more resolution-specific "variants", see # https://flutter.dev/assets-and-images/#resolution-aware -- cgit 1.2.3-korg