Art*_*ski 5 module dart dart-pub flutter flutter-dependencies
我想将一个颤振项目组织成一个具有以下要求的多包项目:
我现在拥有的存储库的文件设置是:
.
??? app_base
? ??? ...
? ??? pubspec.yaml
??? feature
? ??? ...
? ??? pubspec.yaml
??? README.md
Run Code Online (Sandbox Code Playgroud)
我尝试在以下内容中使用这样的路径依赖项app_base/pubspec.yaml
:
name: app_base
dependencies:
feature:
path: ../feature
Run Code Online (Sandbox Code Playgroud)
它适用于本地开发,但如果我尝试app_base
在一个完全不同的项目中使用并且不使用路径而是使用 git 依赖项:
name: actual_app
dependencies:
app_base:
git:
url: ssh://address.to/the_repo.git
path: app_base
ref: deadbaca
Run Code Online (Sandbox Code Playgroud)
它无法解决传递feature
依赖:
Running "flutter packages get" in actual_app...
Error on line 21, column 11: Invalid description: "../feature" is a relative path, but this isn't a local pubspec.
path: ../feature
^^^^^^^^^^
pub get failed (65)
Process finished with exit code 65
Run Code Online (Sandbox Code Playgroud)
有没有办法让它既适用于本地开发又用作其他项目的 git 依赖项?
归档时间: |
|
查看次数: |
1760 次 |
最近记录: |