소스 검색

[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 {