I have a Flutter project with sub-modules:
- root Flutter project
- Flutter module 1
- Flutter module 2
...
- Flutter module N
Each module contains classes annotated with @JsonSerializable()
.
Currently i build models with this script:
for dir in [DIR_LIST]
do
echo "Building models in ${dir}"
cd ${BASE_DIR}/${dir}
flutter packages pub run build_runner build --delete-conflicting-outputs
done
Is there a way to build every sub-module in my project with a single command in the root directory instead of cycle each directory?