build JsonSerializable models in sub-modules with build_runner

北战南征 提交于 2021-01-29 06:09:24

问题


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?

来源:https://stackoverflow.com/questions/60374539/build-jsonserializable-models-in-sub-modules-with-build-runner

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!