Skip to content

Commit b00705d

Browse files
authored
Migrate gradle configuration to kotlin
1 parent 540e42e commit b00705d

File tree

84 files changed

+883
-890
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+883
-890
lines changed

batch-rest-repository/build.gradle

Lines changed: 0 additions & 35 deletions
This file was deleted.
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
plugins {
2+
java
3+
id("org.springframework.boot") version "3.4.5"
4+
id("io.spring.dependency-management") version "1.1.7"
5+
}
6+
7+
group = "zin.rashidi.boot"
8+
version = "0.0.1-SNAPSHOT"
9+
10+
java {
11+
toolchain {
12+
languageVersion.set(JavaLanguageVersion.of(21))
13+
}
14+
}
15+
16+
repositories {
17+
mavenCentral()
18+
}
19+
20+
dependencies {
21+
implementation("org.springframework.boot:spring-boot-starter-batch")
22+
implementation("org.springframework.boot:spring-boot-starter-data-mongodb")
23+
implementation("com.fasterxml.jackson.core:jackson-databind")
24+
runtimeOnly("com.mysql:mysql-connector-j")
25+
testImplementation("org.springframework.boot:spring-boot-starter-test")
26+
testImplementation("org.springframework.boot:spring-boot-testcontainers")
27+
testImplementation("org.springframework.batch:spring-batch-test")
28+
testImplementation("org.testcontainers:junit-jupiter")
29+
testImplementation("org.testcontainers:mongodb")
30+
testImplementation("org.testcontainers:mysql")
31+
}
32+
33+
tasks.named<Test>("test") {
34+
useJUnitPlatform()
35+
}

batch-rest-repository/settings.gradle

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
rootProject.name = "batch-rest-repository"

batch-skip-step/build.gradle

Lines changed: 0 additions & 34 deletions
This file was deleted.

batch-skip-step/build.gradle.kts

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
plugins {
2+
java
3+
id("org.springframework.boot") version "3.4.5"
4+
id("io.spring.dependency-management") version "1.1.7"
5+
}
6+
7+
group = "zin.rashidi.boot"
8+
version = "0.0.1-SNAPSHOT"
9+
10+
java {
11+
toolchain {
12+
languageVersion.set(JavaLanguageVersion.of(21))
13+
}
14+
}
15+
16+
repositories {
17+
mavenCentral()
18+
}
19+
20+
dependencies {
21+
implementation("org.springframework.boot:spring-boot-starter-batch")
22+
implementation("org.springframework.boot:spring-boot-starter-data-jdbc")
23+
implementation("com.fasterxml.jackson.core:jackson-databind")
24+
runtimeOnly("com.mysql:mysql-connector-j")
25+
testImplementation("org.springframework.boot:spring-boot-starter-test")
26+
testImplementation("org.springframework.boot:spring-boot-testcontainers")
27+
testImplementation("org.springframework.batch:spring-batch-test")
28+
testImplementation("org.testcontainers:junit-jupiter")
29+
testImplementation("org.testcontainers:mysql")
30+
}
31+
32+
tasks.named<Test>("test") {
33+
useJUnitPlatform()
34+
}

batch-skip-step/settings.gradle

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
rootProject.name = "batch-skip-step"

build.gradle

Lines changed: 0 additions & 63 deletions
This file was deleted.

build.gradle.kts

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
import org.springframework.boot.gradle.plugin.SpringBootPlugin
2+
3+
plugins {
4+
java
5+
id("org.springframework.boot") version "3.4.5" apply false
6+
id("io.spring.dependency-management") version "1.1.7"
7+
id("org.sonarqube") version "6.2.0.5505"
8+
id("jacoco-report-aggregation")
9+
}
10+
11+
group = "zin.rashidi.boot"
12+
version = "0.0.1-SNAPSHOT"
13+
14+
java {
15+
toolchain {
16+
languageVersion.set(JavaLanguageVersion.of(21))
17+
}
18+
}
19+
20+
repositories {
21+
mavenCentral()
22+
}
23+
24+
dependencies {
25+
subprojects.forEach { p ->
26+
implementation(project(":${p.name}"))
27+
}
28+
}
29+
30+
dependencies {
31+
implementation(platform(SpringBootPlugin.BOM_COORDINATES))
32+
}
33+
34+
sonar {
35+
properties {
36+
property("sonar.projectKey", "rashidi_spring-boot-tutorials")
37+
property("sonar.organization", "rashidi-github")
38+
property("sonar.host.url", "https://sonarcloud.io")
39+
property("sonar.coverage.jacoco.xmlReportPaths", "${layout.buildDirectory.get()}/reports/jacoco/testCodeCoverageReport/testCodeCoverageReport.xml")
40+
}
41+
}
42+
43+
subprojects {
44+
apply(plugin = "jacoco")
45+
46+
// Only configure the test task if it exists
47+
tasks.matching { it.name == "test" }.configureEach {
48+
if (this is Test) {
49+
finalizedBy("jacocoTestReport")
50+
}
51+
}
52+
}
53+

0 commit comments

Comments
 (0)