Do not load old metadata annotation in check-library-abi-version.kts

Also do not force recompiling markdown since we've moved to 1.1.0 now
This commit is contained in:
Alexander Udalov
2016-01-25 22:41:45 +03:00
parent e53e152f83
commit 36e41554e1
2 changed files with 8 additions and 21 deletions
@@ -31,26 +31,15 @@ fun loadClassVersions(bytes: ByteArray): Pair<List<Int>, List<Int>>? {
var bytecode: IntArray? = null
ClassReader(bytes).accept(object : ClassVisitor(Opcodes.ASM5) {
override fun visitAnnotation(desc: String, visible: Boolean): AnnotationVisitor? {
return when (desc) {
"Lkotlin/Metadata;" ->
object : AnnotationVisitor(Opcodes.ASM5) {
override fun visit(name: String, value: Any) {
when (name) {
"mv" -> metadata = value as IntArray
"bv" -> bytecode = value as IntArray
}
}
if (desc != "Lkotlin/Metadata;") return null
return object : AnnotationVisitor(Opcodes.ASM5) {
override fun visit(name: String, value: Any) {
when (name) {
"mv" -> metadata = value as IntArray
"bv" -> bytecode = value as IntArray
}
"Lkotlin/jvm/internal/KotlinClass;" ->
object : AnnotationVisitor(Opcodes.ASM5) {
override fun visit(name: String, value: Any) {
if (name == "version") {
metadata = value as IntArray
bytecode = metadata
}
}
}
else -> null
}
}
}
}, 0)
-2
View File
@@ -412,8 +412,6 @@
<equals arg1="${markdown.abi.incompatible}" arg2="0"/>
</not>
</condition>
<!-- remove after RC ABI version incremented -->
<property name="markdown.need.recompile" value="true" />
<sequential if:set="markdown.need.recompile">
<echo message="Recompiling intellij-markdown manually"/>