Sat, 13 Aug 2022 08:21:37 GMT
Join the conversation at slack.cordova.io
Fri, 12 Aug 2022 15:29:02 GMT
@pedro.remedios says
hello! Does anybody know how I can enable androidX and disable jetifier in gradle-properties via config.xml?
Fri, 12 Aug 2022 15:33:38 GMT
@norman137 says
there‘s an
AndroidXEnabled
preference available in cordova-android@9 to enable androidx. cordova-android@10 or later has android x forcefully enabled though, making that preference obsolete. On jetifier, cordova doesn’t enable it (it was decided that it shouldn‘t be cordova responsibility to auto read/translate files). So if jetifier is enabled, you have a plugin that’s doing it. cordova-plugin-androidx-adapter is a popular plugin to do that.
Fri, 12 Aug 2022 16:15:13 GMT
@pedro.remedios says
I created a brand new cordova app, added the android platform (10.1.2) and it has both androidx and jetifier enabled
Fri, 12 Aug 2022 16:15:30 GMT
@pedro.remedios says
Using cordova 11 btw
Fri, 12 Aug 2022 16:24:08 GMT
@norman137 says
I guess I should clarify... jetifier might be enabled, and I don‘t think there is any exposed option to disable it, but that would only apply to compiled code like AAR files. Most plugins doesn’t include prebuilt code, and instead include the source code, which jetifier doesn't touch (which is what cordova-plugin-androidx-adapter is for).
You could try writing a pre build hook though to edit the
<cordova-project>/platforms/android/gradle.properties
file to setandroid.enableJetifier=false
Fri, 12 Aug 2022 16:32:17 GMT
@pedro.remedios says
Yeah that is probably my only alternative