一键导入
release-new-version
Use when preparing a Nexus release commit that requires syncing app/build.gradle.kts version fields with the latest GitHub release.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when preparing a Nexus release commit that requires syncing app/build.gradle.kts version fields with the latest GitHub release.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
MUST Load this skill for ANY task that involves GUI interaction or device control — opening apps, tapping, typing, scrolling, swiping, Back/Home/Recents, reading the screen, or any workflow that touches on-screen content. Load this even when the user does not explicitly mention the device — if the task implies a GUI operation, load this skill first.
Use when working in the Nexus repository and the task needs project context before code search, editing, debugging, design, or architecture discussion.
Use when updating or adding `nexus-lookup` wiki pages, especially after code changes, doc review, or when fixing stale paths, status drift, and overgrown reference content.
| name | release-new-version |
| description | Use when preparing a Nexus release commit that requires syncing app/build.gradle.kts version fields with the latest GitHub release. |
这个 skill 用于执行 Nexus 的发版提交流程。
它的核心规则只有三条:
app/build.gradle.kts 为准versionCode 的基线versionName 必须先询问用户,默认只建议递增一个小版本号当前仓库已验证的版本映射规则如下:
<versionCode>-<versionName>1-0.0.1versionCode = 1versionName = "0.0.1"在以下场景使用:
versionCodeapp/build.gradle.kts 中的版本字段并产出 release APK不要用于:
开始前必须确认以下事实:
app/build.gradle.ktsdefaultConfig 下的 versionCode 与 versionNameversionName如果用户没有明确指定新版本号,默认建议:
0.0.10.0.2只读取以下文件:
app/build.gradle.kts目标字段:
versionCode = <Int>versionName = "<String>"优先使用备用脚本:
python3 .trae/skills/release-new-version/get_latest_release_version.py
默认目标仓库:
Xposed-Modules-Repo/com.niki914.nexus.agentic脚本输出应为单行 tag,例如:
1-0.0.1
将 tag 按第一个 - 拆分:
versionCodeversionName示例:
1-0.0.1 -> versionCode=1, versionName=0.0.1
同时校验本地 app/build.gradle.kts 当前值是否与该 tag 对应。
如果不一致:
下一版规则:
versionCode = GitHub 最新 versionCode + 1versionName 需要用户确认默认建议:
1-0.0.1versionCode = 2versionName = "0.0.2"必须先做:
app/build.gradle.kts必须显式询问用户:
versionName 是什么?默认建议文案可以直接使用:
GitHub 最新 release 是 1-0.0.1,本地 app/build.gradle.kts 当前是 versionCode=1、versionName=0.0.1。
按规则下一次发版建议使用 versionCode=2。
如果你没有特殊要求,建议 versionName 使用 0.0.2。
请确认是否使用 0.0.2,或告诉我你想要的新 versionName。
只修改:
app/build.gradle.kts仅更新:
versionCodeversionName不要顺手修改其他构建配置。
版本更新完成后,执行:
./gradlew assembleRelease
构建完成后,执行:
open app/build/outputs/apk/release/
python3 .trae/skills/release-new-version/get_latest_release_version.py
./gradlew assembleRelease
open app/build/outputs/apk/release/
versionCode + 1,却不先看 GitHub 最新 release1-0.0.1 误读成完整字符串版本,而不拆成 Int 和 StringversionNamebuild.gradle.kts 里的无关配置完成时给出简短结果:
发版结果
GitHub 最新:
- 1-0.0.1
本地原始版本:
- versionCode=1
- versionName=0.0.1
本次更新后:
- versionCode=2
- versionName=0.0.2
已执行:
- ./gradlew assembleRelease
- open app/build/outputs/apk/release/