aboutsummaryrefslogtreecommitdiff
path: root/src/test/kotlin/com/replaymod/gradle/remap/util
AgeCommit message (Collapse)Author
2023-05-26Allow JDK_HOME to be set explicitly, required for Kotlin 1.8+Jonas Herzig
2022-05-27Add support for adding missing and removing unused importsJonas Herzig
This adds a post-process step which automatically adds unambiguous imports, removes unused imports and sorts the import list (formatting matches standard IntelliJ settings). This will preserve line count across versions at all cost. Java only for now because it's a lot more tricky with Kotlin and we don't yet use Kotlin ourselves (and won't be preprocessing it in the future either).
2021-11-13Fix mapping of synthetic properties when overridden in Kotlin classJonas Herzig
In these cases, the getMethod of the property will not have a Psi element and we need to traverse up the overrides until we find one that does.
2021-11-12Fix synthetic property becoming shadowed by field of same nameJonas Herzig
2021-11-12Fix loss of changes when multiple target the same start pointJonas Herzig
While one might at first think that multiple changes should conflict if they target that same start point, that is not necessarily true as long as no more than one of them includes deletions: There may be an arbitrary number of insertions at the same position (regular remapping never just inserts but patterns can).
2021-11-11Fix remapping of qualified inner class reference in Kotlin codeJonas Herzig
When we used to remap `a.pkg.A.Inner` we would apply both mappings (the one for the inner class and the one for the outer class) at the same time, resulting in `b.pkg.B.Inner.Inner`. The direct cause being that we only checked conflicts for the range of the respective expression (which is just `A` and `Inner` for Kotlin, and therefore not conflicting) instead of the parent as we should have. With that fixed, it now also becomes apparent that we need to apply mappings for dot qualified expressions back to front (otherwise the outer class takes priority), so that is the second thing this commit change.
2021-11-10Start adding testsJonas Herzig