Hi there, we are using a native library which required the min compileSdkVersion to be 31, but the Expo SDK 43 default is 30. I understand this can be overwrite with config plugin, but where can we find an example or guide on how to do it, great thanks
wodin
November 26, 2021, 7:24pm
2
Hi
Here’s a config plugin that modifies minSdkVersion
. See if it helps:
EDIT: I’ve found an easier way to set *SdkVersion without writing your own plugin
Hey @expo_karaushu
I just managed to get this to work! (Android only for now).
This is my first time trying to write my own config plugins, so I’m sure some things could be done better. Also, I don’t like all the manual config.replace(/regex/, string) and the brute force way I’m replacing the packagingOptions, but at least it seems to work!
I only tried building for Android so far and have not actually tested …
1 Like
svarto
November 26, 2021, 7:35pm
3
In case you are running into this due to onesignal, they updated their gradle version and it now works correclty.
1 Like
wodin
April 20, 2022, 11:25am
5
I’ve found an easier way to change the minSdkVersion
(and similar options) without having to write your own plugin:
Hi @srbrahma
I’ve found out about an even easier way. Not sure how long this has existed:
There’s something called AndroidConfig.Version.withBuildScriptExtMinimumVersion in @expo/config-plugins. I think the easiest way to use it is from app.config.js.
I have a normal app.json and then in addition to that I have an app.config.js which overrides some things in app.json for dev/preview builds and also so that i don’t have to store an access key in Git. The plugins section is the relevant part to…