kotlinx-metadata-jvm 0.2.0 has been released.
The major breaking change in this release is that it no longer supports writing class metadata of versions earlier than 1.4. Reading metadata of old format will continue working fine, but writing it had a complicated issue that could result in compilation errors in dependent code, so it was decided to report an error if metadata version is less than 1.4. You can still use older kotlinx-metadata-jvm versions for writing pre-1.4 class files, however please read the mentioned issue and beware of the fact that older versions also suffered from it.
Other than that, this release finally brings the full support of metadata produced by Kotlin 1.4 by adding a new flag for fun interfaces, and the new metadata for optional annotation classes in multiplatform projects.
Full changelog:
-
KT-41011Using KotlinClassMetadata.Class.Writer with metadata version < 1.4 will write incorrect version requirement table- Breaking change:
KotlinClassMetadata.*.Writer.writethrows exception onmetadataVersionearlier than 1.4.0.
Note: metadata of version 1.4 is readable by Kotlin compiler/reflection of versions 1.3 and later.
- Breaking change:
- Breaking change:
KotlinClassMetadata.*.Writer.writeno longer acceptbytecodeVersion. -
KT-42429Wrong interpretation of Flag.Constructor.IS_PRIMARY- Breaking change:
Flag.Constructor.IS_PRIMARYis deprecated, useFlag.Constructor.IS_SECONDARYinstead
- Breaking change:
-
KT-37421AddFlag.Class.IS_FUNfor functional interfaces - Add
KmModule.optionalAnnotationClassesfor the new scheme of compilation of OptionalExpectation annotations in multiplatform projects (KT-38652)