From 8a37f0e995fdcbed56879da03eadeae78cef9459 Mon Sep 17 00:00:00 2001 From: Taeik Lim Date: Sun, 28 Jul 2024 23:31:42 +0900 Subject: [PATCH] Add test dependencies to samples Signed-off-by: Taeik Lim --- .../build.gradle.kts | 16 +++++++++++++++- .../build.gradle.kts | 16 +++++++++++++++- .../build.gradle.kts | 18 ++++++++++++++++-- .../build.gradle.kts | 18 ++++++++++++++++-- .../build.gradle.kts | 16 +++++++++++++++- .../build.gradle.kts | 16 +++++++++++++++- .../build.gradle.kts | 16 +++++++++++++++- 7 files changed, 107 insertions(+), 9 deletions(-) diff --git a/spring-batch-plus-sample/spring-batch-plus-clear-run-id-incrementer-kotlin/build.gradle.kts b/spring-batch-plus-sample/spring-batch-plus-clear-run-id-incrementer-kotlin/build.gradle.kts index ea6e4a3..7a92350 100644 --- a/spring-batch-plus-sample/spring-batch-plus-clear-run-id-incrementer-kotlin/build.gradle.kts +++ b/spring-batch-plus-sample/spring-batch-plus-clear-run-id-incrementer-kotlin/build.gradle.kts @@ -7,6 +7,7 @@ buildscript { plugins { id("org.jetbrains.kotlin.jvm") id("org.jlleitschuh.gradle.ktlint") + id("io.spring.dependency-management") version "1.1.6" } repositories { @@ -25,9 +26,22 @@ tasks.withType { } } +tasks.named("test") { + useJUnitPlatform() + maxParallelForks = Runtime.getRuntime().availableProcessors() +} + +dependencyManagement { + imports { + mavenBom("org.springframework.boot:spring-boot-dependencies:3.2.0") + } +} + dependencies { - implementation("org.springframework.boot:spring-boot-starter-batch:3.2.0") + implementation("org.springframework.boot:spring-boot-starter-batch") implementation(project(":spring-boot-starter-batch-plus-kotlin")) implementation("io.projectreactor:reactor-core:3.5.0") runtimeOnly("com.h2database:h2:2.1.214") + + testImplementation("org.springframework.boot:spring-boot-starter-test") } diff --git a/spring-batch-plus-sample/spring-batch-plus-clear-run-id-incrementer/build.gradle.kts b/spring-batch-plus-sample/spring-batch-plus-clear-run-id-incrementer/build.gradle.kts index d55c588..3a00512 100644 --- a/spring-batch-plus-sample/spring-batch-plus-clear-run-id-incrementer/build.gradle.kts +++ b/spring-batch-plus-sample/spring-batch-plus-clear-run-id-incrementer/build.gradle.kts @@ -6,6 +6,7 @@ buildscript { plugins { java + id("io.spring.dependency-management") version "1.1.6" } repositories { @@ -19,8 +20,21 @@ java { } } +tasks.named("test") { + useJUnitPlatform() + maxParallelForks = Runtime.getRuntime().availableProcessors() +} + +dependencyManagement { + imports { + mavenBom("org.springframework.boot:spring-boot-dependencies:3.2.0") + } +} + dependencies { - implementation("org.springframework.boot:spring-boot-starter-batch:3.2.0") + implementation("org.springframework.boot:spring-boot-starter-batch") implementation(project(":spring-boot-starter-batch-plus")) runtimeOnly("com.h2database:h2:2.1.214") + + testImplementation("org.springframework.boot:spring-boot-starter-test") } diff --git a/spring-batch-plus-sample/spring-batch-plus-delete-meta-data-job-kotlin/build.gradle.kts b/spring-batch-plus-sample/spring-batch-plus-delete-meta-data-job-kotlin/build.gradle.kts index 5304585..e3da498 100644 --- a/spring-batch-plus-sample/spring-batch-plus-delete-meta-data-job-kotlin/build.gradle.kts +++ b/spring-batch-plus-sample/spring-batch-plus-delete-meta-data-job-kotlin/build.gradle.kts @@ -7,6 +7,7 @@ buildscript { plugins { id("org.jetbrains.kotlin.jvm") id("org.jlleitschuh.gradle.ktlint") + id("io.spring.dependency-management") version "1.1.6" } repositories { @@ -25,9 +26,22 @@ tasks.withType { } } +tasks.named("test") { + useJUnitPlatform() + maxParallelForks = Runtime.getRuntime().availableProcessors() +} + +dependencyManagement { + imports { + mavenBom("org.springframework.boot:spring-boot-dependencies:3.2.0") + } +} + dependencies { - implementation("org.springframework.boot:spring-boot-starter-batch:3.2.0") - implementation("org.springframework.boot:spring-boot-starter-web:3.2.0") + implementation("org.springframework.boot:spring-boot-starter-batch") + implementation("org.springframework.boot:spring-boot-starter-web") // to check metadata in h2 implementation(project(":spring-boot-starter-batch-plus-kotlin")) runtimeOnly("com.h2database:h2:2.1.214") + + testImplementation("org.springframework.boot:spring-boot-starter-test") } diff --git a/spring-batch-plus-sample/spring-batch-plus-delete-meta-data-job/build.gradle.kts b/spring-batch-plus-sample/spring-batch-plus-delete-meta-data-job/build.gradle.kts index 94b4c4e..0e73959 100644 --- a/spring-batch-plus-sample/spring-batch-plus-delete-meta-data-job/build.gradle.kts +++ b/spring-batch-plus-sample/spring-batch-plus-delete-meta-data-job/build.gradle.kts @@ -6,6 +6,7 @@ buildscript { plugins { java + id("io.spring.dependency-management") version "1.1.6" } repositories { @@ -19,9 +20,22 @@ java { } } +tasks.named("test") { + useJUnitPlatform() + maxParallelForks = Runtime.getRuntime().availableProcessors() +} + +dependencyManagement { + imports { + mavenBom("org.springframework.boot:spring-boot-dependencies:3.2.0") + } +} + dependencies { - implementation("org.springframework.boot:spring-boot-starter-batch:3.2.0") - implementation("org.springframework.boot:spring-boot-starter-web:3.2.0") + implementation("org.springframework.boot:spring-boot-starter-batch") + implementation("org.springframework.boot:spring-boot-starter-web") // to check metadata in h2 implementation(project(":spring-boot-starter-batch-plus")) runtimeOnly("com.h2database:h2:2.1.214") + + testImplementation("org.springframework.boot:spring-boot-starter-test") } diff --git a/spring-batch-plus-sample/spring-batch-plus-kotlin-dsl/build.gradle.kts b/spring-batch-plus-sample/spring-batch-plus-kotlin-dsl/build.gradle.kts index 4011c5e..824c0df 100644 --- a/spring-batch-plus-sample/spring-batch-plus-kotlin-dsl/build.gradle.kts +++ b/spring-batch-plus-sample/spring-batch-plus-kotlin-dsl/build.gradle.kts @@ -7,6 +7,7 @@ buildscript { plugins { id("org.jetbrains.kotlin.jvm") id("org.jlleitschuh.gradle.ktlint") + id("io.spring.dependency-management") version "1.1.6" } repositories { @@ -25,8 +26,21 @@ tasks.withType { } } +tasks.named("test") { + useJUnitPlatform() + maxParallelForks = Runtime.getRuntime().availableProcessors() +} + +dependencyManagement { + imports { + mavenBom("org.springframework.boot:spring-boot-dependencies:3.2.0") + } +} + dependencies { - implementation("org.springframework.boot:spring-boot-starter-batch:3.2.0") + implementation("org.springframework.boot:spring-boot-starter-batch") implementation(project(":spring-boot-starter-batch-plus-kotlin")) runtimeOnly("com.h2database:h2:2.1.214") + + testImplementation("org.springframework.boot:spring-boot-starter-test") } diff --git a/spring-batch-plus-sample/spring-batch-plus-single-class-reader-processor-writer-kotlin/build.gradle.kts b/spring-batch-plus-sample/spring-batch-plus-single-class-reader-processor-writer-kotlin/build.gradle.kts index ea6e4a3..7a92350 100644 --- a/spring-batch-plus-sample/spring-batch-plus-single-class-reader-processor-writer-kotlin/build.gradle.kts +++ b/spring-batch-plus-sample/spring-batch-plus-single-class-reader-processor-writer-kotlin/build.gradle.kts @@ -7,6 +7,7 @@ buildscript { plugins { id("org.jetbrains.kotlin.jvm") id("org.jlleitschuh.gradle.ktlint") + id("io.spring.dependency-management") version "1.1.6" } repositories { @@ -25,9 +26,22 @@ tasks.withType { } } +tasks.named("test") { + useJUnitPlatform() + maxParallelForks = Runtime.getRuntime().availableProcessors() +} + +dependencyManagement { + imports { + mavenBom("org.springframework.boot:spring-boot-dependencies:3.2.0") + } +} + dependencies { - implementation("org.springframework.boot:spring-boot-starter-batch:3.2.0") + implementation("org.springframework.boot:spring-boot-starter-batch") implementation(project(":spring-boot-starter-batch-plus-kotlin")) implementation("io.projectreactor:reactor-core:3.5.0") runtimeOnly("com.h2database:h2:2.1.214") + + testImplementation("org.springframework.boot:spring-boot-starter-test") } diff --git a/spring-batch-plus-sample/spring-batch-plus-single-class-reader-processor-writer/build.gradle.kts b/spring-batch-plus-sample/spring-batch-plus-single-class-reader-processor-writer/build.gradle.kts index 58d317f..dd76e33 100644 --- a/spring-batch-plus-sample/spring-batch-plus-single-class-reader-processor-writer/build.gradle.kts +++ b/spring-batch-plus-sample/spring-batch-plus-single-class-reader-processor-writer/build.gradle.kts @@ -6,6 +6,7 @@ buildscript { plugins { java + id("io.spring.dependency-management") version "1.1.6" } repositories { @@ -19,9 +20,22 @@ java { } } +tasks.named("test") { + useJUnitPlatform() + maxParallelForks = Runtime.getRuntime().availableProcessors() +} + +dependencyManagement { + imports { + mavenBom("org.springframework.boot:spring-boot-dependencies:3.2.0") + } +} + dependencies { - implementation("org.springframework.boot:spring-boot-starter-batch:3.2.0") + implementation("org.springframework.boot:spring-boot-starter-batch") implementation(project(":spring-boot-starter-batch-plus")) implementation("io.projectreactor:reactor-core:3.5.0") runtimeOnly("com.h2database:h2:2.1.214") + + testImplementation("org.springframework.boot:spring-boot-starter-test") }