From a8751388c9a86ae95714a15279994d8aa426a26d Mon Sep 17 00:00:00 2001
From: zuoxiao <470321431@qq.com>
Date: 星期五, 13 六月 2025 14:59:02 +0800
Subject: [PATCH] feat(generallibrary): 优化充值功能并添加水价获取- 在 activity_recharge_detail.xml 中移除了不必要的 bold 样式- 在 EditText 中添加了金额输入限制(数字和小数点)- 在 BaseApplication 中添加了水价信息存储 - 在 MainActivity 中实现了延时获取水价的功能- 优化了 RechargeDetailActivity 中的水价检查和使用逻辑 - 在 README.md 中添加了金额格式化和水价获取的最佳实践指南

---
 generallibrary/build.gradle |   26 +++++++++++++++++++-------
 1 files changed, 19 insertions(+), 7 deletions(-)

diff --git a/generallibrary/build.gradle b/generallibrary/build.gradle
index 80bf8d8..b6e1600 100644
--- a/generallibrary/build.gradle
+++ b/generallibrary/build.gradle
@@ -1,17 +1,25 @@
 plugins {
     id 'com.android.library'
     id 'org.jetbrains.kotlin.android'
+    id 'kotlin-kapt'
 }
 
 android {
     namespace 'com.dayu.general'
     compileSdk 34
-
+    ndkVersion '21.0.6113669'
     defaultConfig {
         minSdk 23
 
         testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
         consumerProguardFiles "consumer-rules.pro"
+        
+        // 娣诲姞Room鏁版嵁搴撶殑瀵煎嚭schema閫夐」
+        javaCompileOptions {
+            annotationProcessorOptions {
+                arguments += ["room.schemaLocation": "$projectDir/schemas".toString()]
+            }
+        }
     }
 
     buildTypes {
@@ -46,16 +54,19 @@
     implementation 'androidx.core:core-ktx:1.12.0'
     implementation 'androidx.appcompat:appcompat:1.6.1'
     implementation 'com.google.android.material:material:1.11.0'
+    implementation "androidx.activity:activity-ktx:1.8.2"
+    implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.7.0"
+    implementation "androidx.fragment:fragment-ktx:1.6.2"
     testImplementation 'junit:junit:4.13.2'
     androidTestImplementation 'androidx.test.ext:junit:1.2.1'
     androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1'
 
+    compileOnly project(':pickerviewlibrary')
 
-    //鏁版嵁搴�
-    implementation "androidx.room:room-runtime:2.3.0"
-    implementation "androidx.room:room-ktx:2.3.0"
-    runtimeOnly("androidx.room:room-common:2.3.0")
-    annotationProcessor "androidx.room:room-compiler:2.3.0"
+    //鏁版嵁搴� - 鏇存柊鐗堟湰浠ユ洿濂芥敮鎸佸崗绋�
+    implementation "androidx.room:room-runtime:2.6.1"
+    implementation "androidx.room:room-ktx:2.6.1"
+    kapt "androidx.room:room-compiler:2.6.1"
 
     //鏉冮檺鐢宠
     compileOnly 'com.github.getActivity:XXPermissions:18.5'
@@ -66,6 +77,7 @@
         exclude group: 'com.google.code.gson';
     }
     implementation 'com.squareup.retrofit2:adapter-rxjava3:2.9.0'
+    implementation 'io.reactivex.rxjava3:rxjava:3.1.5'
     implementation 'io.reactivex.rxjava3:rxandroid:3.0.0'
     implementation 'com.squareup.okhttp3:logging-interceptor:4.11.0'
     compileOnly 'com.google.code.gson:gson:2.10.1'
@@ -80,7 +92,7 @@
     //寤鸿娣诲姞 ViewPager2 鐨勬槑纭緷璧�
     implementation "androidx.viewpager2:viewpager2:1.1.0-beta01"
     implementation "androidx.fragment:fragment:1.6.2"
-    implementation files('../baselibrary/libs/avi.library-2.1.3.aar')
+
 
     implementation 'com.tencent.bugly:crashreport:4.1.9.3'
 }
\ No newline at end of file

--
Gitblit v1.8.0