-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
48 lines (39 loc) · 932 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
45
46
47
48
plugins {
id 'java'
id 'checkstyle'
id 'de.aaschmid.cpd' version '3.2'
}
group 'com.smlnskgmail.jaman.checkstyle'
version '1.2.3'
checkstyle {
toolVersion '8.41.1'
ignoreFailures false
showViolations true
def checkstyleConfigPath = "$rootDir/checkstyle.xml"
def checkstyleConfig = new File(checkstyleConfigPath)
if (!checkstyleConfig.exists()) {
new URL(
"https://raw.githubusercontent.com/fartem/repository-rules/master/rules/java/checkstyle/checkstyle.xml"
).withInputStream {
i -> checkstyleConfig.withOutputStream {
it << i
}
}
}
configFile file(checkstyleConfigPath)
}
checkstyleMain {
source = 'src/main/java'
}
cpd {
language = 'java'
}
cpdCheck {
exclude '*.java'
}
repositories {
mavenCentral()
}
dependencies {
implementation 'com.puppycrawl.tools:checkstyle:8.41.1'
}