loading...
Cover image for Custom APK output filename from Android Studio (gradle)

Custom APK output filename from Android Studio (gradle)

egitsptr profile image Egit S. Originally published at esabook.wordpress.com on ・1 min read

Capture


Change those standard’s default-output-build-name to as your keyword.

Official document https://developer.android.com/studio/build/configure-apk-splits.

android {
...
applicationVariants.all {
        variant ->
             variant.outputs.each {
                  output ->
                       output.outputFileName = "${defaultConfig.applicationId}-v${defaultConfig.versionName}_${variant.flavorName}_${defaultConfig.versionCode}_${new Date().format('yyyy-MM-dd_HH.mm.ss')}.apk"
             }
...
}

Discussion

pic
Editor guide