-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
44 lines (36 loc) · 951 Bytes
/
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
plugins {
id 'java'
id 'checkstyle'
id 'de.aaschmid.cpd' version '3.1'
}
checkstyle {
toolVersion '8.38'
ignoreFailures false
showViolations true
def checkstyleConfigPath = "$rootDir/checkstyle.xml"
def checkstyleConfig = new File(checkstyleConfigPath)
if (!checkstyleConfig.exists()) {
new URL(
"https://github.com/raw/fartem/repository-rules/master/rules/java/checkstyle-custom/checkstyle.xml"
).withInputStream {
i -> checkstyleConfig.withOutputStream {
it << i
}
}
}
configFile file(checkstyleConfigPath)
}
checkstyleMain {
source = 'src/main/java'
}
cpd {
language = 'java'
}
repositories {
mavenCentral()
maven { url "https://jitpack.io" }
}
dependencies {
checkstyle 'com.github.fartem:checkstyle-checks-java:1.1.0'
testCompile group: 'junit', name: 'junit', version: '4.12'
}