Add protobuf Gradle setup and gRPC sync client skeleton

- Protobuf Gradle plugin with protoc, grpc-java, grpc-kotlin generators
- Dependencies: protobuf-kotlin-lite, grpc-kotlin-stub, grpc-okhttp,
  grpc-protobuf-lite
- Proto file at app/src/main/proto/engpad/v1/sync.proto
- SyncClient.kt: gRPC channel with TLS + credential metadata interceptor
- SyncManager.kt: notebook serialization to proto, sync/delete/list RPCs

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-24 20:55:34 -07:00
parent b8fb85c5f0
commit 16de63972a
5 changed files with 430 additions and 0 deletions

View File

@@ -11,6 +11,9 @@ core-ktx = "1.18.0"
activity-compose = "1.13.0"
junit = "4.13.2"
reorderable = "3.0.0"
protobuf = "4.29.3"
grpc = "1.69.0"
grpcKotlin = "1.4.1"
[libraries]
androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "core-ktx" }
@@ -38,6 +41,15 @@ coroutines-test = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-
junit = { group = "junit", name = "junit", version.ref = "junit" }
reorderable = { group = "sh.calvin.reorderable", name = "reorderable", version.ref = "reorderable" }
protobuf-kotlin-lite = { group = "com.google.protobuf", name = "protobuf-kotlin-lite", version.ref = "protobuf" }
protobuf-protoc = { group = "com.google.protobuf", name = "protoc", version.ref = "protobuf" }
grpc-okhttp = { group = "io.grpc", name = "grpc-okhttp", version.ref = "grpc" }
grpc-protobuf-lite = { group = "io.grpc", name = "grpc-protobuf-lite", version.ref = "grpc" }
grpc-stub = { group = "io.grpc", name = "grpc-stub", version.ref = "grpc" }
grpc-kotlin-stub = { group = "io.grpc", name = "grpc-kotlin-stub", version.ref = "grpcKotlin" }
grpc-protoc-gen-java = { group = "io.grpc", name = "protoc-gen-grpc-java", version.ref = "grpc" }
grpc-protoc-gen-kotlin = { group = "io.grpc", name = "protoc-gen-grpc-kotlin", version.ref = "grpcKotlin" }
[plugins]
android-application = { id = "com.android.application", version.ref = "agp" }
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }