From e7d0ada68cc7230d8703cbd920b953f54c1b45a1 Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Fri, 21 Mar 2025 21:24:44 -0700 Subject: [PATCH] Reorder the common kotlin compiler potential locations --- README.md | 15 ++++++++------- .../bld/extension/CompileKotlinOperation.java | 16 ++++++++++------ 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 06ce2cb..0c15334 100644 --- a/README.md +++ b/README.md @@ -44,13 +44,14 @@ for all available configuration options. Please make sure the Kotlin compiler is [installed](https://kotlinlang.org/docs/command-line.html#install-the-compiler). -The plugin will look in common locations such as: -- `KOTLIN_HOME` -- `PATH` -- SDKMAN! -- Homebrew -- JetBrains Toolbox (IntelliJ IDEA, Android Studio) -- etc. +The extension will look in common locations such as: + + - `KOTLIN_HOME` + - `PATH` + - [SDKMAN!](https://sdkman.io/) + - [Homebrew](https://brew.sh/) + - [JetBrains Toolbox](https://www.jetbrains.com/toolbox-app/) (IntelliJ IDEA, Android Studio) + - etc. You can also manually configure the Kotlin home location as follows: diff --git a/src/main/java/rife/bld/extension/CompileKotlinOperation.java b/src/main/java/rife/bld/extension/CompileKotlinOperation.java index f1c912b..2fd3e31 100644 --- a/src/main/java/rife/bld/extension/CompileKotlinOperation.java +++ b/src/main/java/rife/bld/extension/CompileKotlinOperation.java @@ -79,6 +79,7 @@ public class CompileKotlinOperation extends AbstractOperation commonPaths = new ArrayList<>(); if (isLinux()) { - commonPaths.add("/usr/bin"); - commonPaths.add("/usr/local/bin"); - commonPaths.add("/usr/local/kotlin/bin"); - commonPaths.add("/opt/kotlin/bin"); var userHome = System.getProperty("user.home"); if (userHome != null) { commonPaths.add(userHome + "/.sdkman/candidates/kotlin/current/bin"); // SDKMAN! @@ -119,6 +116,10 @@ public class CompileKotlinOperation extends AbstractOperation