Enable disabling incremental compilation for tests

This commit is contained in:
Alexey Tsvetkov
2015-09-24 23:26:53 +03:00
parent b6bbc4015b
commit 68437175f6
8 changed files with 30 additions and 14 deletions
@@ -16,6 +16,22 @@
package org.jetbrains.kotlin.config;
import org.jetbrains.annotations.TestOnly;
public class IncrementalCompilation {
public static final boolean ENABLED = !"false".equals(System.getProperty("kotlin.incremental.compilation"));
}
private static final String INCREMENTAL_COMPILATION_PROPERTY = "kotlin.incremental.compilation";
public static boolean isEnabled() {
return !"false".equals(System.getProperty(INCREMENTAL_COMPILATION_PROPERTY));
}
@TestOnly
public static void disableIncrementalCompilation() {
System.setProperty(INCREMENTAL_COMPILATION_PROPERTY, "false");
}
@TestOnly
public static void enableIncrementalCompilation() {
System.setProperty(INCREMENTAL_COMPILATION_PROPERTY, "true");
}
}