Added LSP Develop gradle task

This commit is contained in:
Stef Tervelde
2025-04-24 14:37:24 +02:00
parent ecd219b03d
commit 6a6c5c0ddf
+21
View File
@@ -133,6 +133,27 @@ tasks.compileJava{
options.encoding = "UTF-8"
}
tasks.register("lsp-develop"){
group = "processing"
// This task is used to run the LSP server when developing the LSP server itself
// to run the LSP server for end-users use `processing lsp` instead
dependencies.add("runtimeOnly", project(":java"))
// Usage: ./gradlew lsp-develop
// Make sure the cwd is set the project directory
// or use -p to set the project directory
// Modify run configuration to start the LSP server rather than the Processing IDE
val run = tasks.named<JavaExec>("run").get()
run.standardInput = System.`in`
run.standardOutput = System.out
dependsOn(run)
// TODO: Remove after command line is integrated, then add the `lsp` argument instead, `lsp-develop` can't be removed because we still need to pipe the input and output
run.jvmArgs("-Djava.awt.headless=true")
compose.desktop.application.mainClass = "processing.mode.java.lsp.PdeLanguageServer"
}
val version = if(project.version == "unspecified") "1.0.0" else project.version
tasks.register<Exec>("installCreateDmg") {