forked from domnikl/schema-registry-gitops
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
99 lines (82 loc) · 3.02 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
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import org.jetbrains.gradle.ext.ProjectSettings
import org.jetbrains.gradle.ext.TaskTriggersConfig
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
java
kotlin("jvm") version "1.9.22"
kotlin("plugin.spring") version "1.9.22"
id("com.github.johnrengelman.shadow") version "8.1.1"
id("org.jlleitschuh.gradle.ktlint") version "11.6.1"
id("org.jetbrains.gradle.plugin.idea-ext") version "1.1.7"
jacoco
}
group = "dev.domnikl"
version = "1.9.0"
repositories {
mavenCentral()
maven { url = uri("https://packages.confluent.io/maven/") }
maven { url = uri("https://jitpack.io") }
}
dependencies {
implementation("org.jetbrains.kotlin:kotlin-reflect")
implementation("org.jetbrains.kotlin:kotlin-stdlib")
implementation("info.picocli:picocli:4.7.5")
implementation("org.slf4j:slf4j-api:2.0.12")
implementation("ch.qos.logback:logback-classic:1.4.14")
implementation("ch.qos.logback:logback-core:1.4.14")
implementation("com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.16.1")
implementation("com.fasterxml.jackson.core:jackson-databind:2.16.1")
implementation("com.fasterxml.jackson.module:jackson-module-kotlin:2.16.1")
constraints {
implementation("com.google.code.gson:gson:2.8.9") {
because("CVE-2022-25647")
}
implementation("org.apache.commons:commons-compress:1.24.0") {
because("CVE-2023-42503")
}
}
implementation("io.confluent:kafka-schema-registry-client:7.6.0")
implementation("io.confluent:kafka-protobuf-serializer:7.6.0")
implementation("io.confluent:kafka-json-schema-serializer:7.6.0")
implementation("com.github.everit-org.json-schema:org.everit.json.schema:1.14.4")
implementation("io.github.java-diff-utils:java-diff-utils:4.12")
testImplementation(platform("org.junit:junit-bom:5.10.2"))
testImplementation("org.junit.jupiter:junit-jupiter")
testImplementation("io.mockk:mockk:1.13.9")
testImplementation("com.github.stefanbirkner:system-rules:1.19.0")
}
tasks {
withType<KotlinCompile> {
kotlinOptions {
jvmTarget = JavaVersion.VERSION_17.majorVersion
}
}
val versionTxt = register("versionTxt") {
doLast {
val outputDir = File("${sourceSets.main.get().output.resourcesDir}/version.txt")
if (outputDir.exists()) outputDir.writeText("${project.version}")
}
}
withType<ShadowJar> {
dependsOn(versionTxt)
archiveFileName.set("schema-registry-gitops.jar")
}
withType<Jar> {
dependsOn(versionTxt)
manifest {
attributes["Main-Class"] = "dev.domnikl.schemaregistrygitops.MainKt"
}
}
}
idea {
project {
this as ExtensionAware
configure<ProjectSettings> {
this as ExtensionAware
configure<TaskTriggersConfig> {
afterSync(tasks.findByName("ktlintApplyToIdea"))
}
}
}
}