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).
|
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:
|
The plugin will look in common locations such as:
|
||||||
|
- `KOTLIN_HOME`
|
||||||
- `KOTLIN_HOME`
|
- `PATH`
|
||||||
- `PATH`
|
- SDKMAN!
|
||||||
- [SDKMAN!](https://sdkman.io/)
|
- Homebrew
|
||||||
- [Homebrew](https://brew.sh/)
|
- JetBrains Toolbox (IntelliJ IDEA, Android Studio)
|
||||||
- [JetBrains Toolbox](https://www.jetbrains.com/toolbox-app/) (IntelliJ IDEA, Android Studio)
|
- etc.
|
||||||
- etc.
|
|
||||||
|
|
||||||
You can also manually configure the Kotlin home location as follows:
|
You can also manually configure the Kotlin home location as follows:
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
bld.downloadExtensionJavadoc=false
|
bld.downloadExtensionJavadoc=false
|
||||||
bld.downloadExtensionSources=true
|
bld.downloadExtensionSources=true
|
||||||
bld.downloadLocation=
|
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.repositories=MAVEN_LOCAL,MAVEN_CENTRAL,RIFE2_SNAPSHOTS,RIFE2_RELEASES
|
||||||
bld.sourceDirectories=
|
bld.sourceDirectories=
|
||||||
bld.version=2.2.1
|
bld.version=2.2.1
|
||||||
|
|
|
@ -33,7 +33,7 @@ public class CompileKotlinOperationBuild extends Project {
|
||||||
public CompileKotlinOperationBuild() {
|
public CompileKotlinOperationBuild() {
|
||||||
pkg = "rife.bld.extension";
|
pkg = "rife.bld.extension";
|
||||||
name = "bld-kotlin";
|
name = "bld-kotlin";
|
||||||
version = version(1, 1, 0, "SNAPSHOT");
|
version = version(1, 0, 5, "SNAPSHOT");
|
||||||
|
|
||||||
javaRelease = 17;
|
javaRelease = 17;
|
||||||
|
|
||||||
|
|
|
@ -79,7 +79,6 @@ public class CompileKotlinOperation extends AbstractOperation<CompileKotlinOpera
|
||||||
* Locates the Kotlin compiler (kotlinc) executable.
|
* Locates the Kotlin compiler (kotlinc) executable.
|
||||||
*
|
*
|
||||||
* @return The path to the kotlinc executable, or {@code kotlinc}/{@code kotlinc.bat} if not found.
|
* @return The path to the kotlinc executable, or {@code kotlinc}/{@code kotlinc.bat} if not found.
|
||||||
* @since 1.1.0
|
|
||||||
*/
|
*/
|
||||||
public static String findKotlincPath() {
|
public static String findKotlincPath() {
|
||||||
String kotlincPath;
|
String kotlincPath;
|
||||||
|
@ -109,6 +108,10 @@ public class CompileKotlinOperation extends AbstractOperation<CompileKotlinOpera
|
||||||
List<String> commonPaths = new ArrayList<>();
|
List<String> commonPaths = new ArrayList<>();
|
||||||
|
|
||||||
if (isLinux()) {
|
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");
|
var userHome = System.getProperty("user.home");
|
||||||
if (userHome != null) {
|
if (userHome != null) {
|
||||||
commonPaths.add(userHome + "/.sdkman/candidates/kotlin/current/bin"); // SDKMAN!
|
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/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(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()) {
|
} else if (isWindows()) {
|
||||||
var localAppData = System.getenv("LOCALAPPDATA");
|
var localAppData = System.getenv("LOCALAPPDATA");
|
||||||
if (localAppData != null) {
|
if (localAppData != null) {
|
||||||
|
@ -132,6 +131,8 @@ public class CompileKotlinOperation extends AbstractOperation<CompileKotlinOpera
|
||||||
commonPaths.add(programFiles + File.separator + "Kotlin");
|
commonPaths.add(programFiles + File.separator + "Kotlin");
|
||||||
}
|
}
|
||||||
} else if (isMacOS()) {
|
} else if (isMacOS()) {
|
||||||
|
commonPaths.add("/usr/local/bin"); // Homebrew
|
||||||
|
commonPaths.add("/opt/homebrew/bin"); // Homebrew
|
||||||
var userHome = System.getProperty("user.home");
|
var userHome = System.getProperty("user.home");
|
||||||
if (userHome != null) {
|
if (userHome != null) {
|
||||||
commonPaths.add(userHome + "/.sdkman/candidates/kotlin/current/bin"); // SDKMAN!
|
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 Ultimate.app/Contents/plugins/Kotlin/bin"); //IntelliJ IDEA Ultimate
|
||||||
commonPaths.add("/Applications/IntelliJ IDEA.app/Contents/plugins/Kotlin/bin"); //IntelliJ IDEA
|
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("/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) {
|
for (var location : commonPaths) {
|
||||||
|
@ -182,7 +181,6 @@ public class CompileKotlinOperation extends AbstractOperation<CompileKotlinOpera
|
||||||
* Determines if the operating system is Linux.
|
* Determines if the operating system is Linux.
|
||||||
*
|
*
|
||||||
* @return true if the operating system is Linux, false otherwise.
|
* @return true if the operating system is Linux, false otherwise.
|
||||||
* @since 1.1.0
|
|
||||||
*/
|
*/
|
||||||
public static boolean isLinux() {
|
public static boolean isLinux() {
|
||||||
return OS_NAME != null && (OS_NAME.contains("linux") || OS_NAME.contains("unix")); // Consider Unix-like systems as well.
|
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.
|
* Determines if the current operating system is macOS.
|
||||||
*
|
*
|
||||||
* @return true if the OS is macOS, false otherwise.
|
* @return true if the OS is macOS, false otherwise.
|
||||||
* @since 1.1.0
|
|
||||||
*/
|
*/
|
||||||
public static boolean isMacOS() {
|
public static boolean isMacOS() {
|
||||||
return OS_NAME != null && (OS_NAME.contains("mac") || OS_NAME.contains("darwin"));
|
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.
|
* Determines if the current operating system is Windows.
|
||||||
*
|
*
|
||||||
* @return true if the operating system is Windows, false otherwise.
|
* @return true if the operating system is Windows, false otherwise.
|
||||||
* @since 1.1.0
|
|
||||||
*/
|
*/
|
||||||
public static boolean isWindows() {
|
public static boolean isWindows() {
|
||||||
return OS_NAME != null && OS_NAME.contains("win");
|
return OS_NAME != null && OS_NAME.contains("win");
|
||||||
|
|
|
@ -27,7 +27,7 @@ import java.util.List;
|
||||||
* Java Virtual Machine options.
|
* Java Virtual Machine options.
|
||||||
*
|
*
|
||||||
* @author <a href="https://erik.thauvin.net/">Erik C. Thauvin</a>
|
* @author <a href="https://erik.thauvin.net/">Erik C. Thauvin</a>
|
||||||
* @since 1.1.0
|
* @since 1.0.5
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("PMD.LooseCoupling")
|
@SuppressWarnings("PMD.LooseCoupling")
|
||||||
public class JvmOptions extends ArrayList<String> {
|
public class JvmOptions extends ArrayList<String> {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue