22 Commits

Author SHA1 Message Date
xfy
9bd1f57daf build: 将 152 个 GIF 动画资源批量转换为 WebP 格式
使用 gif2webp -mixed -mt 批量转换,资源从 5.65MB 降至 3.60MB,
APK release 包从 7.8MB 降至 5.8MB(减少 26%)。

同步更新:
- 依赖:sketch-animated-gif → sketch-animated-webp
- 代码:GIF_FILES → WEBP_FILES,getGifUri → getWebpUri

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-22 18:04:36 +08:00
xfy
e02459e8c9 build: 删除未引用的 kotlin-test 条目,移除 @Preview,uiTooling 改为 debugImplementation
- 删除 libs.versions.toml 中未被任何模块引用的 kotlin-test 孤儿条目
- 移除所有 @Preview 注解和 Preview 函数(5 个文件)
- app/core 模块的 compose-uiTooling 从 implementation 改为
  debugImplementation,避免打包到 release APK

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-22 17:53:05 +08:00
xfy
5acad54384 build: 集成依赖更新检查与自动升级工具
- 添加 ben-manes/gradle-versions-plugin(0.54.0)用于检测依赖更新
- 添加 nl.littlerobots/version-catalog-update(1.1.0)用于自动升级版本目录
- 升级 Compose BOM 2025.05.01 → 2026.05.01
- 升级 profileinstaller 1.4.0 → 1.4.1
- 版本目录按字母顺序重新排序

使用方式:
  ./gradlew dependencyUpdates       # 检查更新
  ./gradlew versionCatalogUpdate    # 自动升级版本号

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-22 17:31:23 +08:00
xfy
1be1948f49 build: 集成 Spotless 8.5.1 代码格式化工具
- 在版本目录中添加 spotless 插件 8.5.1
- 配置 Kotlin 源码和 Gradle Kotlin DSL 脚本格式化
- 使用 ktlint 引擎,启用 trimTrailingWhitespace 和 endWithNewline

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-22 16:37:29 +08:00
xfy
dd072730f1 fix: 年视图 pageYear 使用 settledPage 计算,修复滑动切换时年份闪烁
pageYear = yearViewYear + (page - settledPage) 代替 currentPage,
因为 yearViewYear 由 settledPage 驱动,两者始终同步。
用 currentPage 会在滑动过半时出现不匹配,导致小月份
短暂显示错误年份数据。

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-22 16:09:42 +08:00
xfy
bf28008d17 refactor: Wave 1 — 构建清理、测试修复、文档修正、a11y 改进
- build: 清理版本目录死依赖(appcompat、core、material3)
- build: 精简 ProGuard keep 规则,仅保留热点路径和第三方库
- refactor: 重命名 PredictiveBackHandler → AppPredictiveBackHandler
- test: formatLunarDate 精确断言 + 闰月测试
- test: 统一测试命名风格(下划线),Unconfined → StandardTestDispatcher
- docs: 修正文档为纯 Android + Jetpack Compose 描述
- feat(a11y): 添加可访问性语义标注(WeekdayHeader heading、BottomCard 拖拽描述)
- feat: 为 DayCell、MonthHeader、WeekdayHeader、BottomCard 添加 @Preview

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-21 17:51:12 +08:00
xfy
98f3b71c4f perf: 升级 Macrobenchmark 至 1.4.1,适配新 API 并重新生成 Baseline Profile
- benchmarkMacro 1.3.4 → 1.4.1
- BaselineProfileGenerator: 使用 Direction 枚举替代坐标 swipe;
  用 executeShellCommand 绕过 startActivityAndWait(模拟器 software renderer
  不支持 gfxinfo framestats,会导致 amStartAndWait 超时)
- updateBaselineProfile task: 适配 1.4+ 的 startup-prof.txt 文件名格式,
  使用 layout.buildDirectory 预先计算路径(configuration cache 兼容)
- 重新生成 baseline-prof.txt(全量 AOT 覆盖)
- benchmark build type 设为 isDebuggable=true(配合模拟器运行)
- 将 Baseline Profile 使用文档从 README 迁移至 DEVELOPMENT.md

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-21 11:37:37 +08:00
xfy
2771e3733b perf: 集成 Macrobenchmark 模块,自动生成全量 Baseline Profile
- 新增 :macrobenchmark 模块,提供自动 Baseline Profile 生成
- 扩展 proguard-rules.pro,保留所有业务类方法名确保 profile 匹配
- 全量 AOT 覆盖:冷启动 + 交互路径(年视图、周折叠、关于页等)
- app/build.gradle.kts 新增 benchmark 构建类型
- README 简化 Baseline Profiles 维护指南

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-21 10:50:01 +08:00
xfy
6582d5970e perf: 集成 Baseline Profiles,优化启动性能与文档
- 添加 core/proguard-rules.pro 保留关键类方法签名
- 添加 core/src/main/baseline-prof.txt 预编译热点路径
- 引入 androidx.profileinstaller 依赖
- LunarCache 新增 formatLunarDate() 复用缓存数据
- BottomCard 使用 remember 缓存农历描述避免重复计算
- CalendarMonthView 延迟一帧显示 BottomCard,避免首帧阻塞
- README 补充 Baseline Profiles 维护指南与性能监控说明

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-21 10:22:43 +08:00
xfy
cf9315cfe3 feat: US-007~010 实现年月视图共享元素转场动画
- 引入 SharedTransitionLayout + AnimatedContent 管理月/年视图切换
- 使用 sharedBounds + rememberSharedContentState 标记共享元素
- 转场动画 400ms,FastOutSlowInEasing
- 添加 compose-animation 依赖支持 SharedTransition API

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-20 15:17:18 +08:00
xfy
c19916c2ec fix: US-006 修复构建错误,首次构建验证通过
- 移除 androidApp/shared 中已弃用的 kotlinOptions 块
- material3 改为通过 Compose BOM 管理版本
- 清理残留的 composeResources 目录

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-20 14:58:06 +08:00
xfy
d3229f90d0 refactor: US-001 清理 Gradle 根配置,移除 KMP/CMP 插件和依赖
- build.gradle.kts: 移除 composeMultiplatform、kotlinMultiplatform 插件
- settings.gradle.kts: 移除 JetBrains maven 仓库
- libs.versions.toml: CMP 依赖替换为 AndroidX Compose BOM
- Licenses.kt: 更新依赖列表

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-20 14:47:56 +08:00
xfy
feb7db718e feat: 引入 sketch4 显示 GIF 动画,新增 AnimatedGif 组件
- 添加 sketch4 依赖(compose / animated-gif / compose-resources)
- 升级 tyme4kt 1.4.4 → 1.4.5
- 新增 puppy_1.gif 资源与 AnimatedGif 通用组件

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-19 13:36:14 +08:00
meyou
dfda6fa5a9 DayCell 增加农历日期显示
使用 tyme4kt 库在日期数字下方显示农历日名,初一显示月名。
2026-05-16 15:15:27 +08:00
xfy
73d42902ea Update targetSdk to 37, Gradle to 9.5.1, coroutines-test to 1.11.0, and move launcher icon out of drawable-v24
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-15 16:07:48 +08:00
xfy
9648afc561 Add unit tests for CalendarViewModel and CalendarUtils
Inject Clock into CalendarViewModel for testability, add kotlinx-coroutines-test dependency, replace placeholder test with real coverage for ISO week numbers, month day grids, page mapping, and utility functions.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-15 15:42:01 +08:00
xfy
3599ff448c Update compileSdk to 37, Compose to 1.11.0, and remove unused dependencies
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-15 14:40:08 +08:00
xfy
591215251f Use JAVA_HOME JDK instead of pinned toolchain version 21
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-14 23:59:40 +08:00
xfy
2c0a63e930 Add kotlinx-datetime dependency for date handling
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-14 13:11:33 +08:00
xfy
758cd9947f Remove foojay plugin and use local JDK for Gradle toolchain
Remove foojay-resolver-convention plugin to avoid downloading JDK from
foojay.io. Simplify gradle-daemon-jvm.properties to only specify
toolchainVersion=21. Upgrade JVM target from 11 to 17 in composeApp.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-14 10:52:29 +08:00
xfy
f45342f4ea Upgrade AGP to 9.2.1 and Gradle to 9.4.1, add Android build properties
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-14 10:27:30 +08:00
xfy
3b564cb29a Initial commit: Kotlin Multiplatform project setup
Configure Compose Multiplatform targeting Android and iOS with Gradle build system.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-14 10:27:30 +08:00