CustomPomParser compatibility with 0.13.1. #1191 #1192

This commit is contained in:
Eugene Yokota 2014-03-21 23:53:06 -04:00
parent def8fdc439
commit f58fbb8d7d
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 =