-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
133 lines (111 loc) · 3.03 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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
buildscript {
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
}
}
plugins {
id "com.github.spotbugs" version "4.5.1"
}
apply plugin: 'application'
apply plugin: 'pmd'
apply plugin: 'checkstyle'
apply plugin: 'eclipse'
sourceCompatibility = "1.11"
targetCompatibility = "1.11"
configurations.all {
// Check for updates every build
resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
}
allprojects {
repositories {
jcenter()
maven {
url "https://oss.sonatype.org/content/repositories/snapshots/"
}
maven {
url 'https://packages.confluent.io/maven/'
}
}
}
dependencies {
implementation('org.industrial-devops:titan-ccp-common:0.1.0-SNAPSHOT') { changing = true }
implementation('org.industrial-devops:titan-ccp-common-kafka:0.1.0-SNAPSHOT') { changing = true }
implementation 'org.apache.kafka:kafka-streams:2.6.0'
implementation 'com.google.guava:guava:20.0'
implementation 'org.slf4j:slf4j-simple:1.7.25'
// Use JUnit test framework
testImplementation 'junit:junit:4.12'
testImplementation 'com.github.stefanbirkner:system-rules:1.17.0'
testImplementation 'org.apache.kafka:kafka-streams-test-utils:2.6.0'
testImplementation('io.confluent:kafka-streams-avro-serde:5.5.1') {
// exclude, because introduces older version with higher number 5.5.1-ccs
exclude group: 'org.apache.kafka', module: 'kafka-clients'
}
}
mainClassName = mainClass
distTar {
archiveFileName = rootProject.name + '.tar'
}
// Replace values in the application.properties file
import org.apache.tools.ant.filters.*
processResources {
filter ReplaceTokens, tokens: [
"application.name": rootProject.name,
"application.version": version
]
}
pmd {
ruleSets = [] // Gradle requires to clean the rule sets first
ruleSetFiles = files("config/pmd.xml")
ignoreFailures = false
toolVersion = "6.7.0"
}
checkstyle {
configDirectory = file("config")
configFile = file("config/checkstyle.xml")
maxWarnings = 0
ignoreFailures = false
toolVersion = "8.12"
}
spotbugs {
excludeFilter = file("config/spotbugs-exclude-filter.xml")
reportLevel = "low"
effort = "max"
ignoreFailures = false
toolVersion = '4.1.3'
}
// Per default XML reports for SpotBugs are generated
// Include this to generate HTML reports
tasks.withType(com.github.spotbugs.snom.SpotBugsTask) {
reports {
// Either HTML or XML reports can be activated
html.enabled true
xml.enabled false
}
}
task checkstyle {
group 'Quality Assurance'
description 'Run Checkstyle'
dependsOn 'checkstyleMain'
dependsOn 'checkstyleTest'
}
task pmd {
group 'Quality Assurance'
description 'Run PMD'
dependsOn 'pmdMain'
dependsOn 'pmdTest'
}
task spotbugs {
group 'Quality Assurance'
description 'Run SpotBugs'
dependsOn 'spotbugsMain'
dependsOn 'spotbugsTest'
}
eclipse {
classpath {
downloadSources=true
downloadJavadoc=true
}
}