From 8301252a89227cef0cd1dc0a7306968c4007680a Mon Sep 17 00:00:00 2001 From: Matthew Date: Sun, 7 Jul 2024 21:37:16 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=9F=E4=B8=80=E8=BE=93=E5=87=BA=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E5=90=8D=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/build.gradle | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/app/build.gradle b/app/build.gradle index 99a6b08..3900e59 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -57,6 +57,19 @@ android { universalApk true } } + + android.applicationVariants.all { variant -> + variant.outputs.all { output -> + if (outputFileName.endsWith('.apk')) { + def buildTypeFlag = "dbg" + if(variant.buildType.name.equals('release')) { + buildTypeFlag = "rel" + } + def fileName = "mpfrp_v${defaultConfig.versionName}_${buildTypeFlag}_${new Date(System.currentTimeMillis()).format("yyyyMMdd")}.apk" + outputFileName = fileName + } + } + } } dependencies {