Skip to content

Commit 01134b2

Browse files
build: Use Kotlin DSL accessors in build.gradle.kts files (#73)
Take advantage of the features of Kotlin DSL by using accessors in `build.gradle.kts` files.
1 parent c65a585 commit 01134b2

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
@@ -37,6 +37,6 @@ dependencies {
3737
testRuntimeOnly(local.junit.platform.launcher)
3838
}
3939

40-
tasks.withType<Test> {
40+
tasks.test {
4141
useJUnitPlatform()
4242
}

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
kotlin("plugin.spring") version local.versions.kotlin
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)