From 5812d28b805be15b3bf97c02c7fb021b41c178c6 Mon Sep 17 00:00:00 2001 From: Alexander Udalov Date: Wed, 8 May 2019 13:21:20 +0200 Subject: [PATCH] Update ReadMe of kotilnx-metadata-jvm - remove the requirement to use Bintray repo; kotlinx-metadata-jvm is published to Maven Central now - remove the note about kotlin.Metadata being internal; it's public since 1.3 --- libraries/kotlinx-metadata/jvm/ReadMe.md | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/libraries/kotlinx-metadata/jvm/ReadMe.md b/libraries/kotlinx-metadata/jvm/ReadMe.md index 6ada5ec0fa6..55a1c07fdd6 100644 --- a/libraries/kotlinx-metadata/jvm/ReadMe.md +++ b/libraries/kotlinx-metadata/jvm/ReadMe.md @@ -4,7 +4,7 @@ This library provides an API to read and modify metadata of binary files generat ## Usage -To use this library in your project, add the kotlinx repository at https://kotlin.bintray.com/kotlinx, and a dependency on `org.jetbrains.kotlinx:kotlinx-metadata-jvm:$kotlinx_metadata_version` (where `kotlinx_metadata_version` is the version of the library). +To use this library in your project, add a dependency on `org.jetbrains.kotlinx:kotlinx-metadata-jvm:$kotlinx_metadata_version` (where `kotlinx_metadata_version` is the version of the library). Example usage in Maven: @@ -17,13 +17,6 @@ Example usage in Maven: ${kotlinx_metadata_version} - - - bintray-kotlin-kotlinx - bintray - https://kotlin.bintray.com/kotlinx - - ... ``` @@ -33,7 +26,6 @@ Example usage in Gradle: ``` repositories { mavenCentral() - maven { url "https://kotlin.bintray.com/kotlinx/" } } dependencies { @@ -43,7 +35,7 @@ dependencies { ## Overview -The entry point for reading the Kotlin metadata of a `.class` file is [`KotlinClassMetadata.read`](src/kotlinx/metadata/jvm/KotlinClassMetadata.kt). The data it takes is encapsulated in [`KotlinClassHeader`](src/kotlinx/metadata/jvm/KotlinClassHeader.kt) which is basically what is written in the [`kotlin.Metadata`](../../stdlib/jvm/runtime/kotlin/Metadata.kt) annotation on the class file generated by the Kotlin compiler. Construct `KotlinClassHeader` by reading the values from `kotlin.Metadata` reflectively or from some other resource, and then use `KotlinClassMetadata.read` to obtain the correct instance of the class metadata. (Note that loading values of `kotlin.Metadata` reflectively is only possible *from Java sources* until Kotlin 1.3, because this annotation is internal in the standard library, see [KT-23602](https://youtrack.jetbrains.com/issue/KT-23602).) +The entry point for reading the Kotlin metadata of a `.class` file is [`KotlinClassMetadata.read`](src/kotlinx/metadata/jvm/KotlinClassMetadata.kt). The data it takes is encapsulated in [`KotlinClassHeader`](src/kotlinx/metadata/jvm/KotlinClassHeader.kt) which is basically what is written in the [`kotlin.Metadata`](../../stdlib/jvm/runtime/kotlin/Metadata.kt) annotation on the class file generated by the Kotlin compiler. Construct `KotlinClassHeader` by reading the values from `kotlin.Metadata` reflectively or from some other resource, and then use `KotlinClassMetadata.read` to obtain the correct instance of the class metadata. ```kotlin val header = KotlinClassHeader(