diff --git a/android/.kotlin/sessions/kotlin-compiler-595746383742391224.salive b/android/.kotlin/sessions/kotlin-compiler-595746383742391224.salive deleted file mode 100644 index e69de29..0000000 diff --git a/android/app/proguard-rules.pro b/android/app/proguard-rules.pro new file mode 100644 index 0000000..e096394 --- /dev/null +++ b/android/app/proguard-rules.pro @@ -0,0 +1,79 @@ +# ============ Flutter 核心 ============ +-keep class io.flutter.** { *; } +-keep class io.flutter.plugins.** { *; } +-keep class io.flutter.plugin.** { *; } +-keep class io.flutter.util.** { *; } +-keep class io.flutter.view.** { *; } +-keep class io.flutter.embedding.** { *; } + +# 保留 Flutter 的 JNI 调用类 +-keep class io.flutter.embedding.engine.FlutterJNI { *; } +-dontwarn io.flutter.embedding.** + +# ============ Kotlin ============ +-keep class kotlin.** { *; } +-keep class kotlin.Metadata { *; } +-dontwarn kotlin.** +-keepclassmembers class **$WhenMappings { + ; +} +-keepclassmembers class kotlin.Metadata { + public ; +} + +# ============ sqflite / SQLite ============ +-keep class com.tekartik.sqflite.** { *; } +-dontwarn com.tekartik.sqflite.** + +# ============ shared_preferences ============ +-keep class io.flutter.plugins.sharedpreferences.** { *; } + +# ============ path_provider ============ +-keep class io.flutter.plugins.pathprovider.** { *; } + +# ============ permission_handler ============ +-keep class com.baseflow.permissionhandler.** { *; } + +# ============ url_launcher ============ +-keep class io.flutter.plugins.urllauncher.** { *; } + +# ============ device_info_plus ============ +-keep class dev.fluttercommunity.plus.device_info.** { *; } + +# ============ 你的原生通道(重要!) ============ +# 你的 MethodChannel / EventChannel 相关类需要保留 +-keep class com.lxh.battery_health.** { *; } + +# ============ AndroidX 常见 ============ +-keep class androidx.lifecycle.** { *; } +-dontwarn androidx.lifecycle.** + +# ============ 保留 Parcelable / Serializable ============ +-keepclassmembers class * implements android.os.Parcelable { + public static final android.os.Parcelable$Creator *; +} +-keepclassmembers class * implements java.io.Serializable { + static final long serialVersionUID; + private static final java.io.ObjectStreamField[] serialPersistentFields; + private void writeObject(java.io.ObjectOutputStream); + private void readObject(java.io.ObjectInputStream); + java.lang.Object writeReplace(); + java.lang.Object readResolve(); +} + +# ============ 异常堆栈保留(方便排查 release 崩溃) ============ +-keepattributes SourceFile,LineNumberTable +-renamesourcefileattribute SourceFile +-keepattributes Signature +-keepattributes *Annotation* +-keepattributes Exceptions +-keepattributes InnerClasses +-keepattributes EnclosingMethod + +# ============ 移除日志(可选) ============ +# 如果你想在 release 里保留日志,注释掉下面这几行 +-assumenosideeffects class android.util.Log { + public static *** v(...); + public static *** d(...); + public static *** i(...); +} \ No newline at end of file diff --git a/android/build/reports/problems/problems-report.html b/android/build/reports/problems/problems-report.html index 467780e..e398bc3 100644 --- a/android/build/reports/problems/problems-report.html +++ b/android/build/reports/problems/problems-report.html @@ -225,13 +225,11 @@ template { .header { display: flex; flex-wrap: wrap; - position: fixed; top: 0; left: 0; width: 100%; - padding: 24px 24px 0 24px; + padding-top: 24px; background-color: white; - z-index: 1; } .learn-more { @@ -250,8 +248,6 @@ template { .content { font-size: 0.875rem; - padding: 240px 0 48px; - overflow-x: auto; white-space: nowrap; } @@ -650,12 +646,12 @@ code + .copy-button { diff --git a/assets/CHANGELOG.md b/assets/CHANGELOG.md index 6819ec7..a2088d0 100644 --- a/assets/CHANGELOG.md +++ b/assets/CHANGELOG.md @@ -1,3 +1,18 @@ +## [1.7.1] - 2026-09-16 + +### 新增 +- **平均温度显示**:温度面板新增平均温度,与最高/最低温度同排展示(`↑ xx.x℃ ↓ xx.x℃ ⌀ xx.x℃`),更直观了解电池工作温度区间 + +### 优化 +- **数据库升级至 v2**:新增 `temp_avg` 字段,历史数据自动迁移,每日平均温度随扫描自动入库 +- **构建工具链同步**:适配最新 Flutter SDK 的 Android 构建要求(AGP 9.0 / Kotlin 2.2 / Gradle 9.3) +- **Release 打包加固**:补齐 ProGuard 混淆规则,release 版本构建更稳定 + +### 修复 +- 修复 Release 版本因缺少混淆规则文件导致打包失败的问题 + +---- + ## [1.7.0] - 2026-07-31 ### ✨ 新增功能 diff --git a/pubspec.yaml b/pubspec.yaml index 50a6020..571dfad 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # In Windows, build-name is used as the major, minor, and patch parts # of the product and file versions while build-number is used as the build suffix. -version: 1.7.2 +version: 1.7.1 environment: sdk: ^3.9.2