Compare commits
No commits in common. "b8927615ecfcd8669b9fc22ca169419bbc6ff2f7" and "a57ae52a1c6b696304e3985ceb9f3c6a0e41cf07" have entirely different histories.
b8927615ec
...
a57ae52a1c
5 changed files with 16 additions and 21 deletions
15
README.md
15
README.md
|
@ -44,14 +44,13 @@ for all available configuration options.
|
|||
|
||||
Please make sure the Kotlin compiler is [installed](https://kotlinlang.org/docs/command-line.html#install-the-compiler).
|
||||
|
||||
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.
|
||||
The plugin will look in common locations such as:
|
||||
- `KOTLIN_HOME`
|
||||
- `PATH`
|
||||
- SDKMAN!
|
||||
- Homebrew
|
||||
- JetBrains Toolbox (IntelliJ IDEA, Android Studio)
|
||||
- etc.
|
||||
|
||||
You can also manually configure the Kotlin home location as follows:
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
bld.downloadExtensionJavadoc=false
|
||||
bld.downloadExtensionSources=true
|
||||
bld.downloadLocation=
|
||||
bld.extension-kotlin=com.uwyn.rife2:bld-kotlin:1.1.0-SNAPSHOT
|
||||
bld.extension-kotlin=com.uwyn.rife2:bld-kotlin:1.0.5-SNAPSHOT
|
||||
bld.repositories=MAVEN_LOCAL,MAVEN_CENTRAL,RIFE2_SNAPSHOTS,RIFE2_RELEASES
|
||||
bld.sourceDirectories=
|
||||
bld.version=2.2.1
|
||||
|
|
|
@ -33,7 +33,7 @@ public class CompileKotlinOperationBuild extends Project {
|
|||
public CompileKotlinOperationBuild() {
|
||||
pkg = "rife.bld.extension";
|
||||
name = "bld-kotlin";
|
||||
version = version(1, 1, 0, "SNAPSHOT");
|
||||
version = version(1, 0, 5, "SNAPSHOT");
|
||||
|
||||
javaRelease = 17;
|
||||
|
||||
|
|
|
@ -79,7 +79,6 @@ public class CompileKotlinOperation extends AbstractOperation<CompileKotlinOpera
|
|||
* Locates the Kotlin compiler (kotlinc) executable.
|
||||
*
|
||||
* @return The path to the kotlinc executable, or {@code kotlinc}/{@code kotlinc.bat} if not found.
|
||||
* @since 1.1.0
|
||||
*/
|
||||
public static String findKotlincPath() {
|
||||
String kotlincPath;
|
||||
|
@ -109,6 +108,10 @@ public class CompileKotlinOperation extends AbstractOperation<CompileKotlinOpera
|
|||
List<String> 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!
|
||||
|
@ -116,10 +119,6 @@ public class CompileKotlinOperation extends AbstractOperation<CompileKotlinOpera
|
|||
commonPaths.add(userHome + "/.local/share/JetBrains/Toolbox/apps/intellij-idea-community-edition/plugins/Kotlin/bin"); // Toolbox IDEA CE
|
||||
commonPaths.add(userHome + "/.local/share/JetBrains/Toolbox/apps/android-studio/plugins/Kotlin/bin"); // Toolbox Android Studio
|
||||
}
|
||||
commonPaths.add("/usr/bin");
|
||||
commonPaths.add("/usr/local/bin");
|
||||
commonPaths.add("/usr/local/kotlin/bin");
|
||||
commonPaths.add("/opt/kotlin/bin");
|
||||
} else if (isWindows()) {
|
||||
var localAppData = System.getenv("LOCALAPPDATA");
|
||||
if (localAppData != null) {
|
||||
|
@ -132,6 +131,8 @@ public class CompileKotlinOperation extends AbstractOperation<CompileKotlinOpera
|
|||
commonPaths.add(programFiles + File.separator + "Kotlin");
|
||||
}
|
||||
} else if (isMacOS()) {
|
||||
commonPaths.add("/usr/local/bin"); // Homebrew
|
||||
commonPaths.add("/opt/homebrew/bin"); // Homebrew
|
||||
var userHome = System.getProperty("user.home");
|
||||
if (userHome != null) {
|
||||
commonPaths.add(userHome + "/.sdkman/candidates/kotlin/current/bin"); // SDKMAN!
|
||||
|
@ -139,8 +140,6 @@ public class CompileKotlinOperation extends AbstractOperation<CompileKotlinOpera
|
|||
commonPaths.add("/Applications/IntelliJ IDEA Ultimate.app/Contents/plugins/Kotlin/bin"); //IntelliJ IDEA Ultimate
|
||||
commonPaths.add("/Applications/IntelliJ IDEA.app/Contents/plugins/Kotlin/bin"); //IntelliJ IDEA
|
||||
commonPaths.add("/Applications/Android Studio.app/Contents/plugins/Kotlin/bin"); //Android Studio
|
||||
commonPaths.add("/usr/local/bin"); // Homebrew
|
||||
commonPaths.add("/opt/homebrew/bin"); // Homebrew
|
||||
}
|
||||
|
||||
for (var location : commonPaths) {
|
||||
|
@ -182,7 +181,6 @@ public class CompileKotlinOperation extends AbstractOperation<CompileKotlinOpera
|
|||
* Determines if the operating system is Linux.
|
||||
*
|
||||
* @return true if the operating system is Linux, false otherwise.
|
||||
* @since 1.1.0
|
||||
*/
|
||||
public static boolean isLinux() {
|
||||
return OS_NAME != null && (OS_NAME.contains("linux") || OS_NAME.contains("unix")); // Consider Unix-like systems as well.
|
||||
|
@ -192,7 +190,6 @@ public class CompileKotlinOperation extends AbstractOperation<CompileKotlinOpera
|
|||
* Determines if the current operating system is macOS.
|
||||
*
|
||||
* @return true if the OS is macOS, false otherwise.
|
||||
* @since 1.1.0
|
||||
*/
|
||||
public static boolean isMacOS() {
|
||||
return OS_NAME != null && (OS_NAME.contains("mac") || OS_NAME.contains("darwin"));
|
||||
|
@ -212,7 +209,6 @@ public class CompileKotlinOperation extends AbstractOperation<CompileKotlinOpera
|
|||
* Determines if the current operating system is Windows.
|
||||
*
|
||||
* @return true if the operating system is Windows, false otherwise.
|
||||
* @since 1.1.0
|
||||
*/
|
||||
public static boolean isWindows() {
|
||||
return OS_NAME != null && OS_NAME.contains("win");
|
||||
|
|
|
@ -27,7 +27,7 @@ import java.util.List;
|
|||
* Java Virtual Machine options.
|
||||
*
|
||||
* @author <a href="https://erik.thauvin.net/">Erik C. Thauvin</a>
|
||||
* @since 1.1.0
|
||||
* @since 1.0.5
|
||||
*/
|
||||
@SuppressWarnings("PMD.LooseCoupling")
|
||||
public class JvmOptions extends ArrayList<String> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue