Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add library name override for AndroidX compatibility
If you allow an override of the library name as well, the jetifier package works to make this package AndroidX compatible in combination with an android/build.gradle ext{} block in apps that override things to 'androidx.core' for coreLibName and '1.0.2' for supportLibVersion
- Loading branch information
0c76619
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think
coreLibName
could be determined programmatically by comparing thesupportLibVersion
.A non-AndroidX
supportLibVersion
will typically take the form26.x.x
or27.x.x
or28.x.x
, etc, while AndroidX starts at1.x.x
. As a temporary stop-gap, we could add some logic to express the fact "If the major component ofsupportLibVersion
is< 20
(eg:1.0.2
), we're dealing with AndroidX.By the time the version of
androidx.appcompat:appcompat
gets anywhere near20.x.x
(will take years), AndroidX migration will be long behind us. I suspect React Native won't even exist by then :)0c76619
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to work: