feat: 控制指令消息改为protobuf二进制

This commit is contained in:
2026-07-15 17:03:58 +08:00
parent 92ad90cbeb
commit da1730ce19
21 changed files with 658 additions and 147 deletions

View File

@@ -1,5 +1,6 @@
plugins {
id 'com.android.application'
id 'com.google.protobuf'
}
def releaseTime() {
@@ -116,6 +117,19 @@ android {
}
}
protobuf {
protoc {
artifact = 'com.google.protobuf:protoc:3.25.1'
}
generateProtoTasks {
all().each { task ->
task.builtins {
java {}
}
}
}
}
dependencies {
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'com.google.android.material:material:1.11.0'
@@ -127,6 +141,8 @@ dependencies {
// OkHttp for WebSocket
implementation 'com.squareup.okhttp3:okhttp:4.12.0'
// Gson for JSON
// Gson for JSON(信令消息仍使用 JSON
implementation 'com.google.code.gson:gson:2.10.1'
// ProtobufDataChannel 控制指令二进制)
implementation 'com.google.protobuf:protobuf-java:3.25.1'
}