Add KotlinVersion.IS_PRE_RELEASE and a flag to kotlin/Metadata
This commit is contained in:
@@ -20,4 +20,18 @@ public class KotlinCompilerVersion {
|
||||
// The value of this constant is generated by the build script
|
||||
// DON'T MODIFY IT
|
||||
public static final String VERSION = "@snapshot@";
|
||||
|
||||
// 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 = true;
|
||||
|
||||
static {
|
||||
if (!VERSION.equals("@snapshot@") && !VERSION.contains("-") && IS_PRE_RELEASE) {
|
||||
throw new IllegalStateException(
|
||||
"IS_PRE_RELEASE cannot be false for a compiler without '-' in its version.\n" +
|
||||
"Please change IS_PRE_RELEASE to false, commit and push this change to master"
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user