refactor: generate dart pb files with feature flag: dart

This commit is contained in:
appflowy
2022-02-08 14:57:16 +08:00
parent 9135b92a39
commit d0b02cb4fd
42 changed files with 172 additions and 573 deletions

View File

@ -7,7 +7,7 @@ edition = "2018"
[dependencies]
flowy-derive = { path = "../../../shared-lib/flowy-derive" }
error-code = { path = "../../../shared-lib/error-code" }
error-code = { path = "../../../shared-lib/error-code"}
lib-dispatch = { path = "../lib-dispatch" }
protobuf = {version = "2.20.0"}
bytes = "1.0"
@ -27,6 +27,7 @@ ot = ["lib-ot"]
serde = ["serde_json"]
http_server = ["http-flowy"]
db = ["flowy-database", "lib-sqlite", "r2d2"]
dart = ["error-code/dart", "lib-infra/dart"]
[build-dependencies]
lib-infra = { path = "../../../shared-lib/lib-infra", features = ["gen_pb"] }
lib-infra = { path = "../../../shared-lib/lib-infra", features = ["pb_gen"] }

View File

@ -1,5 +1,5 @@
use lib_infra::pb;
use lib_infra::pb_gen;
fn main() {
pb::gen("flowy-error", "./src/protobuf/proto");
pb_gen::gen("flowy-error", "./src/protobuf/proto");
}