-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
49 lines (35 loc) · 1013 Bytes
/
Copy pathbuild.gradle.kts
File metadata and controls
49 lines (35 loc) · 1013 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
import com.github.gradle.node.npm.task.NpxTask
plugins {
java
war
id("com.github.node-gradle.node") version "7.1.0"
}
repositories {
mavenCentral()
}
dependencies {
implementation(libs.mcp.sdk)
implementation(libs.slf4j.api)
runtimeOnly(libs.slf4j.runtime.log4j2)
compileOnly(libs.servlet.api)
}
node {
download = true
version = "24.11.0"
workDir = rootProject.layout.buildDirectory.get().dir("nodejs")
nodeProjectDir = rootProject.rootDir
}
tasks.npmInstall {
inputs.file(rootProject.rootDir.resolve("package.json"));
val packageLockFile = rootProject.rootDir.resolve("package-lock.json");
if (packageLockFile.exists()) {
inputs.file(packageLockFile)
}
outputs.file(packageLockFile)
outputs.dir(rootProject.rootDir.resolve("node_modules"))
}
tasks.register<NpxTask>("runMCPInspector") {
dependsOn("npmInstall")
command = "@modelcontextprotocol/inspector"
workingDir = rootProject.rootDir
}