Update jvm-abi-gen to kotlinx-metadata-jvm 0.6.0

This commit is contained in:
Alexander Udalov
2023-01-11 23:27:31 +01:00
parent a7b1bade85
commit 5ef372aab5
3 changed files with 25 additions and 7 deletions
+18
View File
@@ -7155,6 +7155,12 @@
<sha256 value="7779ec96b9acbf92ca023858ac04543f9d2c3bdf1722425fff42f25ff3acfc9b" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.jetbrains.kotlin" name="kotlin-stdlib" version="1.8.0">
<artifact name="kotlin-stdlib-1.8.0.jar">
<md5 value="952dbd9391b7c09ee33321da0ff5d583" origin="Generated by Gradle"/>
<sha256 value="c77bef8774640b9fb9d6e217459ff220dae59878beb7d2e4b430506feffc654e" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.jetbrains.kotlin" name="kotlin-stdlib-common" version="1.3.70">
<artifact name="kotlin-stdlib-common-1.3.70.jar">
<md5 value="53323436def4746efd414192e1add1bc" origin="Generated by Gradle"/>
@@ -7259,6 +7265,12 @@
<sha256 value="e0e91962bc0007338bf5b1739f62927ac32d14ba3d827fa608ab4e5351729d5d" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.jetbrains.kotlin" name="kotlin-stdlib-common" version="1.8.0">
<artifact name="kotlin-stdlib-common-1.8.0.jar">
<md5 value="f11c871eefc3262541c5a3c8d7555e5e" origin="Generated by Gradle"/>
<sha256 value="78ef93b59e603cc0fe51def9bd4c037b07cbace3b3b7806d1a490a42bc1f4cb2" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.jetbrains.kotlin" name="kotlin-stdlib-jdk7" version="1.3.31">
<artifact name="kotlin-stdlib-jdk7-1.3.31.jar">
<md5 value="2ccfa99735888fb60053f3c7f07243f0" origin="Generated by Gradle"/>
@@ -7981,6 +7993,12 @@
<sha256 value="ca063a96639b08b9eaa0de4d65e899480740a6efbe28ab9a8681a2ced03055a4" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.jetbrains.kotlinx" name="kotlinx-metadata-jvm" version="0.6.0">
<artifact name="kotlinx-metadata-jvm-0.6.0.jar">
<md5 value="e0c79c2b06d7e2a00ca76bd13ebd6e38" origin="Generated by Gradle"/>
<sha256 value="a20b73b2b30ba6e08a5ffc990b3db9abd0649e42c79ff5da38d22040a3284068" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.jetbrains.kotlinx" name="kotlinx-metadata-klib" version="0.0.1-dev-10">
<artifact name="kotlinx-metadata-klib-0.0.1-dev-10.jar">
<md5 value="eb72c22727bdbd6abf8649703c82ba68" origin="Generated by Gradle"/>
+1 -1
View File
@@ -48,7 +48,7 @@ versions.kotlinx-collections-immutable=0.3.1
versions.kotlinx-coroutines-core-jvm=1.5.0
versions.kotlinx-coroutines-core=1.5.0
versions.kotlinx-metadata-jvm=0.5.0
versions.kotlinx-metadata-jvm=0.6.0
versions.kotlinx-serialization-json=1.3.3
versions.ktor-network=1.4.0
versions.ktor-utils=1.4.0
@@ -3,6 +3,8 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
@file:Suppress("DEPRECATION")
package org.jetbrains.kotlin.jvm.abi
import kotlinx.metadata.*
@@ -32,17 +34,17 @@ fun abiMetadataProcessor(annotationVisitor: AnnotationVisitor): AnnotationVisito
is KotlinClassMetadata.Class -> {
val writer = KotlinClassMetadata.Class.Writer()
metadata.accept(AbiKmClassVisitor(writer))
writer.write(metadataVersion, header.extraInt).header
writer.write(metadataVersion, header.extraInt).annotationData
}
is KotlinClassMetadata.FileFacade -> {
val writer = KotlinClassMetadata.FileFacade.Writer()
metadata.accept(AbiKmPackageVisitor(writer))
writer.write(metadataVersion, header.extraInt).header
writer.write(metadataVersion, header.extraInt).annotationData
}
is KotlinClassMetadata.MultiFileClassPart -> {
val writer = KotlinClassMetadata.MultiFileClassPart.Writer()
metadata.accept(AbiKmPackageVisitor(writer))
writer.write(metadata.facadeClassName, metadataVersion, header.extraInt).header
writer.write(metadata.facadeClassName, metadataVersion, header.extraInt).annotationData
}
else -> header
}
@@ -105,7 +107,7 @@ private fun kotlinClassHeaderVisitor(body: (KotlinClassHeader) -> Unit): Annotat
/**
* Serialize a KotlinClassHeader to an existing Kotlin Metadata annotation visitor.
*/
private fun AnnotationVisitor.visitKotlinMetadata(header: KotlinClassHeader) {
private fun AnnotationVisitor.visitKotlinMetadata(header: Metadata) {
visit(KIND_FIELD_NAME, header.kind)
visit(METADATA_VERSION_FIELD_NAME, header.metadataVersion)
if (header.data1.isNotEmpty()) {
@@ -136,7 +138,6 @@ private fun AnnotationVisitor.visitKotlinMetadata(header: KotlinClassHeader) {
* Class metadata adapter which removes private functions, properties, type aliases,
* and local delegated properties.
*/
@Suppress("DEPRECATION")
private class AbiKmClassVisitor(delegate: KmClassVisitor) : KmClassVisitor(delegate) {
override fun visitConstructor(flags: Flags): KmConstructorVisitor? {
if (!isPrivateDeclaration(flags))
@@ -173,7 +174,6 @@ private class AbiKmClassVisitor(delegate: KmClassVisitor) : KmClassVisitor(deleg
* Class metadata adapter which removes private functions, properties, type aliases,
* and local delegated properties.
*/
@Suppress("DEPRECATION")
private class AbiKmPackageVisitor(delegate: KmPackageVisitor) : KmPackageVisitor(delegate) {
override fun visitFunction(flags: Flags, name: String): KmFunctionVisitor? {
if (!isPrivateDeclaration(flags))