Skip to content

Commit 513cba9

Browse files
committed
Upgrade Gradle and frameworks
1 parent 221400a commit 513cba9

File tree

13 files changed

+267
-222
lines changed

13 files changed

+267
-222
lines changed

build.gradle

Lines changed: 25 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ plugins {
1515
id 'build-dashboard'
1616

1717
id 'pmd'
18-
id 'findbugs'
19-
id 'checkstyle'
18+
// id 'checkstyle'
2019
id 'codenarc'
2120
}
2221

@@ -27,41 +26,41 @@ repositories {
2726
mavenCentral()
2827
}
2928

30-
sourceCompatibility = JavaVersion.VERSION_1_8
31-
targetCompatibility = JavaVersion.VERSION_1_8
29+
sourceCompatibility = JavaVersion.VERSION_11
3230

33-
jar {
34-
baseName = 'junit_5_vs_spock'
35-
group = 'io.github.aplotnikov'
36-
version = '0.0.1-SNAPSHOT'
37-
}
31+
group = 'io.github.aplotnikov'
32+
version = '0.0.1-SNAPSHOT'
3833

39-
ext.junitVersion = '5.3.1'
34+
ext.junitVersion = '5.9.3'
4035

4136
dependencies {
42-
compile 'io.vavr:vavr:0.9.2'
37+
implementation('io.vavr:vavr:0.10.4')
4338

44-
testCompile 'nl.jqno.equalsverifier:equalsverifier:2.5.2'
39+
testImplementation('nl.jqno.equalsverifier:equalsverifier:2.5.2')
4540

4641
// Spock + Groovy dependency
47-
testCompile 'org.codehaus.groovy:groovy-all:2.5.2',
48-
'org.spockframework:spock-core:1.2-groovy-2.5'
49-
// Needs for launching Spock test into JUnit 5 platform
50-
testRuntime "org.junit.vintage:junit-vintage-engine:${junitVersion}"
42+
testImplementation(
43+
'org.codehaus.groovy:groovy:3.0.17',
44+
'org.spockframework:spock-core:2.3-groovy-3.0',
45+
)
5146

5247
// JUnit 5 dependency
53-
testCompile "org.junit.jupiter:junit-jupiter-api:${junitVersion}",
54-
"org.junit.jupiter:junit-jupiter-params:${junitVersion}"
55-
testRuntime "org.junit.jupiter:junit-jupiter-engine:${junitVersion}"
56-
// To avoid compiler warnings about @API annotations in JUnit code
57-
testCompileOnly 'org.apiguardian:apiguardian-api:1.0.0'
48+
testImplementation(
49+
"org.junit.jupiter:junit-jupiter-api:${junitVersion}",
50+
"org.junit.jupiter:junit-jupiter-params:${junitVersion}",
51+
"org.junit.jupiter:junit-jupiter-engine:${junitVersion}",
52+
)
5853

5954
// JUnit 5 utilities
60-
testCompile 'org.assertj:assertj-core:3.11.1',
61-
'org.awaitility:awaitility:3.1.2',
62-
'org.mockito:mockito-core:2.22.0',
63-
// add missing functionality into mockito - MockitoExtension
64-
'name.falgout.jeffrey.testing.junit5:mockito-extension:1.0.2'
55+
testImplementation(
56+
'org.assertj:assertj-core:3.11.1',
57+
'org.awaitility:awaitility:4.2.0',
58+
'org.mockito:mockito-junit-jupiter:5.3.1',
59+
)
60+
}
61+
62+
test {
63+
useJUnitPlatform()
6564
}
6665

6766
junitPlatform {

config/codenarc/codenarc.groovy

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ ruleset {
22
ruleset('rulesets/basic.xml')
33
ruleset('rulesets/braces.xml')
44
ruleset('rulesets/concurrency.xml')
5-
ruleset('rulesets/convention.xml')
5+
ruleset('rulesets/convention.xml') {
6+
CompileStatic(enabled: false)
7+
}
68
ruleset('rulesets/design.xml')
79
ruleset('rulesets/dry.xml') {
810
DuplicateStringLiteral(enabled: false)
@@ -11,7 +13,6 @@ ruleset {
1113
}
1214
ruleset('rulesets/enhanced.xml')
1315
ruleset('rulesets/formatting.xml') {
14-
ClassJavadoc(enabled: false)
1516
SpaceAroundMapEntryColon(enabled: false)
1617
LineLength(enabled: false)
1718
Indentation(enabled: false)

config/static-code-analyze.gradle

Lines changed: 12 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,21 @@
1-
ext {
2-
reportDirectory = "$project.buildDir/reports"
3-
}
4-
5-
test {
6-
reports {
7-
junitXml.enabled = false
8-
html.enabled = true
9-
}
10-
}
11-
121
pmd {
13-
toolVersion = '6.7.0'
142
sourceSets = [sourceSets.main]
153
ruleSets = [
16-
'java-basic',
17-
'java-braces',
18-
'java-clone',
19-
'java-codesize',
20-
'java-empty',
21-
'java-finalizers',
22-
'java-strictexception',
23-
'java-strings',
24-
'java-sunsecure',
25-
'java-typeresolution',
26-
'java-unnecessary'
4+
'java-basic',
5+
'java-braces',
6+
'java-clone',
7+
'java-codesize',
8+
'java-empty',
9+
'java-finalizers',
10+
'java-strictexception',
11+
'java-strings',
12+
'java-sunsecure',
13+
'java-typeresolution',
14+
'java-unnecessary'
2715
]
2816
}
2917

30-
tasks.withType(Pmd) {
31-
reports {
32-
xml.enabled false
33-
html.enabled true
34-
}
35-
}
36-
37-
findbugs {
38-
sourceSets = [sourceSets.main]
39-
effort = 'max'
40-
reportLevel = 'low'
41-
}
42-
43-
tasks.withType(FindBugs) {
44-
reports {
45-
xml.enabled = false
46-
html.enabled = true
47-
}
48-
}
49-
50-
checkstyle {
51-
toolVersion = '8.12'
52-
}
53-
54-
tasks.withType(Checkstyle) {
55-
reports {
56-
xml.enabled false
57-
html.enabled true
58-
}
59-
}
60-
6118
codenarc {
62-
toolVersion = '1.2.1'
6319
sourceSets = [sourceSets.test]
6420
configFile = rootProject.file 'config/codenarc/codenarc.groovy'
65-
}
21+
}

gradle/wrapper/gradle-wrapper.jar

5.76 KB
Binary file not shown.
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
4+
networkTimeout=10000
45
zipStoreBase=GRADLE_USER_HOME
56
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)