Skip to content

Commit 9a565cb

Browse files
build: Use Kotlin DSL accessors in build.gradle.kts files (#62)
Take advantage of the features of Kotlin DSL by using accessors in `build.gradle.kts` files.
1 parent 9e13aea commit 9a565cb

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

apps/api/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,6 @@ dependencies {
3838
testRuntimeOnly(local.junit.platform.launcher)
3939
}
4040

41-
tasks.withType<Test> {
41+
tasks.test {
4242
useJUnitPlatform()
4343
}

modules/persistence/build.gradle.kts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
import org.springframework.boot.gradle.tasks.bundling.BootJar
2-
import org.springframework.boot.gradle.tasks.run.BootRun
3-
41
plugins {
52
alias(local.plugins.lombok)
63
alias(local.plugins.springboot)
@@ -17,9 +14,9 @@ dependencies {
1714

1815
// Disabling bootJar and bootRun is necessary for a subproject/module
1916
// that uses the Spring Boot plugin but is not supposed to be executable.
20-
tasks.named<BootJar>("bootJar") {
17+
tasks.bootJar {
2118
enabled = false
2219
}
23-
tasks.named<BootRun>("bootRun") {
20+
tasks.bootRun {
2421
enabled = false
2522
}

0 commit comments

Comments
 (0)