1.25
This commit is contained in:
parent
9dfb9d1876
commit
8596bcae2c
|
|
@ -9,7 +9,7 @@ plugins {
|
||||||
apply plugin: 'kotlin'
|
apply plugin: 'kotlin'
|
||||||
|
|
||||||
group 'io.izzel.taboolib'
|
group 'io.izzel.taboolib'
|
||||||
version '1.24'
|
version '1.25'
|
||||||
|
|
||||||
configurations {
|
configurations {
|
||||||
embed
|
embed
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,29 @@
|
||||||
|
package io.izzel.taboolib.gradle
|
||||||
|
|
||||||
|
import org.gradle.api.Project
|
||||||
|
import org.objectweb.asm.AnnotationVisitor
|
||||||
|
import org.objectweb.asm.Opcodes
|
||||||
|
|
||||||
|
class KotlinMetaAnnotationVisitor extends AnnotationVisitor {
|
||||||
|
|
||||||
|
Project project
|
||||||
|
|
||||||
|
KotlinMetaAnnotationVisitor(AnnotationVisitor annotationVisitor, project) {
|
||||||
|
super(Opcodes.ASM7, annotationVisitor)
|
||||||
|
this.project = project
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
void visit(String name, Object value) {
|
||||||
|
if (value instanceof String) {
|
||||||
|
super.visit(name, value.replace("taboolib", "${project.group.replace('.', '/')}/taboolib"))
|
||||||
|
} else {
|
||||||
|
super.visit(name, value)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
AnnotationVisitor visitArray(String name) {
|
||||||
|
return new KotlinMetaAnnotationVisitor(super.visitArray(name), project)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -40,7 +40,9 @@ class TabooLibClassVisitor extends ClassVisitor {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
AnnotationVisitor visitAnnotation(String descriptor, boolean visible) {
|
AnnotationVisitor visitAnnotation(String descriptor, boolean visible) {
|
||||||
if (descriptor == "L${project.group.replace('.', '/')}/taboolib/common/Isolated;") {
|
if (descriptor == "Lkotlin/Metadata;") {
|
||||||
|
return new KotlinMetaAnnotationVisitor(super.visitAnnotation(descriptor, visible), project)
|
||||||
|
} else if (descriptor == "L${project.group.replace('.', '/')}/taboolib/common/Isolated;") {
|
||||||
return new IsolatedAnnotationVisitor(super.visitAnnotation(descriptor, visible), project, name, this)
|
return new IsolatedAnnotationVisitor(super.visitAnnotation(descriptor, visible), project, name, this)
|
||||||
} else if (descriptor == "L${project.group.replace('.', '/')}/taboolib/common/env/RuntimeDependency;") {
|
} else if (descriptor == "L${project.group.replace('.', '/')}/taboolib/common/env/RuntimeDependency;") {
|
||||||
return new KotlinAnnotationVisitor(super.visitAnnotation(descriptor, visible), project)
|
return new KotlinAnnotationVisitor(super.visitAnnotation(descriptor, visible), project)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue