diff --git a/app/src/main/assets/AGENTS.md b/app/src/main/assets/AGENTS.md index d23a126..965ae29 100644 --- a/app/src/main/assets/AGENTS.md +++ b/app/src/main/assets/AGENTS.md @@ -1,25 +1,25 @@ - + # assets ## Purpose -原始资产文件目录,存放不需要 Android 资源系统处理的二进制文件。当前包含 GIF 动画资源。 +`:app` 模块原始资产文件目录。当前为空(2026-06 清理后)。 ## Key Files -无顶层文件 +无 ## Subdirectories -| Directory | Purpose | -|-----------|---------| -| `gifs/` | GIF 动画资源(见 `gifs/AGENTS.md`) | +无(原 `gifs/` 子目录的镜像说明已删除 —— 实际 UI/WebP 资源只在 `:core`) ## For AI Agents ### Working In This Directory -- 新增原始资源文件直接放入此目录或其子目录 -- 通过 `AssetManager` 在运行时访问 +- 历史上此目录曾放 `app_icon.png`/`app_icon_original.png` 作图标源,因无代码引用已于 2026-06 删除 +- 应用内图标用 `core/src/main/assets/app_icon.webp`(`Platform.kt`) +- 启动器图标用 `app/src/main/res/mipmap-*/`(含 Adaptive Icon) +- **不要再把图标源 PNG 放这里**:会被打进 APK。源文件放仓库外或 `.assets-source/` diff --git a/app/src/main/assets/gifs/AGENTS.md b/app/src/main/assets/gifs/AGENTS.md deleted file mode 100644 index 8659a6f..0000000 --- a/app/src/main/assets/gifs/AGENTS.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# gifs - -## Purpose -GIF 动画资源目录,存放应用使用的动画 GIF 文件(001.gif ~ 152.gif),由 `AnimatedGif` Composable 组件通过 `sketch` 库加载显示。 - -## Key Files - -| File | Description | -|------|-------------| -| `001.gif` ~ `152.gif` | 应用动画 GIF 资源 | - -## Subdirectories -无 - -## For AI Agents - -### Working In This Directory -- 替换或新增 GIF 时保持连续编号 -- GIF 文件较大,注意 APK 体积影响 -- `AnimatedGif` 组件使用 `sketch` 库异步加载和播放 - -## Dependencies - -### Internal -- `core/src/main/kotlin/plus/rua/project/ui/AnimatedGif.kt` — GIF 显示组件 - -### External -- `sketch` 4.4.0(GIF 解码和播放) - - diff --git a/core/src/main/assets/AGENTS.md b/core/src/main/assets/AGENTS.md index df256ae..2d87b65 100644 --- a/core/src/main/assets/AGENTS.md +++ b/core/src/main/assets/AGENTS.md @@ -1,25 +1,28 @@ - + # assets ## Purpose -核心模块原始资产文件目录,与 `app/src/main/assets/` 镜像,包含 GIF 动画资源供 `AnimatedGif` Composable 组件加载。 +核心模块原始资产文件目录,通过 `AssetManager` 在运行时访问。包含应用内图标和动画 WebP 资源。 ## Key Files -无顶层文件 +| File | Description | +|------|-------------| +| `app_icon.webp` | 应用内展示用的图标(`Platform.kt` 的 `getAppIconUri()` 引用) | ## Subdirectories | Directory | Purpose | |-----------|---------| -| `gifs/` | GIF 动画资源(见 `gifs/AGENTS.md`) | +| `animations/` | 动画 WebP 资源(见 `animations/AGENTS.md`) | ## For AI Agents ### Working In This Directory -- 此目录与 `app/src/main/assets/` 内容同步 -- 通过 `AssetManager` 在运行时访问 +- 新增原始资源文件直接放入此目录或其子目录 +- **不与 `app/src/main/assets/` 镜像**:启动器图标在 `:app`,UI/WebP 资源在 `:core` +- 通过 `file:///android_asset/` URI 在运行时访问 diff --git a/core/src/main/assets/animations/AGENTS.md b/core/src/main/assets/animations/AGENTS.md index 8659a6f..c02985d 100644 --- a/core/src/main/assets/animations/AGENTS.md +++ b/core/src/main/assets/animations/AGENTS.md @@ -1,16 +1,18 @@ - + -# gifs +# animations ## Purpose -GIF 动画资源目录,存放应用使用的动画 GIF 文件(001.gif ~ 152.gif),由 `AnimatedGif` Composable 组件通过 `sketch` 库加载显示。 +动画 WebP 资源目录,存放应用日历切换时随机展示的动画(文件名 `001.webp` ~ `NNN.webp`,由构建期扫描生成)。由 `AnimatedWebp` Composable 通过 `sketch` 库加载。 + +> 历史命名曾为 `gifs/`(2026-06 前),实际格式一直是 WebP 动画,现已正名。 ## Key Files | File | Description | |------|-------------| -| `001.gif` ~ `152.gif` | 应用动画 GIF 资源 | +| `001.webp` ~ `NNN.webp` | 动画 WebP 资源,编号零填充三位 | ## Subdirectories 无 @@ -18,16 +20,18 @@ GIF 动画资源目录,存放应用使用的动画 GIF 文件(001.gif ~ 152. ## For AI Agents ### Working In This Directory -- 替换或新增 GIF 时保持连续编号 -- GIF 文件较大,注意 APK 体积影响 -- `AnimatedGif` 组件使用 `sketch` 库异步加载和播放 +- 替换或新增 WebP 时保持连续三位编号(如 `153.webp`) +- **无需手动更新列表**:`core/build.gradle.kts` 在构建期扫描本目录生成 `BuildConfig.WEBP_FILES` +- 由 `AnimatedWebpFilesTest` 守卫目录与列表一致 +- WebP 文件较大,注意 APK 体积 ## Dependencies ### Internal -- `core/src/main/kotlin/plus/rua/project/ui/AnimatedGif.kt` — GIF 显示组件 +- `core/src/main/kotlin/plus/rua/project/ui/AnimatedWebp.kt` — WebP 显示组件 +- `core/build.gradle.kts` — 构建期扫描注入 `BuildConfig.WEBP_FILES` ### External -- `sketch` 4.4.0(GIF 解码和播放) +- `sketch` 4.4.0(`sketch-animated-webp`,动画 WebP 解码播放)