1
- apply plugin : ' java'
2
- apply plugin : ' checkstyle'
1
+ plugins {
2
+ id ' java'
3
+ id ' checkstyle'
4
+ }
3
5
4
6
group = ' com.fishercoder'
5
7
version = ' 1.0-SNAPSHOT'
6
8
7
- javadoc. options. encoding = ' UTF-8'
8
- compileJava. options. encoding = ' UTF-8'
9
+ java {
10
+ sourceCompatibility = JavaVersion . VERSION_1_8
11
+ targetCompatibility = JavaVersion . VERSION_1_8
12
+ toolchain {
13
+ languageVersion = JavaLanguageVersion . of(8 )
14
+ }
15
+ }
16
+
17
+ tasks. withType(JavaCompile ) {
18
+ options. encoding = ' UTF-8'
19
+ }
20
+
21
+ tasks. withType(Javadoc ) {
22
+ options. encoding = ' UTF-8'
23
+ }
9
24
10
25
checkstyle {
11
- // include ( '**/*.java')
12
26
configFile = file(" ${ rootDir} /fishercoder_checkstyle.xml" )
13
27
}
14
28
@@ -20,34 +34,32 @@ sourceSets {
20
34
}
21
35
}
22
36
23
- description = """ """
24
-
25
- sourceCompatibility = 1.8
26
- targetCompatibility = 1.8
37
+ description = " "
27
38
28
39
repositories {
29
40
mavenCentral()
30
- maven { url " http ://repo.maven.apache.org/maven2" }
41
+ maven { url " https ://repo.maven.apache.org/maven2" }
31
42
}
32
43
33
44
dependencies {
34
- compile ' com.google.code.gson:gson:2.8.0'
35
- compile group : ' org.apache.commons' , name : ' commons-collections4' , version : ' 4.0'
45
+ implementation ' com.google.code.gson:gson:2.8.0'
46
+ implementation ' org.apache.commons: commons-collections4: 4.0'
36
47
37
- // TODO: to remove Junit4 after all tests are migrated to Junit5
38
- compile ' junit:junit:4.13'
39
- testCompile " junit:junit:4.13.1"
48
+ // TODO: to remove Junit4 after all tests are migrated to Junit5
49
+ implementation ' junit:junit:4.13'
50
+ testImplementation ' junit:junit:4.13.1'
40
51
41
52
testImplementation ' org.junit.jupiter:junit-jupiter-api:5.8.1'
42
53
testRuntimeOnly ' org.junit.jupiter:junit-jupiter-engine:5.8.1'
43
54
44
- testCompile(" org.assertj:assertj-core:3.11.1" )
55
+ testImplementation ' org.assertj:assertj-core:3.11.1'
56
+
45
57
compileOnly ' org.projectlombok:lombok:1.18.12'
46
58
annotationProcessor ' org.projectlombok:lombok:1.18.12'
47
59
testCompileOnly ' org.projectlombok:lombok:1.18.12'
48
60
testAnnotationProcessor ' org.projectlombok:lombok:1.18.12'
49
61
}
50
62
51
- test {
63
+ tasks . test {
52
64
useJUnitPlatform()
53
65
}
0 commit comments