Compare commits

..

No commits in common. "master" and "1.24" have entirely different histories.
master ... 1.24

5 changed files with 4 additions and 40 deletions

View File

@ -9,7 +9,7 @@ plugins {
apply plugin: 'kotlin' apply plugin: 'kotlin'
group 'io.izzel.taboolib' group 'io.izzel.taboolib'
version '1.27' version '1.24'
configurations { configurations {
embed embed

View File

@ -1,29 +0,0 @@
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)
}
}

View File

@ -40,9 +40,7 @@ class TabooLibClassVisitor extends ClassVisitor {
@Override @Override
AnnotationVisitor visitAnnotation(String descriptor, boolean visible) { AnnotationVisitor visitAnnotation(String descriptor, boolean visible) {
if (descriptor == "Lkotlin/Metadata;") { if (descriptor == "L${project.group.replace('.', '/')}/taboolib/common/Isolated;") {
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)

View File

@ -23,10 +23,5 @@ class Links {
this.url = url this.url = url
return this return this
} }
@Override
String toString() {
return url
}
} }
} }

View File

@ -106,7 +106,7 @@ class OptimizeFileReader(project: Project, input: InputStream) {
if (member.any { name.startsWith(it) }) { if (member.any { name.startsWith(it) }) {
if (depend != null) { if (depend != null) {
val fail = depend.name.any { n -> val fail = depend.name.any { n ->
val set = use[n]?.toMutableList() ?: ArrayList() val set = use[n]!!.toMutableList()
set.remove(n) set.remove(n)
set.removeAll(depend.exclude) set.removeAll(depend.exclude)
set.isNotEmpty() set.isNotEmpty()
@ -116,7 +116,7 @@ class OptimizeFileReader(project: Project, input: InputStream) {
} }
} }
for (s in check) { for (s in check) {
val set = use[s]?.toMutableList() ?: ArrayList() val set = use[s]!!.toMutableList()
set.remove(s) set.remove(s)
set.removeAll(check) set.removeAll(check)
set.removeAll(member) set.removeAll(member)