-
Notifications
You must be signed in to change notification settings - Fork 210
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
48 lines (42 loc) · 1.4 KB
/
build.gradle.kts
File metadata and controls
48 lines (42 loc) · 1.4 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
import com.google.protobuf.gradle.*
plugins {
id("ai.smoke-test-jar")
id("com.google.protobuf") version "0.9.5"
}
val grpcVersion = "1.26.0" // first version with support for arm64
val nettyVersion = "4.1.42.Final"
protobuf {
protoc {
// Download compiler rather than using locally installed version:
artifact = "com.google.protobuf:protoc:3.11.0" // needs to be aligned with the grpc version above
}
plugins {
id("grpc") {
artifact = "io.grpc:protoc-gen-grpc-java:$grpcVersion"
}
}
generateProtoTasks {
all().configureEach {
plugins {
id("grpc")
}
}
}
}
dependencies {
implementation("org.springframework.boot:spring-boot-starter-web:2.5.12")
implementation("io.grpc:grpc-core:$grpcVersion")
implementation("io.grpc:grpc-netty:$grpcVersion")
implementation("io.grpc:grpc-protobuf:$grpcVersion")
implementation("io.grpc:grpc-stub:$grpcVersion")
// need to use netty version aligned with grpc version, and not managed version used in agent
implementation(enforcedPlatform("io.netty:netty-bom:$nettyVersion"))
}
afterEvaluate {
// Classpath when compiling protos, we add dependency management directly
// since it doesn't follow Gradle conventions of naming / properties.
dependencies {
add("compileProtoPath", platform(project(":dependencyManagement")))
add("smokeTestCompileProtoPath", platform(project(":dependencyManagement")))
}
}