-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
97 lines (82 loc) · 2.43 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
plugins {
id 'java'
id 'application'
id 'distribution'
id 'com.github.jk1.dependency-license-report' version '2.0'
id "com.diffplug.spotless" version "6.25.0"
}
group 'org.jlab'
version new File("${projectDir}/VERSION").text.trim()
ext.releaseDate = new Date().format('MMM dd yyyy')
tasks.withType(JavaCompile).configureEach {
options.release = 11
options.encoding = 'UTF-8'
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
}
repositories {
mavenCentral()
maven {
url "https://packages.confluent.io/maven"
}
}
dependencies {
implementation "org.apache.kafka:kafka-streams:3.5.0",
"io.confluent:kafka-streams-avro-serde:7.4.0",
"org.apache.avro:avro:1.11.2",
"org.slf4j:slf4j-log4j12:1.7.36",
"org.jlab:jaws-libj:5.0.0"
testImplementation "org.apache.kafka:kafka-streams-test-utils:3.5.0",
"junit:junit:4.13.2"
}
test {
testLogging {
events "passed", "skipped", "failed"
exceptionFormat "full"
}
}
jar {
archiveFileName = 'jaws-registrations2epics.jar'
}
application {
mainClass.set('org.jlab.jaws.Registrations2Epics')
}
build {
dependsOn(installDist)
}
installDist.dependsOn(generateLicenseReport)
distTar.dependsOn(generateLicenseReport)
distZip.dependsOn(generateLicenseReport)
run {
classpath += files('src/test/resources')
environment "BOOTSTRAP_SERVERS", "localhost:9094"
environment "SCHEMA_REGISTRY", "http://localhost:8081"
environment "STATE_DIR", project.file('build/kafka-streams')
environment "CREATE_SOURCE_TOPIC", "yes"
}
distributions {
main {
contents {
from("build/reports/dependency-license") {
into "dependency-license"
}
from('config') {
into 'config'
}
}
}
}
startScripts {
classpath += files('config')
// https://discuss.gradle.org/t/classpath-in-application-plugin-is-building-always-relative-to-app-home-lib-directory/2012
doLast {
def windowsScriptFile = file getWindowsScript()
def unixScriptFile = file getUnixScript()
windowsScriptFile.text = windowsScriptFile.text.replace('%APP_HOME%\\lib\\config', '%APP_HOME%\\config')
unixScriptFile.text = unixScriptFile.text.replace('$APP_HOME/lib/config', '$APP_HOME/config')
}
}
spotless {
java {
googleJavaFormat()
}
}