瀏覽代碼

[New]修改安卓打包脚本

zhipeng 1 年之前
父節點
當前提交
0ce16c8f59
共有 1 個文件被更改,包括 11 次插入0 次删除
  1. 11 0
      android/app/build.gradle

+ 11 - 0
android/app/build.gradle

@@ -95,6 +95,17 @@ android {
         dataBinding true
     }
 
+    applicationVariants.configureEach { variant ->
+        def date = new Date().format("YYMMddHHmmss")
+        variant.outputs.configureEach {
+            def fileName = "${defaultConfig.applicationId}" +
+                    "-v${defaultConfig.versionName}" +
+                    "-${variant.buildType.name}" +
+                    "-${date}" +
+                    ".apk"
+            outputFileName = fileName
+        }
+    }
 }
 
 dependencies {