-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
58 lines (50 loc) · 1.18 KB
/
build.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
buildscript {
ext {
protobufVersion = '3.21.12'
protobufPluginVersion = '0.9.2'
grpcVersion = '1.52.1'
}
buildDir = 'src/build/proto/java'
}
plugins {
id 'java-library'
id 'com.google.protobuf' version "${protobufPluginVersion}"
}
repositories {
mavenCentral()
}
dependencies {
implementation "io.grpc:grpc-protobuf:${grpcVersion}"
implementation "io.grpc:grpc-stub:${grpcVersion}"
compileOnly 'jakarta.annotation:jakarta.annotation-api:1.3.5' // Java 9+ compatibility - Do NOT update to 2.0.0
}
sourceSets {
main {
proto {
// In addition to the default 'src/main/proto'
srcDir 'api/proto/reportportal'
}
}
}
protobuf {
// Configure the protoc executable
protoc {
artifact = "com.google.protobuf:protoc:${protobufVersion}"
}
clean {
delete generatedFilesBaseDir
}
// Locate the codegen plugins
plugins {
grpc {
artifact = "io.grpc:protoc-gen-grpc-java:${grpcVersion}"
}
}
generateProtoTasks {
all().configureEach { task ->
task.plugins {
grpc {}
}
}
}
}