From 2a406feb15782c0079c56b157a9e67fac1d06284 Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Fri, 28 Mar 2025 15:44:49 -0700 Subject: [PATCH] Add snap locations to common paths --- .../bld/extension/CompileKotlinOperation.java | 36 +++++++++++-------- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/src/main/java/rife/bld/extension/CompileKotlinOperation.java b/src/main/java/rife/bld/extension/CompileKotlinOperation.java index a45ef0c..f54e68b 100644 --- a/src/main/java/rife/bld/extension/CompileKotlinOperation.java +++ b/src/main/java/rife/bld/extension/CompileKotlinOperation.java @@ -122,12 +122,21 @@ public class CompileKotlinOperation extends AbstractOperation(); //NOPMD no concurrent access + var commonPaths = new LinkedHashMap(); //NOPMD no concurrent access if (isLinux()) { var userHome = System.getProperty("user.home"); if (userHome != null) { - commonPaths.put(userHome + "/.sdkman/candidates/kotlin/current/bin", "SDKMAN"); + commonPaths.put(userHome + "/.sdkman/candidates/kotlin/current/bin", "SDKMAN!"); + } + commonPaths.put("/snap/bin", "Kotlin (Snap)"); + commonPaths.put("/usr/bin", null); + commonPaths.put("/usr/share", null); + commonPaths.put("/usr/local/bin", null); + commonPaths.put("/usr/local/kotlin/bin", null); + commonPaths.put("/usr/share/kotlin/bin/", null); + commonPaths.put("/opt/kotlin/bin", null); + if (userHome != null) { commonPaths.put(userHome + "/.local/share/JetBrains/Toolbox/apps/intellij-idea-ultimate/plugins/Kotlin/kotlinc/bin", "IntelliJ IDEA Ultimate"); commonPaths.put(userHome + "/.local/share/JetBrains/Toolbox/apps/intellij-idea-community-edition/plugins/Kotlin/kotlinc/bin", @@ -135,14 +144,14 @@ public class CompileKotlinOperation extends AbstractOperation { - - }); // Try 'which' or 'where' commands (less reliable but sometimes works) try {