I have an android app with instant feature. I want to set versionCode 1 for instant app and versionCode 1000 for installable app. I have 3 build.gradle for base, installed and instant feature.
base app
defaultConfig {
applicationId "com.mypackage"
minSdkVersion 16
targetSdkVersion 29
versionCode = 1
versionName = '1.0.0'
}
installed app
defaultConfig {
applicationId "com.mypackage"
minSdkVersion 16
targetSdkVersion 29
versionCode = 1000
versionName = '1.0.0'
}
instant app
defaultConfig {
applicationId "com.mypackage"
minSdkVersion 16
targetSdkVersion 29
versionCode = 1
versionName = '1.0.0'
}
When building android app bundle, I am getting versionCode 1 for both instant & installable version. versionCode is always picked from base variant build.gradle.
How can I set versionCode 1000 for installable version?
I am trying to achieve this as per android documents.
Restart the version codes for the Google Play Instant experience at 1.
Increase the version code of the installable APK by a large number, such as 1000, to ensure that there is enough space for your instant experience's version number to increase.