History log of /frameworks/support/jetifier/jetifier/processor/src/test/kotlin/com/android/tools/build/jetifier/processor/transform/proguard/ProGuardTypesMapperTest.kt
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
dee52f68e1f6a3edc0cb77caa0902bc10cb50c33 24-May-2018 Filip Pavlis <pavlis@google.com> Improve Jetifier's prefix configuration.

1) The reversed prefixes are no longer hardcoded in the Processor.kt but
are part of the config file.
2) Originally the prexifes were used as the first line of defense when
filtering what should be rewritten. This stopped to be intuitive since we
introduced quite a lot of types of rules. And it is not immideately
obvious when someone adds a new rule which is not covered by any prefix it
gets ignored. Because of that from now we will use the prefixes as a
check if we should report error with missing mapping or not or in cases
where checking the rules is expensive. So in case of package map we
directly check if package is there and if yes there is no need to look
at prefixes. If the package is not there but prefix is satisfied we
treat it as an error.
3) Fix bug with not dejetifying material package properly. First of all
the changes from 2) will make sure this won't happen again. But also add
suffix of "/" to make sure the prefix regex is matched.

Bug: 80208210
Test: Added, updated and manually checked that material
AndroidManifest.xml gets dejetified properly.

Change-Id: I0e899cf1f80e8393f1593c372f66609527d80610
/frameworks/support/jetifier/jetifier/processor/src/test/kotlin/com/android/tools/build/jetifier/processor/transform/proguard/ProGuardTypesMapperTest.kt
982679c45ee20f39c5da072ff6a80519ee262ef4 01-May-2018 Filip Pavlis <pavlis@google.com> Jetifier ProGuard improvements

1) Adds support for cases when a single ProGuard rule needs to be
replaced by multiple rules because mappings are not always 1:1.

One of the examples is:
android/support/v4/media/** -> androidx/media/**, android/support/v4/**

2) Adds more automation into ProGuard mapper to be able to automatically
solve some of the simple rules that contain wildcards. The automated
solution sucessfully maps around 80% of the wildcard rules.

3) Adds more rules for cases where toolings is just not smart enough.

This was tested on 600 ProGuard rules aggregated from wild. Single unit
tests also added.

Bug: 64833662
Test: Added
Change-Id: Ib7d06684e8e83d175e6c8b4471c02f6680913b81
/frameworks/support/jetifier/jetifier/processor/src/test/kotlin/com/android/tools/build/jetifier/processor/transform/proguard/ProGuardTypesMapperTest.kt
ba381a314edcd57963ed1ac5910595e04faf29cc 28-Mar-2018 Filip Pavlis <pavlis@google.com> Refactor Jetifier packages to com.android.tools

Bug: b/64833662
Test: it builds!

Change-Id: I27bc0d2b0de17ba0d22e7588dc0742a041f17f31
/frameworks/support/jetifier/jetifier/processor/src/test/kotlin/com/android/tools/build/jetifier/processor/transform/proguard/ProGuardTypesMapperTest.kt