Skip to content

Commit

Permalink
fix: ignore some very very old kotlin classes to prevent them breakin…
Browse files Browse the repository at this point in the history
  • Loading branch information
zly2006 committed Nov 8, 2024
1 parent 495aae3 commit b4dafdf
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,13 @@ class KotlinClassMetadataRemappingAnnotationVisitor(
"is using (${KotlinVersion.CURRENT}).",
)
}
val metadata = KotlinClassMetadata.readLenient(header)
if (metadata.version.major < 1 || (metadata.version.major == 1 && metadata.version.minor < 4)) {
logger.warn("$className is not supported by kotlin metadata remapping (version: ${metadata.version})")
return
}

when (val metadata = KotlinClassMetadata.readLenient(header)) {
when (metadata) {
is KotlinClassMetadata.Class -> {
var klass = metadata.kmClass
klass = KotlinClassRemapper(remapper).remap(klass)
Expand Down

0 comments on commit b4dafdf

Please sign in to comment.