-
Notifications
You must be signed in to change notification settings - Fork 107
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update kotlin to 1.8.10, xprocessing to 1.6.0-alpha01 (#317)
* Bump kotlin, ksp, xprocessing, agp * Update kotlin metadata usage --------- Co-authored-by: Vinay Gaba <vinaygaba@gmail.com>
- Loading branch information
Showing
7 changed files
with
69 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 1 addition & 12 deletions
13
...rocessor/src/main/java/com/airbnb/android/showkase/processor/utils/KotlinMetadataUtils.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,10 @@ | ||
package com.airbnb.android.showkase.processor.utils | ||
|
||
import kotlinx.metadata.jvm.KotlinClassHeader | ||
import kotlinx.metadata.jvm.KotlinClassMetadata | ||
import javax.lang.model.element.Element | ||
|
||
internal fun Element.kotlinMetadata(): KotlinClassMetadata? { | ||
// https://github.com/JetBrains/kotlin/tree/master/libraries/kotlinx-metadata/jvm | ||
val kotlinMetadataAnnotation = getAnnotation(Metadata::class.java) ?: return null | ||
val header = KotlinClassHeader( | ||
kind = kotlinMetadataAnnotation.kind, | ||
metadataVersion = kotlinMetadataAnnotation.metadataVersion, | ||
data1 = kotlinMetadataAnnotation.data1, | ||
data2 = kotlinMetadataAnnotation.data2, | ||
extraString = kotlinMetadataAnnotation.extraString, | ||
packageName = kotlinMetadataAnnotation.packageName, | ||
extraInt = kotlinMetadataAnnotation.extraInt | ||
) | ||
|
||
return KotlinClassMetadata.read(header) | ||
return KotlinClassMetadata.read(kotlinMetadataAnnotation) | ||
} |