|
|
@ -139,23 +139,7 @@ class TypedRemapper private constructor( |
|
|
|
val prefixes = mutableMapOf<String, Int>() |
|
|
|
val prefixes = mutableMapOf<String, Int>() |
|
|
|
|
|
|
|
|
|
|
|
for (partition in disjointSet) { |
|
|
|
for (partition in disjointSet) { |
|
|
|
var skip = false |
|
|
|
if (!isFieldRenamable(classPath, partition)) { |
|
|
|
|
|
|
|
|
|
|
|
for ((owner, name) in partition) { |
|
|
|
|
|
|
|
val clazz = classPath[owner]!! |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (name in EXCLUDED_FIELDS) { |
|
|
|
|
|
|
|
skip = true |
|
|
|
|
|
|
|
break |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (clazz.dependency) { |
|
|
|
|
|
|
|
skip = true |
|
|
|
|
|
|
|
break |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (skip) { |
|
|
|
|
|
|
|
continue |
|
|
|
continue |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -190,6 +174,18 @@ class TypedRemapper private constructor( |
|
|
|
return mapping |
|
|
|
return mapping |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private fun isFieldRenamable(classPath: ClassPath, partition: DisjointSet.Partition<MemberRef>): Boolean { |
|
|
|
|
|
|
|
for (field in partition) { |
|
|
|
|
|
|
|
val clazz = classPath[field.owner]!! |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (field.name in EXCLUDED_FIELDS || clazz.dependency) { |
|
|
|
|
|
|
|
return false |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return true |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private fun isClassRenamable(clazz: ClassMetadata): Boolean { |
|
|
|
private fun isClassRenamable(clazz: ClassMetadata): Boolean { |
|
|
|
if (clazz.name in EXCLUDED_CLASSES || clazz.dependency) { |
|
|
|
if (clazz.name in EXCLUDED_CLASSES || clazz.dependency) { |
|
|
|
return false |
|
|
|
return false |
|
|
|