From 51d0df004fc9e6634d534061f1bf0405689d3829 Mon Sep 17 00:00:00 2001 From: Eugene Yokota Date: Fri, 21 Mar 2014 23:53:06 -0400 Subject: [PATCH] CustomPomParser compatibility with 0.13.1. #1191 #1192 --- ivy/src/main/scala/sbt/CustomPomParser.scala | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ivy/src/main/scala/sbt/CustomPomParser.scala b/ivy/src/main/scala/sbt/CustomPomParser.scala index dc56866bb..871c1f07c 100644 --- a/ivy/src/main/scala/sbt/CustomPomParser.scala +++ b/ivy/src/main/scala/sbt/CustomPomParser.scala @@ -57,8 +57,14 @@ object CustomPomParser private[this] def transformedByThisVersion(md: ModuleDescriptor): Boolean = { + val oldTransformedHashKey = "sbtTransformHash" val extraInfo = md.getExtraInfo - extraInfo != null && extraInfo.get(TransformedHashKey) == TransformHash + // sbt 0.13.1 used "sbtTransformHash" instead of "e:sbtTransformHash" until #1192 so read both + Option(extraInfo).isDefined && + ((Option(extraInfo get TransformedHashKey) orElse Option(extraInfo get oldTransformedHashKey)) match { + case Some(TransformHash) => true + case _ => false + }) } private[this] def defaultTransformImpl(parser: ModuleDescriptorParser, md: ModuleDescriptor): ModuleDescriptor =