Skip to content

Commit 2af89b7

Browse files
build: Use Kotlin DSL accessors in build.gradle.kts files (#56)
Take advantage of the features of Kotlin DSL by using accessors in `build.gradle.kts` files.
1 parent 61afc30 commit 2af89b7

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

apps/api/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,6 @@ dependencies {
4949
testRuntimeOnly(local.junit.platform.launcher)
5050
}
5151

52-
tasks.withType<Test> {
52+
tasks.test {
5353
useJUnitPlatform()
5454
}
Lines changed: 3 additions & 6 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
kotlin("plugin.spring") version local.versions.kotlin
63
alias(local.plugins.springboot)
@@ -12,14 +9,14 @@ dependencies {
129
implementation(projects.model)
1310

1411
// Spring Data R2DBC for reactive SQL database access
15-
implementation(local.springboot.starter.r2dbc)
12+
implementation(local.springboot.starter.r2dbc)
1613
}
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)