-
Notifications
You must be signed in to change notification settings - Fork 2.5k
/
Copy pathbuild.gradle.kts
98 lines (80 loc) · 2.68 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
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import com.google.protobuf.gradle.*
plugins {
kotlin("jvm") version "2.1.10"
application
id("java")
id("idea")
id("com.google.protobuf") version "0.9.4"
id("com.github.johnrengelman.shadow") version "8.1.1"
}
group = "io.opentelemetry"
version = "1.0"
val grpcVersion = "1.71.0"
val protobufVersion = "4.30.0"
repositories {
mavenCentral()
gradlePluginPortal()
}
dependencies {
implementation("com.google.protobuf:protobuf-java:${protobufVersion}")
testImplementation(kotlin("test"))
implementation(kotlin("script-runtime"))
implementation("org.apache.kafka:kafka-clients:3.9.0")
implementation("com.google.api.grpc:proto-google-common-protos:2.53.0")
implementation("io.grpc:grpc-protobuf:${grpcVersion}")
implementation("io.grpc:grpc-stub:${grpcVersion}")
implementation("io.grpc:grpc-netty:${grpcVersion}")
implementation("io.grpc:grpc-services:${grpcVersion}")
implementation("io.opentelemetry:opentelemetry-api:1.48.0")
implementation("io.opentelemetry:opentelemetry-sdk:1.48.0")
implementation("io.opentelemetry:opentelemetry-extension-annotations:1.18.0")
implementation("org.apache.logging.log4j:log4j-core:2.24.3")
implementation("org.slf4j:slf4j-api:2.0.17")
implementation("com.google.protobuf:protobuf-kotlin:${protobufVersion}")
implementation("dev.openfeature:sdk:1.14.1")
implementation("dev.openfeature.contrib.providers:flagd:0.11.5")
if (JavaVersion.current().isJava9Compatible) {
// Workaround for @javax.annotation.Generated
// see: https://github.com/grpc/grpc-java/issues/3633
implementation("javax.annotation:javax.annotation-api:1.3.2")
}
}
tasks {
shadowJar {
mergeServiceFiles()
}
}
tasks.test {
useJUnitPlatform()
}
tasks.withType<KotlinCompile> {
kotlinOptions.jvmTarget = "17"
}
protobuf {
protoc {
artifact = "com.google.protobuf:protoc:${protobufVersion}"
}
plugins {
id("grpc") {
artifact = "io.grpc:protoc-gen-grpc-java:${grpcVersion}"
}
}
generateProtoTasks {
ofSourceSet("main").forEach {
it.plugins {
// Apply the "grpc" plugin whose spec is defined above, without
// options. Note the braces cannot be omitted, otherwise the
// plugin will not be added. This is because of the implicit way
// NamedDomainObjectContainer binds the methods.
id("grpc") { }
}
}
}
}
application {
mainClass.set("frauddetection.MainKt")
}
tasks.jar {
manifest.attributes["Main-Class"] = "frauddetection.MainKt"
}