-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
88 lines (73 loc) · 2.11 KB
/
build.gradle.kts
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import com.google.protobuf.gradle.*
plugins {
id("com.google.protobuf") version "0.8.19"
val kotlinVersion = "1.6.21"
kotlin("jvm") version kotlinVersion
kotlin("plugin.spring") version kotlinVersion
id("org.springframework.boot") version "2.7.0"
id("io.spring.dependency-management") version "1.0.11.RELEASE"
id("maven-publish")
}
group = "org.example"
version = "1.0-SNAPSHOT"
repositories {
mavenCentral()
}
tasks.test {
useJUnitPlatform()
}
tasks.withType<KotlinCompile> {
kotlinOptions.jvmTarget = "1.8"
}
dependencyManagement {
imports {
mavenBom("com.linecorp.armeria:armeria-bom:1.16.0")
}
}
tasks.bootJar {
enabled = false
}
tasks.jar {
enabled = true
}
dependencies {
// spring
implementation("org.springframework.boot:spring-boot-starter-webflux")
// armeria
implementation("com.linecorp.armeria:armeria-spring-boot2-webflux-starter")
implementation("com.linecorp.armeria:armeria-grpc")
implementation("com.linecorp.armeria:armeria-kotlin")
testImplementation("org.springframework.boot:spring-boot-starter-test")
testImplementation("io.grpc:grpc-stub:1.47.0")
testImplementation("io.grpc:grpc-kotlin-stub:1.3.0")
testImplementation("io.grpc:grpc-protobuf:1.47.0")
testImplementation("com.google.protobuf:protobuf-kotlin:3.21.1")
testImplementation("com.linecorp.armeria:armeria-junit5")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-reactor")
implementation("com.fasterxml.jackson.module:jackson-module-kotlin")
}
protobuf {
protoc {
artifact = "com.google.protobuf:protoc:3.21.1"
}
plugins {
id("grpc") {
artifact = "io.grpc:protoc-gen-grpc-java:1.47.0"
}
id("grpckt") {
artifact = "io.grpc:protoc-gen-grpc-kotlin:1.3.0:jdk8@jar"
}
}
generateProtoTasks {
all().forEach {
it.plugins {
id("grpc")
id("grpckt")
}
it.builtins {
id("kotlin")
}
}
}
}