Anyone have experience regarding migration from Su...
# android
m
k
Did you use the tool in Android Studio to convert?
m
no, I’m using manual migration scripts inspired by Dan lew, Android Studio X migration tools takes a long time for me
c
The tool took a really long time for me. But I ran it and then followed up with the script from Dan lew... then it was a bunch of manually changes... and then it worked.
m
does the Migrate to AndroidX tools from Android Studio has same behaviour like the scripts? I’m not feeling okay with waiting too long on the first try, almost 4 hours and ticking, so I force close it T_T
l
Android Studio AndroidX migration tool is just SHIT. Just makes you lose time because it's not either SLOW or UNRELIABLE, it's BOTH! In my case, I manually updated the dependencies, added the properties for AndroidX and jetifier, then ran a homemade Kotlin script across all the modules.
m
did you publish publicly your kotlin script to the github repo? @louiscad
l
@miqbaldc Actually, there's even a Gradle plugin thanks to @jmfayard https://github.com/LouisCAD/Splitties/tree/49e2ee566730aaeb14b4fa9e395a677c3f214dba/plugin It's fast but doesn't support migrating dependencies at the moment, and lacks integration with #gradle-refresh-versions for it (that allows updating dependencies easily and quickly even in multi-modules project). It might not resolve the issue you're encountering, but speaking of Chuck, I'm using the library in a project using AndroidX with no problem.
👍 2
m
After using
Chucker
(the maintained version of
chuck
) yes, I don’t have any problems anymore for chuck. But, the issue still persist for a few library (e.g:
CleverTap
). I’ve been wondering, gradle caching might messed-up the jetified process. So, instead using the
jetified-*
aar version, AS keeps fetching/using the real one that still using Support Library. Stated in my SO Questions, the image I’ve provided, shown that
CleverTap
did works jetified. (see attached image) Unfortunately, when trying solving a common error situations: (invalidate cache, restart, clean, build, remove .idea & .gradle) seems not succeed for me. The AS (in Project structure view -> External Libraries) using original
CleverTap
still used instead of the jetified version.
l
@miqbaldc Which AS and which AGP version are you using?
m
AS & AGP both version using 3.6.2 @louiscad
l
@miqbaldc Can you confirm you have
android.enableJetifier=true
in the
gradle.properties
file in the root of the project, with no typo?
m
yes, here’s the proof. because the jetified works for “a few” library in my case, but failed for
CleverTap
(also others listed in my SO questions)
l
Would you try with AGP 4.0.0-beta04 from command line? They might have updated jetifier and added some fixes. If it's still not working, you can try with 4.1.0-alpha05, and if still not, then you need to report it with enough details, or better yet, a reproducing project on b.android.com (that I'll star if you link it here).
m
the latest beta version feb 2019: https://developer.android.com/jetpack/androidx/releases/jetifier i don’t think there’s any bugfix for the jetifier currently. cmiiw
I’ll try to create a reproduceable project this weekend, and submit a bug reports, only after trying both AGP 4.0.0 & 4.1.0 if not works either. Thank you very much @louiscad
It is weird bugs indeed: https://github.com/facebook/facebook-android-sdk/issues/591#issuecomment-619435280 I’m unable to create a repro project (because it succeed) and IDK why the
jetifier
“whitelisting” works for now @louiscad