From be0a0d6e337e61a89de97c9bb55b2bb317e1e892 Mon Sep 17 00:00:00 2001 From: Milica Sladakovic Date: Wed, 14 Oct 2026 11:31:43 +0200 Subject: [PATCH 1/2] Make the plugin loadable in the IDE META-INF/plugin.xml is added so the IDE can load the plugin (its version is filled from `gradle.properties`). To build it, `packageIdeaPlugin` task is created. The Toolbox ZIP is unchanged apart from the extra descriptor inside the main JAR. --- .../main/kotlin/toolbox-convention.gradle.kts | 20 +++++++++++++++++++ src/main/resources/META-INF/plugin.xml | 12 +++++++++++ 2 files changed, 32 insertions(+) create mode 100644 src/main/resources/META-INF/plugin.xml diff --git a/buildSrc/src/main/kotlin/toolbox-convention.gradle.kts b/buildSrc/src/main/kotlin/toolbox-convention.gradle.kts index 1f1aa422..e3fa4000 100644 --- a/buildSrc/src/main/kotlin/toolbox-convention.gradle.kts +++ b/buildSrc/src/main/kotlin/toolbox-convention.gradle.kts @@ -17,6 +17,14 @@ tasks.named("jar") { from(generateExtensionJson.flatMap { it.outputFile }) } +tasks.named("processResources") { + val pluginVersion = project.version.toString() + inputs.property("pluginVersion", pluginVersion) + filesMatching("META-INF/plugin.xml") { + expand("version" to pluginVersion) + } +} + val filteredDependencies = configurations.named("runtimeClasspath").map { filterToolboxProvidedDependencies(it.files) } @@ -70,3 +78,15 @@ val publishPlugin by tasks.registering(PublishToolboxPluginTask::class) { extensionId.set(project.group.toString()) pluginFile.set(packagePlugin.flatMap { it.archiveFile }) } + +val packageIdeaPlugin by tasks.registering(Zip::class) { + dependsOn(tasks.named("jar"), generatedDependenciesJson) + archiveBaseName.set("coder-toolbox-idea") + val pluginDir = project.group.toString() + from(tasks.named("jar")) { + into("$pluginDir/lib") + } + from(filteredDependencies) { + into("$pluginDir/lib") + } +} \ No newline at end of file diff --git a/src/main/resources/META-INF/plugin.xml b/src/main/resources/META-INF/plugin.xml new file mode 100644 index 00000000..b155bab7 --- /dev/null +++ b/src/main/resources/META-INF/plugin.xml @@ -0,0 +1,12 @@ + + com.coder.toolbox + Coder Plugin + ${version} + coder + + Connects your JetBrains IDE to Coder workspaces + + + + + \ No newline at end of file From 89764987927d39b183a7c8709599a42304055207 Mon Sep 17 00:00:00 2001 From: MilicaSladakovic <76025555+coma007@users.noreply.github.com> Date: Fri, 23 Oct 2026 12:25:23 +0200 Subject: [PATCH 2/2] Rename the plugin name From `Coder Plugin` to `Coder` Co-authored-by: Atif Ali --- src/main/resources/META-INF/plugin.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/META-INF/plugin.xml b/src/main/resources/META-INF/plugin.xml index b155bab7..b1c55b83 100644 --- a/src/main/resources/META-INF/plugin.xml +++ b/src/main/resources/META-INF/plugin.xml @@ -1,6 +1,6 @@ com.coder.toolbox - Coder Plugin + Coder ${version} coder