Skip to content

Commit 0019e9f

Browse files
committed
Merge branch 'main' of github.com:lstreckeisen/context-mapper-intellij-plugin into CMI-58-FR-1.2-Hyperlinking
2 parents ce2b671 + 6a9993a commit 0019e9f

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

build.gradle.kts

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import org.apache.commons.lang3.SystemUtils
12
import org.jetbrains.changelog.markdownToHTML
23
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
34
import java.nio.file.Files
@@ -102,14 +103,15 @@ tasks {
102103
description = "Downloads the ContextMapper Language Server NPM package"
103104
group = LifecycleBasePlugin.BUILD_GROUP
104105
workingDir(layout.projectDirectory.dir("lsp"))
105-
commandLine = listOf("sh", "-c", "npm install")
106+
val installCommand = "npm install"
107+
commandLine =
108+
if (SystemUtils.IS_OS_WINDOWS) {
109+
listOf("cmd", "/c", installCommand)
110+
} else {
111+
listOf("sh", "-c", installCommand)
112+
}
106113
}
107114

108-
/**
109-
* inspired by:
110-
* - https://github.com/ContextMapper/vscode-extension/blob/master/build.gradle#L100
111-
* - https://github.com/redhat-developer/intellij-quarkus/blob/main/build.gradle.kts
112-
*/
113115
val copyLanguageServer by registering(Copy::class) {
114116
description = "Extracts and copies the ContextMapper Language Server to the build directory"
115117
group = LifecycleBasePlugin.BUILD_GROUP
@@ -120,7 +122,7 @@ tasks {
120122
if (Files.isSymbolicLink(packagePath.toPath())) { // for local development
121123
packagePath.toPath().toRealPath().resolve("cml-ls")
122124
} else {
123-
packagePath.toPath()
125+
packagePath.toPath().resolve("cml-ls")
124126
}
125127

126128
from(sourcePath)

0 commit comments

Comments
 (0)