Support patch versions in RequireKotlin with kind=COMPILER_VERSION
This commit is contained in:
committed by
Denis Zharkov
parent
72222c718a
commit
b6a55f74f4
@@ -16,6 +16,8 @@
|
||||
|
||||
package org.jetbrains.kotlin.config;
|
||||
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public class KotlinCompilerVersion {
|
||||
// The value of this constant is generated by the build script
|
||||
// DON'T MODIFY IT
|
||||
@@ -38,6 +40,15 @@ public class KotlinCompilerVersion {
|
||||
return IS_PRE_RELEASE;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return version of this compiler, or `null` if it isn't known (if VERSION is "@snapshot@")
|
||||
*/
|
||||
@Nullable
|
||||
public static String getVersion() {
|
||||
//noinspection ConstantConditions
|
||||
return VERSION.equals("@snapshot@") ? null : VERSION;
|
||||
}
|
||||
|
||||
static {
|
||||
//noinspection ConstantConditions
|
||||
if (!VERSION.equals("@snapshot@") && !VERSION.contains("-") && IS_PRE_RELEASE) {
|
||||
|
||||
Reference in New Issue
Block a user