forked from eigr/grpc_bench
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
58 lines (49 loc) · 1.29 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
plugins {
id("com.github.johnrengelman.shadow") version "7.0.0"
id("io.micronaut.application") version "1.5.0"
id("com.google.protobuf") version "0.8.15"
}
version = "0.1"
group = "com.example"
repositories {
mavenCentral()
}
micronaut {
testRuntime("junit5")
processing {
incremental(true)
annotations("com.example.*")
}
}
dependencies {
implementation("io.micronaut:micronaut-runtime")
implementation("io.micronaut.grpc:micronaut-grpc-runtime")
implementation("javax.annotation:javax.annotation-api")
runtimeOnly("ch.qos.logback:logback-classic")
implementation("io.micronaut:micronaut-validation")
testImplementation("io.micronaut:micronaut-http-client")
}
application {
mainClass.set("helloworld.Application")
}
java {
sourceCompatibility = JavaVersion.toVersion("16")
targetCompatibility = JavaVersion.toVersion("16")
}
sourceSets {
main {
java {
srcDirs("build/generated/source/proto/main/grpc")
srcDirs("build/generated/source/proto/main/java")
}
}
}
protobuf {
protoc { artifact = "com.google.protobuf:protoc:3.14.0" }
plugins {
grpc { artifact = "io.grpc:protoc-gen-grpc-java:1.33.1" }
}
generateProtoTasks {
all()*.plugins { grpc {} }
}
}