Add setting to enable JS IC for JPS
#KT-25565 fixed
This commit is contained in:
@@ -21,11 +21,11 @@ import org.jetbrains.annotations.TestOnly;
|
||||
import java.util.List;
|
||||
|
||||
public class IncrementalCompilation {
|
||||
private static final String INCREMENTAL_COMPILATION_PROPERTY = "kotlin.incremental.compilation";
|
||||
private static final String INCREMENTAL_COMPILATION_JS_PROPERTY = "kotlin.incremental.compilation.js";
|
||||
public static final String INCREMENTAL_COMPILATION_JVM_PROPERTY = "kotlin.incremental.compilation";
|
||||
public static final String INCREMENTAL_COMPILATION_JS_PROPERTY = "kotlin.incremental.compilation.js";
|
||||
|
||||
public static boolean isEnabledForJvm() {
|
||||
return "true".equals(System.getProperty(INCREMENTAL_COMPILATION_PROPERTY));
|
||||
return "true".equals(System.getProperty(INCREMENTAL_COMPILATION_JVM_PROPERTY));
|
||||
}
|
||||
|
||||
public static boolean isEnabledForJs() {
|
||||
@@ -34,7 +34,7 @@ public class IncrementalCompilation {
|
||||
|
||||
@TestOnly
|
||||
public static void setIsEnabled(boolean value) {
|
||||
System.setProperty(INCREMENTAL_COMPILATION_PROPERTY, String.valueOf(value));
|
||||
System.setProperty(INCREMENTAL_COMPILATION_JVM_PROPERTY, String.valueOf(value));
|
||||
}
|
||||
|
||||
@TestOnly
|
||||
@@ -43,7 +43,7 @@ public class IncrementalCompilation {
|
||||
}
|
||||
|
||||
public static void toJvmArgs(List<String> jvmArgs) {
|
||||
if (isEnabledForJvm()) addJvmSystemFlag(jvmArgs, INCREMENTAL_COMPILATION_PROPERTY);
|
||||
if (isEnabledForJvm()) addJvmSystemFlag(jvmArgs, INCREMENTAL_COMPILATION_JVM_PROPERTY);
|
||||
if (isEnabledForJs()) addJvmSystemFlag(jvmArgs, INCREMENTAL_COMPILATION_JS_PROPERTY);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user