Add generation of of pubspec to app_config.sh

This commit is contained in:
M 2022-01-11 11:35:08 +02:00
parent 8d2c21deec
commit 0d39db1bdc
3 changed files with 4 additions and 1 deletions

View file

@ -22,4 +22,5 @@ esac
cd ../.. cd ../..
flutter pub get flutter pub get
flutter pub run tool/generate_pubspec.dart
flutter packages pub run tool/configure.dart $CONFIG_ARGS flutter packages pub run tool/configure.dart $CONFIG_ARGS

View file

@ -25,6 +25,8 @@ case $APP_IOS_TYPE in
;; ;;
esac esac
flutter pub get
flutter pub run tool/generate_pubspec.dart
flutter packages pub run tool/configure.dart $CONFIG_ARGS flutter packages pub run tool/configure.dart $CONFIG_ARGS
cd $DIR cd $DIR
$DIR/app_icon.sh $DIR/app_icon.sh

View file

@ -279,7 +279,7 @@ Future<void> generatePubspec({bool hasMonero, bool hasBitcoin}) async {
cw_bitcoin: cw_bitcoin:
path: ./cw_bitcoin path: ./cw_bitcoin
"""; """;
final inputFile = File(pubspecDefaultPath); final inputFile = File(pubspecOutputPath);
final inputText = await inputFile.readAsString(); final inputText = await inputFile.readAsString();
final inputLines = inputText.split('\n'); final inputLines = inputText.split('\n');
final dependenciesIndex = inputLines.indexWhere((line) => line.toLowerCase() == 'dependencies:'); final dependenciesIndex = inputLines.indexWhere((line) => line.toLowerCase() == 'dependencies:');