• Home
  • History
  • Annotate
  • only in /frameworks/support/jetifier/jetifier/core/src/main/kotlin/com/android/tools/build/jetifier/core/
History log of /frameworks/support/jetifier/jetifier/core/src/main/kotlin/com/android/tools/build/jetifier/core/
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
ypeRewriter.kt
onfig/Config.kt
5b12e59efaab28afee6ffc712a7c8d6ecbae8144 23-May-2018 Filip Pavlis <pavlis@google.com> Improvements in Jetifier.

Cleaned up standalone tool API
- We no longer have option for providing multiple files or specifing
output directory. So the tool now supports only file to file conversion.
I found the origal approach to be a bit ambiguous and also we never
actually used it it was just part of the initialdesign.
- DependencyVersionsMap is now part of the config file instead of being
in the code. This allows more flexibility when providing custom config file
and enables last minute fixes.

Bug: 64833662
Test: Updated
Change-Id: I475e74a2f6c5e61c3b3dec5d1bcc9c41ff2fee9b
onfig/Config.kt
om/DependencyVersions.kt
om/DependencyVersionsMap.kt
om/PomDependency.kt
tils/LogLevel.kt
b4e9594ebe0109e9e48606ed35fc5cce156749b3 21-May-2018 Filip Pavlis <pavlis@google.com> Add espresso-remote to jetifier's map.

Also bump up to alpha2 versions.

Bug: b/79680768
Bug: b/64833662

Test: N/A
Change-Id: I2b103f5bfd29672e141bde6a06389d88d4fa0504
om/DependencyVersionsMap.kt
46fd22a7ae48f6952264396ba3932f72c7701de7 09-May-2018 Filip Pavlis <pavlis@google.com> Improvements in jetifier POM depenendecy system.

1) Remove support for set of dependencies
2) Add new method to provide map of all the dependecies (to be used by AGP).
3) Add method to detect old and new artifacts.
4) Added comments into GroupsReplacer as suggested in the previous
review.

Bug: 64833662
Test: Added
Change-Id: Id9fca469ac8c80574e567cf81183e4789b6c6c39
om/DependencyVersionsMap.kt
om/PomDependency.kt
om/PomRewriteRule.kt
c13bc8c00ac92670855af30120b40d6be6b2722c 08-May-2018 Filip Pavlis <pavlis@google.com> Fix dejetified versions of dependencies.

For arch we want to use latest released OLD artifacts instead of 28.
Also remove upper case for a version directory.

Change-Id: I22ec1ab823384eeb09171a73a97bb5813a12ec9f
Fix: 78541902
Test: Locally
om/DependencyVersionsMap.kt
ule/RewriteRulesMap.kt
0bf043bd7d2adf60aa79240276204f700296ffbf 02-May-2018 Filip Pavlis <pavlis@google.com> Update support.test deps mappings.

Bug: 79113238, 64833662
Test: N/A
Change-Id: I40b1b8d2195e3080d48f643ffded4a3022744ebc
om/DependencyVersionsMap.kt
5dda781d1b6a05c742d9fe924b7f53c3e3989753 02-May-2018 Filip Pavlis <pavlis@google.com> Merge "Jetifier ProGuard improvements" into pi-preview1-androidx-dev
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
roguard/ProGuardType.kt
roguard/ProGuardTypesMap.kt
ype/TypesMap.kt
4e29091e542d87269447fdc8b3254ce86af06845 02-May-2018 Filip Pavlis <pavlis@google.com> Relax conditions for jetifier xml rewrite.

Jetifier had very restricted set of XML tags to rewrite. This was
causing failures and the list had to be extened. Because this does not
scale well I have relaxed the selectors and jetifier now tries to
rewrite basically anything in quotes or in tags.

Another tiny change is that Jetifier will move files no matter if it is
rewriting support library or not. This is related to the new strategy
that we will rewrite files that are not originally from SL but are in
the same namespace and satisfy our rules. By this we won't break usages
of internal APIs.

Test: Added
Change-Id: I20041897eaa98899294092bd88a9371d811026d6
Fix: 79111795
Bug: 64833662
ackageMap.kt
ypeRewriter.kt
onfig/Config.kt
448359062b9caf5f96c0028dc12cba5d2647ea6f 30-Apr-2018 Filip Pavlis <pavlis@google.com> Improvements in jetifier errors handling.

+ Make regular jetification to not crash when types are missing in defined
prefixes and print warnings instead
+ Make dejetification crash on build server if types are missing
+ Remove debug logging channel (use verbose)
+ Add warning logging channel
+ Remove ktx mappings
+ Comment out android.support.test rules for dependencies until it gets refactored

Bug: 64833662, 78863938
Test: Locally (jetified wearable package)
Change-Id: I5d11a9dbbb417645b0679557f08022d5450998ad
ypeRewriter.kt
tils/Log.kt
tils/LogConsumer.kt
tils/LogLevel.kt
tils/StdOutLogConsumer.kt
39ac87e5407faa238681f3ddb65efc2e4c5144fe 25-Apr-2018 Filip Pavlis <pavlis@google.com> Better versioning support in Jetifier.

Jetifier can now support versions as parameter which gives more
flexibility when rewriting depenndencies. The Processor will now use
latest available released versions of dependencies (which is alpha1 at
this moment). While standalone is using latest unreleased (1.0.0, 2.0.0)
but standalone can be given a version set via a new argument.

Bug: b/78541880
Bug: b/64833662
Test: Added
Change-Id: I03509e23fe3cb98f6e384b961ff9a009dd09199d
(cherry picked from commit 8fd78bd9fc36fa71b90ecd423de90c8f129f3709)
om/DependencyVersionsMap.kt
om/PomDependency.kt
d101a9abcc701ca9a05b4870ab4703bd7ea6b0e9 19-Apr-2018 Filip Pavlis <pavlis@google.com> Design rules fixes.

+ Added fallback rule when dejetifying new media classes.
+ androidx.car to ignore for dejetification
+ Replaced set with list for rules - because order matters.
+ Set 2.0.0 versions for arch components.

Bug: b/64833662
Test: N/A

Change-Id: If87ae7037bd08e77c4e5991a94b98f811e884c82
onfig/Config.kt
ule/RewriteRulesMap.kt
be27f81ab9b2d07ec348ba3f14b86d1aaa6604f9 18-Apr-2018 Filip Pavlis <pavlis@google.com> Fix design and contraint mappings.

Also types map is finally stored alphabetically.

Bug: b/64833662
Test: N/A

Change-Id: Ide2f81e44d023fe9cb5e27623088e58b5a3e423e
ackageMap.kt
ype/TypesMap.kt
5ffd6a9efd01d33d1564075adff2ecab30033a2b 29-Mar-2018 Filip Pavlis <pavlis@google.com> Set Jetifier to error log level by default.

Bug: b/64833662
Test: N/A
Change-Id: Ic44e344ee13b9a16b42f5cac4467447604033eca
tils/Log.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
ackageMap.kt
ypeRewriter.kt
onfig/Config.kt
onfig/ConfigParser.kt
om/PomDependency.kt
om/PomRewriteRule.kt
roguard/ProGuardType.kt
roguard/ProGuardTypesMap.kt
ule/RewriteRule.kt
ule/RewriteRulesMap.kt
ype/JavaType.kt
ype/PackageName.kt
ype/TypesMap.kt
tils/Log.kt
tils/LogConsumer.kt
tils/LogLevel.kt
tils/StdOutLogConsumer.kt