Introduce Kotlin language version 1.2
Wherein DEFAULT version is still 1.1, which means that version 1.2 should be configured manually
This commit is contained in:
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2016 JetBrains s.r.o.
|
||||
* Copyright 2010-2017 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -29,7 +29,7 @@ open class DefaultValues(val defaultValue: String, val possibleValues: List<Stri
|
||||
object StringNullDefault : DefaultValues("null")
|
||||
|
||||
object LanguageVersions : DefaultValues(
|
||||
"\"" + LanguageVersion.LATEST.versionString + "\"",
|
||||
"\"" + LanguageVersion.LATEST_STABLE.versionString + "\"",
|
||||
LanguageVersion.values().map { "\"${it.versionString}\"" }
|
||||
)
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2016 JetBrains s.r.o.
|
||||
* Copyright 2010-2017 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -231,8 +231,8 @@ public abstract class CLICompiler<A extends CommonCompilerArguments> {
|
||||
LanguageVersion apiVersion = parseVersion(configuration, arguments.apiVersion, "API");
|
||||
|
||||
if (languageVersion == null) {
|
||||
// If only "-api-version" is specified, language version is assumed to be the latest
|
||||
languageVersion = LanguageVersion.LATEST;
|
||||
// If only "-api-version" is specified, language version is assumed to be the latest stable
|
||||
languageVersion = LanguageVersion.LATEST_STABLE;
|
||||
}
|
||||
|
||||
if (apiVersion == null) {
|
||||
|
||||
+3
-3
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2016 JetBrains s.r.o.
|
||||
* Copyright 2010-2017 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -199,10 +199,10 @@ object JvmRuntimeVersionsConsistencyChecker {
|
||||
}
|
||||
|
||||
private fun checkNotNewerThanCompiler(messageCollector: MessageCollector, jar: KotlinLibraryFile): Boolean {
|
||||
if (jar.version > ApiVersion.LATEST.version) {
|
||||
if (jar.version > ApiVersion.LATEST_STABLE.version) {
|
||||
messageCollector.issue(
|
||||
jar.file,
|
||||
"Runtime JAR file has version ${jar.version} which is newer than compiler version ${ApiVersion.LATEST.version}",
|
||||
"Runtime JAR file has version ${jar.version} which is newer than compiler version ${ApiVersion.LATEST_STABLE.version}",
|
||||
CompilerMessageSeverity.ERROR
|
||||
)
|
||||
return true
|
||||
|
||||
Reference in New Issue
Block a user