Skip to content

Instantly share code, notes, and snippets.

@aashutoshrathi
Created June 26, 2021 09:33
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aashutoshrathi/2efbf4254aa981850c909a3ef0d7b591 to your computer and use it in GitHub Desktop.
Save aashutoshrathi/2efbf4254aa981850c909a3ef0d7b591 to your computer and use it in GitHub Desktop.
Force Same Version Code/ Build Number to all variant APKs using Flutter
android {
...
}
// Add the below code in android/app/build.gradle after above android block
// Provide same version code to all!
import com.android.build.OutputFile
android.applicationVariants.all { variant ->
variant.outputs.each { output ->
output.versionCodeOverride = flutterVersionCode.toInteger()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment