From 2baf338a1eeffa5104ad9d9ec8f1abb0b4c16cf9 Mon Sep 17 00:00:00 2001 From: Simon Ogorodnik Date: Sun, 8 Oct 2017 23:50:29 +0300 Subject: Update ShadowJar Gradle plugin to 2.0.1 --- .../src/main/groovy/org/jetbrains/PluginXmlTransformer.groovy | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'buildSrc/src/main/groovy') diff --git a/buildSrc/src/main/groovy/org/jetbrains/PluginXmlTransformer.groovy b/buildSrc/src/main/groovy/org/jetbrains/PluginXmlTransformer.groovy index db84fdc0..7482a01a 100644 --- a/buildSrc/src/main/groovy/org/jetbrains/PluginXmlTransformer.groovy +++ b/buildSrc/src/main/groovy/org/jetbrains/PluginXmlTransformer.groovy @@ -2,10 +2,11 @@ package org.jetbrains import com.github.jengelman.gradle.plugins.shadow.relocation.Relocator import com.github.jengelman.gradle.plugins.shadow.transformers.Transformer +import com.github.jengelman.gradle.plugins.shadow.transformers.TransformerContext import groovy.xml.XmlUtil -import org.apache.tools.zip.ZipEntry -import org.apache.tools.zip.ZipOutputStream import org.gradle.api.file.FileTreeElement +import shadow.org.apache.tools.zip.ZipEntry +import shadow.org.apache.tools.zip.ZipOutputStream public class PluginXmlTransformer implements Transformer { private Map transformedPluginXmlFiles = new HashMap<>(); @@ -16,10 +17,12 @@ public class PluginXmlTransformer implements Transformer { } @Override - void transform(String path, InputStream inputStream, List relocators) { + void transform(TransformerContext context) { + def path = context.path + def inputStream = context.is System.out.println(path) Node node = new XmlParser().parse(inputStream) - relocateXml(node, relocators) + relocateXml(node, context.relocators) transformedPluginXmlFiles.put(path, node) } -- cgit