Skip to content

Commit

Permalink
Move generated protobuf package
Browse files Browse the repository at this point in the history
  • Loading branch information
wasdennnoch committed Nov 28, 2024
1 parent e2e47ce commit 9198371
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
2 changes: 1 addition & 1 deletion proto/ratelimit.proto
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
syntax = "proto3";

option java_multiple_files = true;
option java_package = "gg.beemo.vanilla";
option java_package = "gg.beemo.vanilla.proto";
option java_outer_classname = "RatelimitProto";

package ratelimit;
Expand Down
15 changes: 9 additions & 6 deletions vanilla/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ plugins {
group = "gg.beemo.vanilla"
version = "1.0.0"

val grpcVersion = "1.68.0"
val grpcKotlinStubVersion = "1.4.1"
val grpcProtobufVersion = "4.28.2"

dependencies {
// Kotlin
val kotlinCoroutinesVersion = "1.9.0"
Expand All @@ -17,11 +21,10 @@ dependencies {
implementation("gg.beemo.latte:latte")

// gRPC
val grpcVersion = "1.68.0"
implementation("io.grpc:grpc-netty-shaded:$grpcVersion")
implementation("io.grpc:grpc-protobuf:$grpcVersion")
implementation("io.grpc:grpc-kotlin-stub:1.4.1")
implementation("com.google.protobuf:protobuf-kotlin:4.28.2")
implementation("io.grpc:grpc-kotlin-stub:$grpcKotlinStubVersion")
implementation("com.google.protobuf:protobuf-kotlin:$grpcProtobufVersion")

// Logging
val log4jVersion = "2.24.1"
Expand All @@ -32,14 +35,14 @@ dependencies {

protobuf {
protoc {
artifact = "com.google.protobuf:protoc:4.28.2"
artifact = "com.google.protobuf:protoc:$grpcProtobufVersion"
}
plugins {
create("grpc") {
artifact = "io.grpc:protoc-gen-grpc-java:1.68.0"
artifact = "io.grpc:protoc-gen-grpc-java:$grpcVersion"
}
create("grpckt") {
artifact = "io.grpc:protoc-gen-grpc-kotlin:1.4.1:jdk8@jar"
artifact = "io.grpc:protoc-gen-grpc-kotlin:$grpcKotlinStubVersion:jdk8@jar"
}
}
generateProtoTasks {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
package gg.beemo.vanilla

import gg.beemo.latte.logging.Log
import gg.beemo.vanilla.proto.RatelimitGrpcKt
import gg.beemo.vanilla.proto.RatelimitQuota
import gg.beemo.vanilla.proto.ratelimitQuota
import gg.beemo.vanilla.proto.RatelimitRequest
import gg.beemo.vanilla.proto.RatelimitType
import kotlinx.coroutines.sync.Mutex
import kotlinx.coroutines.sync.withLock
import java.util.*
Expand Down

0 comments on commit 9198371

Please sign in to comment.