Implement reading kx.serialization runtime metadata from jar manifest

That allows to check whether current compiler plugin can work with
a given runtime version. Implementation-Version can help to detect whether
runtime version is too low, and Require-Kotlin-Version detects whether
runtime version is too high.

Corresponding diagnostic for Require-Kotlin included.
Implement minimal runtime version check for kotlinx.serialization
plugin.

 #KT-40036 Fixed

Cache result from getVersionsForCurrentModule in BindingTrace.
Hide check in the IDE, because caching in trace does not work there.
This commit is contained in:
Leonid Startsev
2020-07-16 22:10:14 +03:00
parent 7db0bf8195
commit df5f38fec8
6 changed files with 146 additions and 9 deletions
@@ -1,5 +1,5 @@
/*
* Copyright 2010-2019 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
@@ -14,4 +14,7 @@ class SerializationPluginIDEDeclarationChecker : SerializationPluginDeclarationC
// were imported into project model from Gradle.
return getIfEnabledOn(descriptor) { true } == true
}
override val isIde: Boolean
get() = true
}