This repository has been archived by the owner on May 5, 2024. It is now read-only.
forked from devshawn/kafka-gitops
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
106 lines (90 loc) · 3.27 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
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
plugins {
id 'java'
id 'groovy'
id 'application'
id 'idea'
id 'jacoco'
id 'org.inferred.processors' version '3.7.0'
id 'com.github.johnrengelman.shadow' version '8.1.1'
id "org.sonarqube" version "5.0.0.4638"
}
group 'com.devshawn'
mainClassName = 'com.devshawn.kafka.gitops.MainCommand'
repositories {
mavenCentral()
}
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(21))
vendor.set(JvmVendorSpec.AZUL)
}
}
dependencies {
implementation group: 'org.apache.kafka', name: 'kafka-clients', version: '3.7.0'
implementation platform('com.fasterxml.jackson:jackson-bom:2.17.1')
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind'
implementation "com.fasterxml.jackson.dataformat:jackson-dataformat-yaml"
implementation "com.fasterxml.jackson.datatype:jackson-datatype-jdk8"
implementation 'info.picocli:picocli:4.7.5'
implementation 'org.slf4j:slf4j-api:2.0.13'
implementation group: 'ch.qos.logback', name: 'logback-classic', version: '1.5.6'
implementation group: 'ch.qos.logback', name: 'logback-core', version: '1.5.6'
annotationProcessor 'org.inferred:freebuilder:2.8.0'
compileOnly 'org.inferred:freebuilder:2.8.0'
testImplementation 'org.junit.jupiter:junit-jupiter:5.10.2'
testCompileOnly group: 'junit', name: 'junit', version: '4.13.2'
testRuntimeOnly 'org.junit.vintage:junit-vintage-engine'
testImplementation group: 'org.apache.groovy', name: 'groovy', version: '4.0.21'
testImplementation group: 'org.spockframework', name: 'spock-core', version: '2.3-groovy-4.0'
testImplementation group: 'org.spockframework', name:'spock-junit4', version: '2.3-groovy-4.0'
testImplementation group: 'cglib', name: 'cglib-nodep', version: '3.3.0'
testImplementation group: 'com.github.stefanbirkner', name: 'system-rules', version: '1.19.0'
testImplementation group: 'org.skyscreamer', name: 'jsonassert', version: '1.5.1'
}
test {
useJUnitPlatform()
jvmArgs([
"--add-opens", "java.base/java.util=ALL-UNNAMED",
"--add-opens", "java.base/java.lang=ALL-UNNAMED"
])
}
jacocoTestReport {
dependsOn test
reports {
xml.required = true
html.required = true
xml.outputLocation.set(file("${buildDir}/reports/jacoco/report.xml"))
}
afterEvaluate {
classDirectories.setFrom(files(classDirectories.files.collect {
fileTree(dir: it,
excludes: [
'**/*_Builder*/**',
])
}))
}
}
jar {
manifest {
attributes(
'Class-Path': configurations.runtimeClasspath.collect { it.getName() }.join(' '),
'Main-Class': 'com.devshawn.kafka.gitops.MainCommand'
)
}
}
task buildExecutableJar(type: Exec) {
dependsOn shadowJar
commandLine "sh", "build.sh"
}
task buildRelease(type: Zip, group: "build") {
dependsOn buildExecutableJar
from("$buildDir/output")
}
sonar {
skipProject = providers.environmentVariable("SONAR_TOKEN").getOrElse("").isBlank()
properties {
property "sonar.projectKey", "joschi_kafka-gitops"
property "sonar.organization", "joschi"
property "sonar.host.url", "https://sonarcloud.io"
}
}