-
Notifications
You must be signed in to change notification settings - Fork 0
/
grpc.gradle
42 lines (38 loc) · 808 Bytes
/
grpc.gradle
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
protobuf {
protoc {
artifact = "com.google.protobuf:protoc:3.7.1"
}
plugins {
grpc {
artifact = "io.grpc:protoc-gen-grpc-java:1.19.0"
}
}
generateProtoTasks {
ofSourceSet('main').each { task ->
task.builtins {
java {
outputSubDir = 'proto_gen'
}
}
task.plugins {
grpc {
outputSubDir = 'proto_gen'
}
}
}
}
generatedFilesBaseDir = "$projectDir/src/"
}
task cleanProtoGen {
doFirst {
delete("$projectDir/src/main/proto_gen")
}
}
clean.dependsOn cleanProtoGen
sourceSets {
main {
java {
srcDirs += 'src/main/proto_gen'
}
}
}