-
Notifications
You must be signed in to change notification settings - Fork 72
/
Copy pathbuild.gradle
80 lines (65 loc) · 2.31 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
plugins {
id 'java'
id 'groovy'
id 'application'
id 'idea'
id 'jacoco'
id 'org.inferred.processors' version '1.2.10'
id "net.ltgt.apt" version "0.21"
id 'com.github.johnrengelman.shadow' version '4.0.4'
}
apply plugin: 'net.ltgt.apt-idea'
group 'com.devshawn'
mainClassName = 'com.devshawn.kafka.gitops.MainCommand'
sourceCompatibility = 1.8
repositories {
mavenCentral()
}
dependencies {
compile group: 'org.apache.kafka', name: 'kafka-clients', version: '2.4.0'
compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.10.1'
compile "com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.9.8"
compile "com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.10.2"
compile 'info.picocli:picocli:4.1.4'
compile 'org.slf4j:slf4j-api:1.7.30'
compile group: 'ch.qos.logback', name: 'logback-classic', version: '1.2.3'
compile group: 'ch.qos.logback', name: 'logback-core', version: '1.2.3'
processor 'org.inferred:freebuilder:2.5.0'
testCompile group: 'junit', name: 'junit', version: '4.12'
testCompile group: 'org.codehaus.groovy', name: 'groovy-all', version: '2.4.4'
testCompile group: 'org.spockframework', name: 'spock-core', version: '1.0-groovy-2.4'
testCompile group: 'cglib', name: 'cglib-nodep', version: '2.2'
testCompile group: 'com.github.stefanbirkner', name: 'system-rules', version: '1.19.0'
testCompile group: 'org.skyscreamer', name: 'jsonassert', version: '1.5.0'
}
jacocoTestReport {
reports {
xml.enabled = true
html.enabled = true
xml.destination "${buildDir}/reports/jacoco/report.xml"
}
afterEvaluate {
classDirectories = files(classDirectories.files.collect {
fileTree(dir: it,
excludes: [
'**/*_Builder*/**',
])
})
}
}
jar {
manifest {
attributes(
'Class-Path': configurations.compile.collect { it.getName() }.join(' '),
'Main-Class': 'com.devshawn.kafka.gitops.MainCommand'
)
}
}
task buildExecutableJar(type: Exec) {
commandLine "sh", "build.sh"
}
task buildRelease(type: Zip, group: "build") {
from("$buildDir/output")
}
buildRelease.dependsOn buildExecutableJar
buildExecutableJar.dependsOn shadowJar