Skip to content

Commit adca705

Browse files
committed
[Gradle][K/JS] code style improvement
1 parent db8b4bb commit adca705

File tree

1 file changed

+7
-8
lines changed
  • libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/npm

1 file changed

+7
-8
lines changed

libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/npm/Npm.kt

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -88,13 +88,12 @@ class Npm : NpmApiExecution<NpmEnvironment> {
8888
args: List<String>,
8989
) {
9090
services.execWithProgress(description) { exec ->
91-
val arguments = listOf("install") + args
92-
.plus(
93-
if (logger.isDebugEnabled) "--verbose" else ""
94-
)
95-
.plus(
96-
if (environment.ignoreScripts) "--ignore-scripts" else ""
97-
).filter { it.isNotEmpty() }
91+
val arguments = buildList {
92+
add("install")
93+
addAll(args)
94+
if (logger.isDebugEnabled) add("--verbose")
95+
if (environment.ignoreScripts) add("--ignore-scripts")
96+
}
9897

9998
if (!environment.standalone) {
10099
val nodeExecutable = nodeJs.nodeExecutable
@@ -136,4 +135,4 @@ class Npm : NpmApiExecution<NpmEnvironment> {
136135
rootPackageJsonFile
137136
)
138137
}
139-
}
138+
}

0 commit comments

Comments
 (0)