From 4449e3420c355a712323f3e507d0b14c395f43d9 Mon Sep 17 00:00:00 2001
From: mac <user@users-MacBook-Pro.local>
Date: 星期一, 28 十月 2024 15:13:32 +0800
Subject: [PATCH] 2024年10月28日15:13:28

---
 app/build.gradle |   37 +++++++++++++++++++++++++++++--------
 1 files changed, 29 insertions(+), 8 deletions(-)

diff --git a/app/build.gradle b/app/build.gradle
index 56f9234..52ba27f 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -24,13 +24,13 @@
             keyPassword '85521566'
         }
     }
-    compileSdk 30
+    compileSdkVersion 34
     defaultConfig {
         applicationId "com.hdl.photovoltaic"
-        minSdk 23
-        targetSdk 30
+        minSdkVersion 23
+        targetSdkVersion 34
         versionCode 1
-        versionName "1.3.3"//鐗堟湰瑙勫垯1.3鏄骇鍝佸姛鑳借凯浠g敤鐨�,鏈�鍚庝竴浣�0鏄垜浠慨澶峛ug鐢ㄧ殑
+        versionName "1.4.3"//鐗堟湰瑙勫垯1.3鏄骇鍝佸姛鑳借凯浠g敤鐨�,鏈�鍚庝竴浣�0鏄垜浠慨澶峛ug鐢ㄧ殑
         testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
         multiDexEnabled true
         manifestPlaceholders = mfph
@@ -77,12 +77,20 @@
         //noCompress 'foo', 'bar'
         ignoreAssetsPattern "!.svn:!.git:.*:!CVS:!thumbs.db:!picasa.ini:!*.scc:*~"
     }
+//    lintOptions {
+//        checkReleaseBuilds false
+//        // Or, if you prefer, you can continue to check for errors in release builds,
+//        // but continue the build even when errors are found:
+//        abortOnError false
+//    }
+
+
     /**
      * 鎵撳寘鑷姩鍛藉悕
      */
     android.applicationVariants.configureEach { variant ->
         variant.outputs.configureEach {
-            outputFileName = "photovoltaic_${name}_v${versionName}_${generateTime()}.apk"
+            outputFileName = "photovoltaic_v${versionName}_${generateTime()}_${getEnvironmentVersion(2)}.apk"
         }
     }
 
@@ -111,6 +119,20 @@
     return new Date().format("yyyyMMddHHmm")
 }
 
+//鐜鐗堟湰鍙凤細姝ょ増鏈彿鐢ㄤ簬鏍囨敞褰撳墠鐗堟湰鐨勮蒋浠跺浜庡摢涓紑鍙戦樁娈碉紝褰撹蒋浠惰繘鍏ュ埌鍙︿竴涓樁娈垫椂闇�瑕佷慨鏀规鐗堟湰鍙枫��
+static String getEnvironmentVersion(int environmentVersionValue) {
+    if (environmentVersionValue == 1) {
+        return "dev"//寮�鍙戦樁娈电増鏈��(涓�鑸笉鍚戝閮ㄥ彂甯冿紝bug浼氭瘮杈冨锛屽姛鑳戒篃涓嶅叏锛屼竴鑸彧鏈夊紑鍙戜汉鍛樹娇鐢ㄣ��)
+    } else if (environmentVersionValue == 2) {
+        return "test"//娴嬭瘯闃舵鐗堟湰銆�(杩欎釜闃舵鐗堟湰浼氶厤鍚堟祴璇曚汉鍛樹慨澶峛ug锛岀洿鍒版弧瓒冲彂甯冩潯浠躲��)
+    } else if (environmentVersionValue == 3) {
+        return "beta"//鍏祴闃舵鐗堟湰銆�(鍏紑娴嬭瘯鐗堟湰锛屼竴鑸槸鍐呮祴閫氳繃鐨勶紝涓昏浼氭湁"绮変笣鐢ㄦ埛"浣跨敤浣撻獙銆�)
+    } else if (environmentVersionValue == 4) {
+        return "release"
+//鍙戝竷闃舵鐗堟湰銆�(璇ョ増鏈剰鍛�"鏈�缁堢増鏈�"锛屽湪鍓嶉潰鐗堟湰鐨勪竴绯诲垪娴嬭瘯鐗堜箣鍚庯紝缁堝綊浼氭湁涓�涓寮忕増鏈紝鏄渶缁堜氦浠樼敤鎴蜂娇鐢ㄧ殑涓�涓増鏈�傝鐗堟湰鏈夋椂涔熺О涓烘爣鍑嗙増銆備竴鑸儏鍐典笅锛孯elease涓嶄細浠ュ崟璇嶅舰寮忓嚭鐜板湪杞欢灏侀潰涓娿��)
+    }
+}
+
 dependencies {
 
     implementation fileTree(include: ['*.jar', '*.aar'], dir: 'libs')
@@ -130,8 +152,8 @@
     //浜岀淮鐮佸簱
     implementation project(path: ':third-zxing')
     //Link鏈湴搴擄紙鍦ㄧ嚎渚濊禆缃戠粶搴擄級
-    implementation 'com.hdl.android:pmsdk:1.0.2'
-    implementation 'com.hdl.android:debugsdk:1.0.22'
+    implementation 'com.hdl.android:pmsdk:1.0.9'
+    implementation 'com.hdl.android:debugsdk:1.0.52'
 
     testImplementation 'junit:junit:4.13.2'
     androidTestImplementation 'androidx.test.ext:junit:1.1.3'
@@ -180,7 +202,6 @@
     implementation 'cn.jiguang.sdk:jpush-google:5.2.2'
     //鍒嗘瀽鍜岀敤鎴锋爣绛剧瓑鍔熻兘(鍙�夛紝闆嗘垚鏋佸厜鍒嗘瀽SDK鍚庯紝鍗冲彲鏀寔琛屼负瑙﹀彂鎺ㄩ�佹秷鎭�佹帹閫佽浆鍖栫巼缁熻锛岀敤鎴疯涓哄垎)
     implementation 'cn.jiguang.sdk:joperate:2.0.2'
-
 
 
     //鑻ヤ笉闆嗘垚鍘傚晢閫氶亾锛屽彲鐩存帴璺宠繃浠ヤ笅渚濊禆

--
Gitblit v1.8.0