Move testable IS_PRE_RELEASE flag to KotlinCompilerVersion
It'll be used in the JS back-end as well soon, so DeserializedDescriptorResolver is not the best place for it
This commit is contained in:
@@ -24,7 +24,18 @@ public class KotlinCompilerVersion {
|
||||
// True if this compiler is of a non-stable (EAP or Beta) version.
|
||||
// Binaries produced by this compiler can not be loaded by release versions of the compiler.
|
||||
// Change this value before and after every major release
|
||||
public static final boolean IS_PRE_RELEASE = false;
|
||||
private static final boolean IS_PRE_RELEASE = false;
|
||||
|
||||
public static final String TEST_IS_PRE_RELEASE_SYSTEM_PROPERTY = "kotlin.test.is.pre.release";
|
||||
|
||||
public static boolean isPreRelease() {
|
||||
String overridden = System.getProperty(TEST_IS_PRE_RELEASE_SYSTEM_PROPERTY);
|
||||
if (overridden != null) {
|
||||
return Boolean.parseBoolean(overridden);
|
||||
}
|
||||
|
||||
return IS_PRE_RELEASE;
|
||||
}
|
||||
|
||||
static {
|
||||
if (!VERSION.equals("@snapshot@") && !VERSION.contains("-") && IS_PRE_RELEASE) {
|
||||
|
||||
Reference in New Issue
Block a user