diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2018-07-14 20:57:42 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2018-07-14 20:57:42 +0100 |
commit | 1798c4aeca70ac8d0a243684d6a798fbc65735f8 (patch) | |
tree | e48e19cb6fa03de18e1c63e1a93371b7ebc4eb56 /dev-java/groovy/files | |
parent | d87262dd706fec50cd150aab3e93883b6337466d (diff) |
gentoo resync : 14.07.2018
Diffstat (limited to 'dev-java/groovy/files')
-rw-r--r-- | dev-java/groovy/files/groovy-2.4.5-utils.gradle.patch | 116 |
1 files changed, 0 insertions, 116 deletions
diff --git a/dev-java/groovy/files/groovy-2.4.5-utils.gradle.patch b/dev-java/groovy/files/groovy-2.4.5-utils.gradle.patch deleted file mode 100644 index 6f4638a1bf1d..000000000000 --- a/dev-java/groovy/files/groovy-2.4.5-utils.gradle.patch +++ /dev/null @@ -1,116 +0,0 @@ ---- gradle/utils.gradle.orig 2015-11-01 21:06:26.246486000 +0000 -+++ gradle/utils.gradle 2015-11-01 21:06:57.719486000 +0000 -@@ -16,57 +16,47 @@ - * specific language governing permissions and limitations - * under the License. - */ --import org.codehaus.groovy.classgen.AnnotationVisitor --import org.objectweb.asm.ClassWriter --import org.objectweb.asm.FieldVisitor --import org.objectweb.asm.Label --import org.objectweb.asm.MethodVisitor -- --import static org.objectweb.asm.Opcodes.* -- --buildscript { -- repositories { -- mavenCentral() -- } -- dependencies { -- classpath "org.ow2.asm:asm:$asmVersion" -- } --} -+import static org.objectweb.asm.Opcodes.ACC_PUBLIC; -+import static org.objectweb.asm.Opcodes.ACC_STATIC; -+import static org.objectweb.asm.Opcodes.ACC_SUPER; -+import static org.objectweb.asm.Opcodes.ALOAD; -+import static org.objectweb.asm.Opcodes.ATHROW; -+import static org.objectweb.asm.Opcodes.INVOKESPECIAL; -+import static org.objectweb.asm.Opcodes.RETURN; -+import static org.objectweb.asm.Opcodes.V1_5; -+ -+import java.io.File; -+import java.io.FileOutputStream; -+ -+import org.objectweb.asm.ClassWriter; -+import org.objectweb.asm.Label; -+import org.objectweb.asm.MethodVisitor; - --/** -- * This tasks generates an utility class which allows sneaky throwing. -- */ --task exceptionUtils { -- ext.classFiles = [ -- "${buildDir}/generated-classes/org/codehaus/groovy/runtime/ExceptionUtils.class", -- "${compileJava.destinationDir}/org/codehaus/groovy/runtime/ExceptionUtils.class"] -- outputs.files classFiles -+public class ExceptionUtils { -+ private final static String gentooClassDestination = "target/classes/org/codehaus/groovy/runtime/ExceptionUtils.class"; - -- doLast { -+ public static void main(String[] args) { - ClassWriter cw = new ClassWriter(0); -- FieldVisitor fv; - MethodVisitor mv; -- AnnotationVisitor av0; -- -- cw.visit(V1_5, ACC_PUBLIC + ACC_SUPER, 'org/codehaus/groovy/runtime/ExceptionUtils', null, 'java/lang/Object', null); - -- cw.visitSource('ExceptionUtils.java', null); -+ cw.visit(V1_5, ACC_PUBLIC + ACC_SUPER, "org/codehaus/groovy/runtime/ExceptionUtils", null, "java/lang/Object", null); -+ cw.visitSource("ExceptionUtils.java", null); - -- mv = cw.visitMethod(ACC_PUBLIC, '<init>', '()V', null, null); -+ mv = cw.visitMethod(ACC_PUBLIC, "<init>", "()V", null, null); - mv.visitCode(); - Label l0 = new Label(); - mv.visitLabel(l0); - mv.visitLineNumber(18, l0); - mv.visitVarInsn(ALOAD, 0); -- mv.visitMethodInsn(INVOKESPECIAL, 'java/lang/Object', '<init>', '()V', false); -+ mv.visitMethodInsn(INVOKESPECIAL, "java/lang/Object", "<init>", "()V", false); - mv.visitInsn(RETURN); - Label l1 = new Label(); - mv.visitLabel(l1); -- mv.visitLocalVariable('this', 'Lorg/codehaus/groovy/runtime/ExceptionUtils;', null, l0, l1, 0); -+ mv.visitLocalVariable("this", "Lorg/codehaus/groovy/runtime/ExceptionUtils;", null, l0, l1, 0); - mv.visitMaxs(1, 1); - mv.visitEnd(); - -- mv = cw.visitMethod(ACC_PUBLIC + ACC_STATIC, 'sneakyThrow', '(Ljava/lang/Throwable;)V', null, null); -+ mv = cw.visitMethod(ACC_PUBLIC + ACC_STATIC, "sneakyThrow", "(Ljava/lang/Throwable;)V", null, null); - mv.visitCode(); - Label l2 = new Label(); - mv.visitLabel(l2); -@@ -75,19 +65,21 @@ - mv.visitInsn(ATHROW); - Label l3 = new Label(); - mv.visitLabel(l3); -- mv.visitLocalVariable('e', 'Ljava/lang/Throwable;', null, l2, l3, 0); -+ mv.visitLocalVariable("e", "Ljava/lang/Throwable;", null, l2, l3, 0); - mv.visitMaxs(1, 1); - mv.visitEnd(); - - cw.visitEnd(); -+ FileOutputStream fos = null; - -- logger.lifecycle('Generating ExceptionUtils') -- classFiles.each { classFile -> -- def output = file(classFile) -- output.parentFile.mkdirs() -- output.withOutputStream { -- it << cw.toByteArray() -- } -- } -- } -+ File f = new File(gentooClassDestination); -+ f.getParentFile().mkdirs(); -+ try { -+ fos = new FileOutputStream(f); -+ fos.write(cw.toByteArray()); -+ fos.close(); -+ } catch (Exception e) { -+ e.printStackTrace(); -+ } -+ } - } |