-
Notifications
You must be signed in to change notification settings - Fork 15
/
build.gradle.kts
53 lines (46 loc) · 1.16 KB
/
build.gradle.kts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
import com.google.protobuf.gradle.*
plugins {
java
idea
application
id("com.google.protobuf") version "0.8.14"
id("io.freefair.lombok") version "5.3.0"
}
repositories {
mavenCentral()
jcenter()
}
val grpcVersion = "1.34.1"
val protocVersion = "3.12.0"
val slf4jVersion = "1.7.25"
dependencies {
implementation("io.grpc:grpc-netty:${grpcVersion}")
implementation("io.grpc:grpc-protobuf:${grpcVersion}")
implementation("io.grpc:grpc-stub:${grpcVersion}")
implementation("org.slf4j:slf4j-api:${slf4jVersion}")
implementation("org.slf4j:slf4j-simple:${slf4jVersion}")
implementation("javax.annotation:javax.annotation-api:1.3.2")
testImplementation("junit:junit:4.13")
}
sourceSets {
main {
proto {
srcDir("src/main/resources/proto")
}
}
}
protobuf {
protoc { artifact = "com.google.protobuf:protoc:${protocVersion}" }
plugins {
id("grpc") {
artifact = "io.grpc:protoc-gen-grpc-java:${grpcVersion}"
}
}
generateProtoTasks {
ofSourceSet("main").forEach {
it.plugins {
id("grpc")
}
}
}
}