diff --git a/Makefile b/Makefile index f3673629..62b317c9 100755 --- a/Makefile +++ b/Makefile @@ -103,8 +103,6 @@ clean: ## build proto proto: $(VALD_DIR) $(JAVA_ROOT) @$(call green, "generating .java files...") - sed -i '/lint:/a \ ignore: [v1]' $(PROTO_ROOT)/buf.yaml - echo 'build:\n excludes: [v1/agent/sidecar, v1/discoverer, v1/manager]' >> $(PROTO_ROOT)/buf.yaml ./gradlew bufGenerate \ bufFormatApply \ bufFormatCheck \ diff --git a/buf.gen.yaml b/buf.gen.yaml index a6c02dc8..3fb5a5ad 100644 --- a/buf.gen.yaml +++ b/buf.gen.yaml @@ -1,6 +1,6 @@ -version: v1 +version: v2 plugins: - - plugin: buf.build/grpc/java + - remote: buf.build/grpc/java out: main/java - - plugin: buf.build/protocolbuffers/java:v25.3 + - remote: buf.build/protocolbuffers/java:v25.3 out: main/java diff --git a/buf.lock b/buf.lock new file mode 100644 index 00000000..fe0ef317 --- /dev/null +++ b/buf.lock @@ -0,0 +1,9 @@ +# Generated by buf. DO NOT EDIT. +version: v2 +deps: + - name: buf.build/bufbuild/protovalidate + commit: 1baebb0a15184714854fa1ddfd22a29b + digest: b5:6ee11b05d5f54b6257c79c3141eb1050723c4433cf490259ba1d8c02cd08c3e325625527b00fec4dc8b338901f1f3c567ef7ff0698b1c92d09b2dfa6f516c1e6 + - name: buf.build/googleapis/googleapis + commit: 28151c0d0a1641bf938a7672c500e01d + digest: b5:93b70089baa4fc05a92d3e52db91a4b7812db3b57b9664f6cb301733938cb630e377a938e8a56779388171c749c1d42a2e9a6c6230f2ff45f127a8102a6a27d0 diff --git a/buf.work.yaml b/buf.work.yaml deleted file mode 100644 index 221856c9..00000000 --- a/buf.work.yaml +++ /dev/null @@ -1,3 +0,0 @@ -version: v1 -directories: - - vald/apis/proto diff --git a/buf.yaml b/buf.yaml new file mode 100644 index 00000000..126e37d3 --- /dev/null +++ b/buf.yaml @@ -0,0 +1,25 @@ +version: v2 +modules: + - path: vald/apis/proto + excludes: + - vald/apis/proto/v1/agent/sidecar + - vald/apis/proto/v1/discoverer + - vald/apis/proto/v1/manager +deps: + - buf.build/bufbuild/protovalidate + - buf.build/googleapis/googleapis +lint: + use: + - DEFAULT + except: + - FIELD_NOT_REQUIRED + - PACKAGE_NO_IMPORT_CYCLE + ignore: + - vald/apis/proto/v1 + disallow_comment_ignores: true +breaking: + use: + - FILE + except: + - EXTENSION_NO_DELETE + - FIELD_SAME_DEFAULT