From 6a6c5c0ddf7b0545af0767e1f3d2d85729fb239d Mon Sep 17 00:00:00 2001 From: Stef Tervelde Date: Thu, 24 Apr 2025 14:37:24 +0200 Subject: [PATCH 1/2] Added LSP Develop gradle task --- app/build.gradle.kts | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 865296d135..decdc5b300 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -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("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("installCreateDmg") { From 1a2ba32bd3650542df02965c70baf805f30dcf6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20de=20Courville?= Date: Fri, 25 Apr 2025 12:08:32 +0200 Subject: [PATCH 2/2] Update build.gradle.kts typo --- app/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index decdc5b300..f3a34a297a 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -140,7 +140,7 @@ tasks.register("lsp-develop"){ dependencies.add("runtimeOnly", project(":java")) // Usage: ./gradlew lsp-develop - // Make sure the cwd is set the project directory + // Make sure the cwd is set to the project directory // or use -p to set the project directory // Modify run configuration to start the LSP server rather than the Processing IDE