Android build won't respect android-versionCode=X


ionic build android, does not respect the version set on config.xml
<widget android-versionCode="8"

It uses the version set at:
Android Studio > Project Structure > Flavors > Version Code

everytime I need to publish a new apk I have to first open Android Studio, change version code, save and then go back to ionic build…

any thoughts on how to fix this?