Generate app name with version code, name and flavour name – Android

Android
After a build is shared to a team or group of people, sometimes a question arises that what was the version code/name of the build shared, or from which product flavour it was from. Developers can inspect these details using analyse apk option in Android Studio. But, the problem is with other member who do not have Android studio to inspect these details. In order to resolve this issue, it is better to put these details with APK filename. In this way all the details can be verified just by looking at the filename. To achieve this we can put this gradle function in application level build.gradle file. android.applicationVariants.all { variant -> def appName // if applicationName property is set in gradle.properties if (project.hasProperty("applicationName")) { appName = applicationName } else…
Read More