Support jps.kotlin.home
This commit is contained in:
committed by
Natalia.Ukhorskaya
parent
8511137596
commit
aa90dac6d1
@@ -44,18 +44,17 @@ public class PathUtil {
|
|||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
public static KotlinPaths getKotlinPathsForJpsPlugin() {
|
public static KotlinPaths getKotlinPathsForJpsPlugin() {
|
||||||
return new KotlinPathsFromHomeDir(getCompilerPathForJpsPlugin());
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotNull
|
|
||||||
public static KotlinPaths getKotlinPathsForJpsPluginOrJpsTests() {
|
|
||||||
// When JPS is run on TeamCity, it can not rely on Kotlin plugin layout,
|
// When JPS is run on TeamCity, it can not rely on Kotlin plugin layout,
|
||||||
// so the path to Kotlin is specified in a system property
|
// so the path to Kotlin is specified in a system property
|
||||||
String jpsKotlinHome = System.getProperty("jps.kotlin.home");
|
String jpsKotlinHome = System.getProperty("jps.kotlin.home");
|
||||||
if (jpsKotlinHome != null) {
|
if (jpsKotlinHome != null) {
|
||||||
return new KotlinPathsFromHomeDir(new File(jpsKotlinHome));
|
return new KotlinPathsFromHomeDir(new File(jpsKotlinHome));
|
||||||
}
|
}
|
||||||
|
return new KotlinPathsFromHomeDir(getCompilerPathForJpsPlugin());
|
||||||
|
}
|
||||||
|
|
||||||
|
@NotNull
|
||||||
|
public static KotlinPaths getKotlinPathsForJpsPluginOrJpsTests() {
|
||||||
if ("true".equalsIgnoreCase(System.getProperty("kotlin.jps.tests"))) {
|
if ("true".equalsIgnoreCase(System.getProperty("kotlin.jps.tests"))) {
|
||||||
return getKotlinPathsForDistDirectory();
|
return getKotlinPathsForDistDirectory();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user