"Quy trình build, đóng gói APK/AAB, kiểm tra signing và chuẩn bị release cho dự án Android/Gradle. Không dùng cho dự án không phải Android."
Install
npx skillscat add toanmobile/agent-workbench/deploy Install via the SkillsCat registry.
Build & Deployment Pipeline (Android/Gradle)
Skill này chỉ áp dụng cho dự án Android dùng Gradle. Dự án iOS, web, backend: dùng pipeline
release của chính dự án đó; skill này không có lệnh tương đương.
Skill hướng dẫn và tự động hóa quy trình build artifact (APK/AAB), kiểm tra chữ ký (signing), xác minh ProGuard/R8 mappings và chuẩn bị deployment cho Target Project / Codebase.
1. Pre-build Verification
Trước khi thực hiện build hoặc deploy:
- Đảm bảo toàn bộ unit tests và ktlint đã pass (
./gradlew ktlintCheck testDebugUnitTest). - Xác nhận working tree không có uncommitted dirty code nằm ngoài phạm vi release.
- Không có secrets hoặc test credentials bị hardcode trong source.
2. Build Assembly Commands
# 1. Build Debug APK (cho thử nghiệm local / QA device testing)
./gradlew assembleDebug
# 2. Build Release APK (chứa ProGuard/R8 optimization)
./gradlew assembleRelease
# 3. Build Android App Bundle (AAB - dùng publish lên Google Play)
./gradlew bundleRelease3. Artifact Verification & Inspection
Sau khi build thành công, kiểm tra các output artifacts:
- Debug APK:
app/build/outputs/apk/debug/app-debug.apk - Release APK:
app/build/outputs/apk/release/app-release.apk - Release AAB:
app/build/outputs/bundle/release/app-release.aab - ProGuard / R8 Mapping:
app/build/outputs/mapping/release/mapping.txt
4. Pre-release Security & Gate Verification
Chạy pre-release security & compatibility gate của chính dự án nếu có (lệnh khai trong.agents/local/, README hoặc CI của dự án — DevKit không ship gate này) và checklist của skillsecurity-checklist. Chỉ báo PASS khi command thật exit 0; dự án không có gate thì nói rõ.
[!CAUTION]
Quy tắc an toàn bất khả xâm phạm:
Tuyệt đối KHÔNG tự ýgit commit,git push, publish lên store hay triển khai release môi trường production mà không có sự phê duyệt và yêu cầu trực tiếp từ User.