From c0fbcd9aa489efbbc55b7e68666afd2fa2ffc567 Mon Sep 17 00:00:00 2001 From: John Engelman Date: Tue, 11 Nov 2014 09:38:15 -0600 Subject: [PATCH] Update `jdom` dependency. Closes #98. --- ChangeLog.md | 1 + build.gradle | 2 +- .../transformers/XmlAppendingTransformer.groovy | 12 ++++++++---- .../gradle/plugins/shadow/TransformerSpec.groovy | 4 +--- 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/ChangeLog.md b/ChangeLog.md index 69d53e168..5056a9f81 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -2,6 +2,7 @@ v1.2.0 ====== + Re-organize some code to remove need for forcing the Gradle API ClassLoader to allow the `org.apache.tools.zip` package. ++ Upgrade JDOM library from 1.1 to 2.0.5 (change dependency from `jdom:jdom:1.1` to `org.jdom:jdom2:2.0.5`) ([Issue #98](https://github.com/johnrengelman/shadow/issues/98)) v1.1.2 ====== diff --git a/build.gradle b/build.gradle index d8ccf3493..c595d9568 100644 --- a/build.gradle +++ b/build.gradle @@ -32,7 +32,7 @@ dependencies { compile localGroovy() compile gradleApi() - compile 'jdom:jdom:1.1' + compile 'org.jdom:jdom2:2.0.5' compile 'org.ow2.asm:asm:4.1' compile 'org.ow2.asm:asm-commons:4.1' compile 'commons-io:commons-io:2.4' diff --git a/src/main/groovy/com/github/jengelman/gradle/plugins/shadow/transformers/XmlAppendingTransformer.groovy b/src/main/groovy/com/github/jengelman/gradle/plugins/shadow/transformers/XmlAppendingTransformer.groovy index 577125c6a..074e74706 100644 --- a/src/main/groovy/com/github/jengelman/gradle/plugins/shadow/transformers/XmlAppendingTransformer.groovy +++ b/src/main/groovy/com/github/jengelman/gradle/plugins/shadow/transformers/XmlAppendingTransformer.groovy @@ -23,10 +23,14 @@ import com.github.jengelman.gradle.plugins.shadow.relocation.Relocator import org.apache.tools.zip.ZipEntry import org.apache.tools.zip.ZipOutputStream import org.gradle.api.file.FileTreeElement -import org.jdom.* -import org.jdom.input.SAXBuilder -import org.jdom.output.Format -import org.jdom.output.XMLOutputter +import org.jdom2.Attribute +import org.jdom2.Content +import org.jdom2.Document +import org.jdom2.Element +import org.jdom2.JDOMException +import org.jdom2.input.SAXBuilder +import org.jdom2.output.Format +import org.jdom2.output.XMLOutputter import org.xml.sax.EntityResolver import org.xml.sax.InputSource import org.xml.sax.SAXException diff --git a/src/test/groovy/com/github/jengelman/gradle/plugins/shadow/TransformerSpec.groovy b/src/test/groovy/com/github/jengelman/gradle/plugins/shadow/TransformerSpec.groovy index ac05a4a01..c32ea6e00 100644 --- a/src/test/groovy/com/github/jengelman/gradle/plugins/shadow/TransformerSpec.groovy +++ b/src/test/groovy/com/github/jengelman/gradle/plugins/shadow/TransformerSpec.groovy @@ -430,13 +430,11 @@ class TransformerSpec extends PluginSpecification { String text = getJarFileContents(output, 'properties.xml') assert text.replaceAll('\r\n', '\n') == '''| | - | | | val1 | val2 | - | - |'''.stripMargin() + |'''.stripMargin() } @Issue('SHADOW-82')