mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
build scripts: ignore patch number of metadata version when checking Kotlin class-files compatibility (Kotlin 1.0.2 builds produce 1.1.1 version which is compatible with 1.1.0 version produced by Kotlin 1.0.1)
This commit is contained in:
@@ -190,7 +190,7 @@ private String readKotlinClassVersionOfCompiledClasses() {
|
||||
}
|
||||
}
|
||||
|
||||
private String readKotlinClassFileVersion(InputStream classFileStream) {
|
||||
private static String readKotlinClassFileVersion(InputStream classFileStream) {
|
||||
def reader = new ClassReader(classFileStream)
|
||||
String kotlinBytecodeVersion = null
|
||||
String kotlinMetaDataVersion = null
|
||||
@@ -209,7 +209,8 @@ private String readKotlinClassFileVersion(InputStream classFileStream) {
|
||||
return new AnnotationVisitor(Opcodes.ASM5) {
|
||||
void visit(String name, Object value) {
|
||||
if (name == "mv") {
|
||||
kotlinMetaDataVersion = (value as Integer[]).join(".")
|
||||
//strip patch number of metadata version because changes in patch updates are forward and backward compatible
|
||||
kotlinMetaDataVersion = (value as Integer[]).toList().dropRight(1).join(".")
|
||||
}
|
||||
else if (name == "bv") {
|
||||
kotlinBytecodeVersion = (value as Integer[]).join(".")
|
||||
|
||||
Reference in New Issue
Block a user