diff --git a/build/scripts/download_kotlin.gant b/build/scripts/download_kotlin.gant index 6b7e58c30aec..b383fade563c 100644 --- a/build/scripts/download_kotlin.gant +++ b/build/scripts/download_kotlin.gant @@ -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(".")