-mode idea
#KT-1893 Fixed
This commit is contained in:
+6
-1
@@ -45,6 +45,11 @@ public class CompilerDependencies {
|
||||
this.jdkHeadersJar = jdkHeadersJar;
|
||||
this.runtimeJar = runtimeJar;
|
||||
|
||||
if (compilerSpecialMode.includeJdk()) {
|
||||
if (jdkJar == null) {
|
||||
throw new IllegalArgumentException("jdk must be included for mode " + compilerSpecialMode);
|
||||
}
|
||||
}
|
||||
if (compilerSpecialMode.includeJdkHeaders()) {
|
||||
if (jdkHeadersJar == null) {
|
||||
throw new IllegalArgumentException("jdkHeaders must be included for mode " + compilerSpecialMode);
|
||||
@@ -101,7 +106,7 @@ public class CompilerDependencies {
|
||||
public static CompilerDependencies compilerDependenciesForProduction(@NotNull CompilerSpecialMode compilerSpecialMode) {
|
||||
return new CompilerDependencies(
|
||||
compilerSpecialMode,
|
||||
findRtJar(),
|
||||
compilerSpecialMode.includeJdk() ? findRtJar() : null,
|
||||
compilerSpecialMode.includeJdkHeaders() ? PathUtil.getAltHeadersPath() : null,
|
||||
compilerSpecialMode.includeKotlinRuntime() ? PathUtil.getDefaultRuntimePath() : null);
|
||||
}
|
||||
|
||||
+6
-1
@@ -24,17 +24,22 @@ public enum CompilerSpecialMode {
|
||||
BUILTINS,
|
||||
JDK_HEADERS,
|
||||
STDLIB,
|
||||
IDEA,
|
||||
JS,
|
||||
;
|
||||
|
||||
public boolean includeJdkHeaders() {
|
||||
return this == REGULAR || this == STDLIB;
|
||||
return this == REGULAR || this == STDLIB || this == IDEA;
|
||||
}
|
||||
|
||||
public boolean includeKotlinRuntime() {
|
||||
return this == REGULAR;
|
||||
}
|
||||
|
||||
public boolean includeJdk() {
|
||||
return this != IDEA;
|
||||
}
|
||||
|
||||
public boolean isStubs() {
|
||||
return this == BUILTINS || this == JDK_HEADERS;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user