-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
63 lines (52 loc) · 1.86 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
plugins {
id 'java'
id 'application'
id 'com.github.johnrengelman.shadow' version '6.1.0'
}
group = 'kmql'
version = '0.7.0'
repositories {
jcenter()
}
dependencies {
compileOnly 'org.projectlombok:lombok:1.18.16'
annotationProcessor 'org.projectlombok:lombok:1.18.16'
testCompileOnly 'org.projectlombok:lombok:1.18.16'
testAnnotationProcessor 'org.projectlombok:lombok:1.18.16'
implementation 'info.picocli:picocli:4.5.1'
annotationProcessor 'info.picocli:picocli-codegen:4.5.1'
implementation 'org.jline:jline:3.16.0'
implementation 'org.apache.kafka:kafka-clients:2.4.1'
implementation 'com.h2database:h2:1.4.200'
implementation 'com.jakewharton.fliptables:fliptables:1.1.0'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.11.3'
testImplementation 'junit:junit:4.13'
testImplementation 'org.mockito:mockito-core:3.5.15'
}
task executable {
dependsOn 'shadowJar'
doLast {
File scriptFile = new File(project.rootDir, "${project.name}.sh")
File jarFile = new File(project.buildDir, "libs/${project.name}-${project.version}-all.jar")
File outDir = new File(project.buildDir, "distributions")
outDir.mkdirs()
File outFile = new File(outDir, "${project.name}-${project.version}")
outFile.setBytes(new byte[0])
outFile.append(scriptFile.newInputStream())
outFile.append(jarFile.newInputStream())
outFile.setExecutable(true, false)
}
}
assemble.dependsOn('executable')
task executableZip(type: Zip) {
dependsOn 'executable'
from "${project.buildDir}/distributions/${project.name}-${project.version}"
destinationDirectory = new File(project.buildDir, "distributions")
archiveFileName = "${project.name}-bin-${project.version}.zip"
}
application {
mainClassName = 'kmql.Kmql'
}
run {
standardInput System.in
}