Repository navigation
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
71 lines (66 loc) · 1.8 KB
/
Copy pathbuild.gradle.kts
File metadata and controls
71 lines (66 loc) · 1.8 KB
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
59
60
61
62
63
64
65
66
67
68
69
70
71
import com.google.protobuf.gradle.generateProtoTasks
import com.google.protobuf.gradle.id
import com.google.protobuf.gradle.ofSourceSet
import com.google.protobuf.gradle.plugins
import com.google.protobuf.gradle.protobuf
import com.google.protobuf.gradle.protoc
plugins {
`java-library`
id("com.google.protobuf") version "0.8.15"
id("org.hypertrace.publish-plugin")
id("org.hypertrace.avro-plugin")
}
val generateLocalGoGrpcFiles = false
protobuf {
protoc {
artifact = "com.google.protobuf:protoc:3.17.3"
}
plugins {
id("grpc_java") {
artifact = "io.grpc:protoc-gen-grpc-java:1.45.1"
}
if (generateLocalGoGrpcFiles) {
id("grpc_go") {
path = "<go-path>/bin/protoc-gen-go"
}
}
}
generateProtoTasks {
ofSourceSet("main").forEach {
it.plugins {
// Apply the "grpc" plugin whose spec is defined above, without options.
id("grpc_java")
if (generateLocalGoGrpcFiles) {
id("grpc_go")
}
}
it.builtins {
java
if (generateLocalGoGrpcFiles) {
id("go")
}
}
}
}
}
sourceSets {
main {
java {
srcDirs("src/main/java", "build/generated/source/proto/main/java", "build/generated/source/proto/main/grpc_java")
}
}
}
dependencies {
api("com.google.api.grpc:proto-google-common-protos:2.7.1")
api("org.apache.avro:avro:1.10.2")
constraints {
api("org.apache.commons:commons-compress:1.21") {
because("Multiple vulnerabilities in avro-declared version")
}
implementation("com.fasterxml.jackson.core:jackson-databind:2.13.2.2") {
because("Denial of Service (DoS) " +
"[High Severity][https://snyk.io/vuln/SNYK-JAVA-COMFASTERXMLJACKSONCORE-2421244] in " +
"com.fasterxml.jackson.core:jackson-databind@2.13.1")
}
}
}