简体   繁体   English

如何在更大的项目中添加新的 flutter 项目作为 IntelliJ 模块

[英]How to add a new flutter project as a IntelliJ module in a larger project

I have a single INTELLIJ project, with 4 java modules and 4 python modules, each is also pretty much a separate sub-project in gradle.我有一个 INTELLIJ 项目,有 4 个 java 模块和 4 个 python 模块,每个模块在 gradle 中几乎也是一个单独的子项目。 Now, in an i solated module in the same project I want a flutter app.现在,在同一个项目的一个独立模块中,我想要一个 flutter 应用程序。

Eventually I might want to make custom gradle tasks to run flutter as a subproject so that I can build all from gradle but that is way down the road.最终,我可能想要制作自定义 gradle 任务来运行 flutter 作为子项目,这样我就可以从 gradle 构建所有内容,但这是在路上。 Right now I'm trying to get the intelliJ flutter plugin to work with the flutter project as a module (instead of the base folder, one level down, app/flutterApp/[Anything Flutter Needs]).现在,我正在尝试让 intelliJ flutter 插件与 flutter 项目作为模块一起使用(而不是基本文件夹,向下一层,app/flutterApp/[Anything Flutter Needs])

The dream is to have these 9 projects in the same folder, master project, git and build pipeline as a single set without losing functionality... if it can happen without touching android studio even better.梦想是在同一个文件夹中拥有这 9 个项目,主项目,git 并将管道构建为一个单独的集合而不丢失功能......如果它可以在不接触 android 工作室的情况下发生,那就更好了。

Instructions (So far):说明(到目前为止):

  • File - new - module, then select flutter.文件 - 新 - 模块,然后是 select flutter。
  • Add the module in project structure so it's inline with the others (use dot notation to signify module groups/folders).在项目结构中添加模块,使其与其他模块内联(使用点符号表示模块组/文件夹)。
  • Add "Dart SDK", "Dart Packages" and "Flutter Plugins" Dependencies in the said tab of the module.在模块的上述选项卡中添加“Dart SDK”、“Dart Packages”和“Flutter Plugins”依赖项。
  • Set the flutter sdk location (File - Settings - Languages - Flutter)设置 flutter sdk 位置(文件 - 设置 - 语言 - 颤振)
  • RUN main.dart : This allows the flutter plugin to recognize it; RUN main.dart :这允许 flutter 插件识别它; sadly after figuring the rest out, this is what thwarted the effort.可悲的是,在找出 rest 之后,这就是阻碍努力的原因。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM