Merge pull request #1205 from eed3si9n/topic/pomparser

CustomPomParser compatibility with 0.13.1. #1191 #1192
This commit is contained in:
Josh Suereth 2014-03-24 13:06:04 -04:00
commit 7a65ceca31
1 changed files with 7 additions and 1 deletions

View File

@ -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 =