generated from nelkinda-templates/template-java-multi-gradle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
147 lines (125 loc) · 4.2 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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
buildscript {
repositories {
mavenCentral()
maven {
url 'https://plugins.gradle.org/m2/'
}
}
dependencies {
classpath 'name.remal:gradle-plugins:1.0.199'
classpath 'org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:3.0'
classpath 'info.solidsoft.gradle.pitest:gradle-pitest-plugin:1.5.1'
}
}
plugins {
id 'name.remal.check-updates' version '1.0.199'
}
allprojects {
repositories {
jcenter()
}
}
ext {
cucumberVersion = '6.1.2'
junitVersion = '4.13'
junitJupiterVersion = '5.6.2'
junitPlatformVersion = '1.6.2'
mockitoVersion = '3.3.3'
pmdVersion = '6.24.0'
}
subprojects {
version '0.0.1-SNAPSHOT'
}
configure(subprojects) {
apply plugin: 'java'
apply plugin: 'checkstyle'
apply plugin: 'pmd'
apply plugin: 'jacoco'
apply plugin: 'name.remal.sonarlint'
apply plugin: 'org.sonarqube'
apply plugin: 'info.solidsoft.pitest'
apply plugin: 'name.remal.check-updates'
sourceCompatibility = 8
dependencies {
checkstyle 'com.puppycrawl.tools:checkstyle:8.33'
implementation 'org.junit.jupiter:junit-jupiter-api:5.6.2'
testImplementation "io.cucumber:cucumber-java:$rootProject.ext.cucumberVersion"
testImplementation "io.cucumber:cucumber-junit:$rootProject.ext.cucumberVersion"
testImplementation "io.cucumber:cucumber-junit-platform-engine:$rootProject.ext.cucumberVersion"
testImplementation "junit:junit:$rootProject.ext.junitVersion"
testImplementation "org.junit.jupiter:junit-jupiter:$rootProject.ext.junitJupiterVersion"
testImplementation "org.junit.jupiter:junit-jupiter-api:$rootProject.ext.junitJupiterVersion"
testImplementation "org.junit.jupiter:junit-jupiter-engine:$rootProject.ext.junitJupiterVersion"
testImplementation "org.junit.jupiter:junit-jupiter-params:$rootProject.ext.junitJupiterVersion"
testImplementation "org.junit.platform:junit-platform-commons:$rootProject.ext.junitPlatformVersion"
testImplementation "org.junit.platform:junit-platform-engine:$rootProject.ext.junitPlatformVersion"
testImplementation "org.junit.vintage:junit-vintage-engine:$rootProject.ext.junitJupiterVersion"
testImplementation "org.mockito:mockito-core:$rootProject.ext.mockitoVersion"
pitest 'org.pitest:pitest-junit5-plugin:0.12'
pitest 'org.pitest:pitest-command-line:1.5.2'
}
checkDependencyUpdates {
failIfUpdatesFound = true
}
checkstyleMain {
configFile = file("../config/checkstyle/checkstyleMain.xml")
maxWarnings = 0
}
checkstyleTest {
configFile = file("../config/checkstyle/checkstyleTest.xml")
maxWarnings = 0
}
jacocoTestCoverageVerification {
violationRules {
rule {
limit {
minimum = 1.0
}
}
}
}
check.dependsOn jacocoTestCoverageVerification
jacocoTestReport {
reports {
xml.enabled true
csv.enabled true
html.enabled true
}
}
test.finalizedBy jacocoTestReport
pitest {
targetClasses = ['com.nelkinda.systemassert.*']
pitestVersion = '1.5.2'
timestampedReports = false
testPlugin = 'junit5'
outputFormats = ['XML', 'HTML']
mutators = ['DEFAULTS', 'STRONGER', 'CONSTRUCTOR_CALLS', 'INLINE_CONSTS', 'REMOVE_CONDITIONALS', 'REMOVE_INCREMENTS']
mutationThreshold = 100
coverageThreshold = 100
}
pmd {
ruleSets = []
consoleOutput = true
dependencies {
pmd "net.sourceforge.pmd:pmd:$rootProject.ext.pmdVersion"
pmd "net.sourceforge.pmd:pmd-core:$rootProject.ext.pmdVersion"
pmd "net.sourceforge.pmd:pmd-java:$rootProject.ext.pmdVersion"
}
}
pmdMain {
ruleSetFiles = files("../config/pmd/pmdMain.xml")
}
pmdTest {
ruleSetFiles = files("../config/pmd/pmdTest.xml")
}
test {
useJUnitPlatform()
}
}
checkDependencyUpdates {
failIfUpdatesFound = true
}
wrapper {
gradleVersion '6.5'
distributionType = Wrapper.DistributionType.ALL
}