-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
110 lines (99 loc) · 3.29 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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import io.spring.gradle.dependencymanagement.dsl.DependencyManagementExtension
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 {
id("org.springframework.boot") version "2.3.4.RELEASE"
id("io.spring.dependency-management") version "1.0.10.RELEASE"
id("com.google.protobuf") version "0.8.13"
id("org.jetbrains.kotlin.plugin.noarg") version "1.3.72"
id("org.jetbrains.kotlin.plugin.jpa") version "1.3.72"
kotlin("jvm") version "1.3.72"
kotlin("plugin.spring") version "1.3.72"
}
group = "dsm.service"
version = "0.8"
java.sourceCompatibility = JavaVersion.VERSION_1_8
repositories {
mavenCentral()
}
dependencies {
implementation(kotlin("stdlib-jdk8"))
implementation("org.springframework.boot:spring-boot-starter-web")
implementation("org.springframework.boot:spring-boot-starter-data-jpa")
implementation("com.fasterxml.jackson.module:jackson-module-kotlin")
implementation("org.springframework.boot:spring-boot-starter-data-mongodb")
implementation("com.google.protobuf:protobuf-java-util:3.13.0")
implementation("io.grpc:grpc-protobuf:1.31.1")
implementation("io.grpc:grpc-kotlin-stub:0.2.0")
implementation("io.github.lognet:grpc-spring-boot-starter:4.0.0")
implementation("org.jetbrains.kotlin:kotlin-reflect")
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
implementation("com.orbitz.consul:consul-client:1.4.0")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.8")
implementation("io.jaegertracing:jaeger-client:1.4.0")
implementation("com.googlecode.json-simple:json-simple:1.1.1")
implementation("mysql:mysql-connector-java:8.0.21")
developmentOnly("org.springframework.boot:spring-boot-devtools")
testImplementation("org.springframework.boot:spring-boot-starter-test") {
exclude(group = "org.junit.vintage", module = "junit-vintage-engine")
}
}
tasks.withType<Test> {
useJUnitPlatform()
}
tasks {
compileKotlin {
kotlinOptions.jvmTarget = "1.8"
}
compileTestKotlin {
kotlinOptions.jvmTarget = "1.8"
}
}
tasks.withType<KotlinCompile> {
kotlinOptions {
freeCompilerArgs = listOf("-Xjsr305=strict")
jvmTarget = "1.8"
}
}
sourceSets {
main {
java {
setSrcDirs(
listOf(
"build/generated/source/proto/main/grpc",
"build/generated/source/proto/main/grpckt",
"build/generated/source/proto/main/java"
)
)
}
}
}
protobuf {
protoc {
artifact = "com.google.protobuf:protoc:3.13.0"
}
plugins {
id("grpc") {
artifact = "io.grpc:protoc-gen-grpc-java:1.31.1"
}
id("grpckt") {
artifact = "io.grpc:protoc-gen-grpc-kotlin:0.2.0:jdk7@jar"
}
}
generateProtoTasks {
ofSourceSet("main").forEach {
it.plugins {
id("grpc")
id("grpckt")
}
}
}
}
allOpen {
annotation("javax.persistence.Entity")
}