From 0811388f536a77cd3f334fb0c1bd5877a2f9eec5 Mon Sep 17 00:00:00 2001 From: Moritz Date: Wed, 13 Nov 2024 16:06:24 +0100 Subject: [PATCH] Rename --- pkgs/messages_builder/bin/messages_builder.dart | 2 +- pkgs/messages_builder/lib/message_data_builder.dart | 11 ++++------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/pkgs/messages_builder/bin/messages_builder.dart b/pkgs/messages_builder/bin/messages_builder.dart index b9a08917..321ed279 100644 --- a/pkgs/messages_builder/bin/messages_builder.dart +++ b/pkgs/messages_builder/bin/messages_builder.dart @@ -23,7 +23,7 @@ Future main(List args) async { final mapping = await MessageDataFileBuilder( inputFolder: inputFolder, outputFolder: outputFolder, - generationOptions: generationOptions, + options: generationOptions, ).run(); await MessageCallingCodeGenerator( diff --git a/pkgs/messages_builder/lib/message_data_builder.dart b/pkgs/messages_builder/lib/message_data_builder.dart index cf8aa3cc..aa392b3d 100644 --- a/pkgs/messages_builder/lib/message_data_builder.dart +++ b/pkgs/messages_builder/lib/message_data_builder.dart @@ -14,12 +14,12 @@ import 'message_file.dart'; class MessageDataFileBuilder { final Directory inputFolder; final Directory outputFolder; - final GenerationOptions generationOptions; + final GenerationOptions options; MessageDataFileBuilder({ required this.inputFolder, required this.outputFolder, - required this.generationOptions, + required this.options, }); Future> run() async { @@ -41,12 +41,9 @@ class MessageDataFileBuilder { print('Generating $arbFilePath, bundle this in your assets.'); final arbFileUri = Uri.file(arbFilePath); final arbFileContents = await File.fromUri(arbFileUri).readAsString(); - final messageBundle = await parseMessageFile( - arbFileContents, - generationOptions, - ); + final messageBundle = await parseMessageFile(arbFileContents, options); - final serializer = JsonSerializer(generationOptions.findById); + final serializer = JsonSerializer(options.findById); final data = _arbToData(messageBundle, arbFilePath, serializer);