test[protobuf]: test proto generation

This commit is contained in:
godotg
2023-12-11 13:01:42 +08:00
parent b042863fd1
commit 692d477ec0
2 changed files with 6 additions and 1 deletions
@@ -18,6 +18,9 @@ public class PbGenerateOperation {
private String protoPath;
private String outputPath;
private String javaPackage;
/**
* 生成的类是否是record
*/
private boolean recordClass = false;
public String getProtoPath() {
+3 -1
View File
@@ -8,6 +8,7 @@ option java_package = "start";
// start_protocol_id = 100
// 如果protobuf的字段的tag超过1000,则视这个字段为需要兼容的协议字段
message AllType {
bool field1 = 1;
bytes field2 = 2;
@@ -24,6 +25,7 @@ message AllType {
sint32 field14 = 14;
sint64 field15 = 15;
string field16 = 16;
// 这是注释
uint32 field17 = 17;
uint64 field18 = 18;
uint64 field18 = 1001;
}