Repository navigation
拆成不联网版与联网版,发版出两个 APK,版本 0.2.4 - #14
Merged
Merged
Conversation
offline 沿用原包名,无网络权限;online 包名加 .online,桌面名“后生 AI”,带 Clef、真实应用筛选和模糊遮挡。原 debug/release 源码集按此改为 online/offline,两版界面文案各自说明自己的能力。
online 版包名带 .online,类名不变,原来写死的包名和 .MainActivity 简写会指错。设备测试和 test-device.sh 改用 online debug,验证场恢复测试通过 -e housheng 指定目标包。
两版都跑单测,lint 覆盖 onlineDebug 和 offlineRelease。权限改为精确比对:不联网版无权限,联网版只有 INTERNET。推标签后发布 housheng-<版本>.apk 和 housheng-online-<版本>.apk,SHA256SUMS 两行。
安装、隐私、构建命令和发版流程按两版改写,删掉 Clef 调试预览包一节。路线图里“发版前改检查”一条已完成。
两版同时安装时系统设置里能分清。设备测试按目标包对应的服务名判断绑定,test-device.sh 可用 HOUSHENG_FLAVOR=offline 测不联网版。
直连/USB 切换、本机回环客户端和 127.0.0.1 明文放行移到 onlineDebug,正式版固定手机直连。发版检查同时确认联网版正式包没有 networkSecurityConfig。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
改了什么
从 0.2.4 起每次发版出两个正式签名的 APK,可以装在同一台手机上:
io.github.pathgao.houshengio.github.pathgao.housheng.onlinehousheng-<版本>.apkhousheng-online-<版本>.apknetworkflavor 维度。原debug/里的 Clef、真实应用筛选、FeedMask全是联网功能,整体移到online/。原release/的 stub 移到offline/。所有 AI 和真实应用开关默认关,由OnlineDefaultsTest守。onlineDebug。联网正式包固定走手机直连。.MainActivity简写在 online 包下会指错类。dumpsys 里两个服务同时绑定时会分行,原来只读第一行,后装的那版总被判为未连接,已修。scripts/check-permissions.sh,CI 和发版共用,精确比对两版的权限,并拦住联网正式包带networkSecurityConfig。release.yml 打两个签名 APK,SHA256SUMS 两行,上传到同一个 Release。版本改为 0.2.4 / 6,附发布说明。验证
macOS arm64,JDK 17,Android 13 模拟器。
单测 offline 30 项、online 43 项,Python 9 项,全部通过。把默认开关改成开,
OnlineDefaultsTest失败。权限检查对调两版、APK 缺失、online debug 包带明文配置时均报错。模拟器上两版同时安装,桌面出现两个图标,联网版的 5 个应用开关和 Clef 入口默认全关,不联网版没有这些入口。两版都装着时,各跑一次验证场设备测试,各 29 项加恢复 1 项通过。aapt2 核对四个 APK 的包名、名称、权限和 manifest。
没测:本机没有发行密钥,签名和 Release 上传要推标签后看 CI。联网正式包未签名,装不上模拟器,“正式版没有 USB 开关”只核对到代码。
--model和真实应用测试没跑。