From eb6c1211faebf44454c81f97b88716f2aac460a5 Mon Sep 17 00:00:00 2001 From: M Date: Wed, 31 Mar 2021 12:09:30 +0300 Subject: [PATCH] Changed build instruction for android. Fixed generation of localization files script. --- howto-build-android.md | 6 +++++- tool/generate_localization.dart | 6 ++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/howto-build-android.md b/howto-build-android.md index 9b8d6e44e..dff95d17c 100644 --- a/howto-build-android.md +++ b/howto-build-android.md @@ -125,6 +125,10 @@ Next, we must generate key properties based on the secure keystore you generated **REMINDER:** The *above* command will **not** succeed unless you replaced the `storePassword` and `keyPassword` variables with the correct passwords for your keystore. +Then we need to generate localization files. + +`$ flutter packages pub run tool/generate_localization.dart` + Lastly, we will generate mobx models for the project. `$ flutter packages pub run build_runner build --delete-conflicting-outputs` @@ -133,4 +137,4 @@ Lastly, we will generate mobx models for the project. `$ flutter build apk —release` -Copyright (c) 2021 Cake Technologies LLC. \ No newline at end of file +Copyright (c) 2021 Cake Technologies LLC. diff --git a/tool/generate_localization.dart b/tool/generate_localization.dart index ee9196bb3..6744aa8a2 100644 --- a/tool/generate_localization.dart +++ b/tool/generate_localization.dart @@ -27,6 +27,12 @@ Future main(List args) async { }) : {srcDir : inputPath}; + final outputDir = Directory(outputPath); + + if (!outputDir.existsSync()) { + await outputDir.create(); + } + extraInfo.forEach((key, dynamic value) async { if (key != srcDir) { print('Wrong key: $key');