Skip to content

Commit 5a5c2b8

Browse files
update gradle junit test
1 parent 4f9425c commit 5a5c2b8

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

dbAndCsvBatch/build.gradle

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ repositories {
2121
mavenCentral()
2222
}
2323

24-
// Spring Bootプラグインが管理するライブラリに対してバージョン番号を明示的に指定しない。
25-
// Do not explicitly specify version numbers for libraries managed by the Spring Boot plugin.
2624
// https://docs.spring.io/spring-boot/appendix/dependency-versions/coordinates.html
2725
dependencies {
2826
implementation 'org.springframework.boot:spring-boot-starter-batch'
@@ -42,6 +40,8 @@ dependencies {
4240
testImplementation 'org.mockito:mockito-core'
4341
testImplementation 'org.mockito:mockito-junit-jupiter'
4442
testImplementation 'org.assertj:assertj-core'
43+
testImplementation 'org.junit.jupiter:junit-jupiter-api'
44+
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine'
4545

4646
testCompileOnly 'org.projectlombok:lombok'
4747
testAnnotationProcessor 'org.projectlombok:lombok'
@@ -51,7 +51,7 @@ dependencies {
5151
jooqGenerator 'com.mysql:mysql-connector-j'
5252
}
5353

54-
tasks.named('test') {
54+
tasks.withType(Test).configureEach {
5555
useJUnitPlatform()
5656
}
5757

@@ -109,4 +109,3 @@ tasks.named('build') {
109109
}
110110

111111
defaultTasks 'tasks', 'spotlessApply', 'clean', 'check', 'jacocoTestReport', 'spotbugsMain', 'projectReport', 'bootJar'
112-

skeletonBatch/build.gradle

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ repositories {
2222
mavenCentral()
2323
}
2424

25-
// Spring Bootプラグインが管理するライブラリに対してバージョン番号を明示的に指定しない。
26-
// Do not explicitly specify version numbers for libraries managed by the Spring Boot plugin.
2725
// https://docs.spring.io/spring-boot/appendix/dependency-versions/coordinates.html
2826
dependencies {
2927
implementation 'org.springframework.boot:spring-boot-starter-batch'
@@ -33,9 +31,11 @@ dependencies {
3331

3432
testImplementation 'org.springframework.boot:spring-boot-starter-test'
3533
testImplementation 'org.springframework.batch:spring-batch-test'
34+
testImplementation 'org.junit.jupiter:junit-jupiter-api'
35+
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine'
3636
}
3737

38-
tasks.named('test') {
38+
tasks.withType(Test).configureEach {
3939
useJUnitPlatform()
4040
}
4141

@@ -58,4 +58,3 @@ jar {
5858
}
5959

6060
defaultTasks 'tasks', 'spotlessApply', 'clean', 'check', 'jacocoTestReport', 'spotbugsMain', 'projectReport', 'bootJar'
61-

0 commit comments

Comments
 (0)