# Shrink Và Protect Android Release Build

> Vì sao bản release Android không phải bản bạn đã test, và R8 thay đổi gì trong app.

- URL: https://dantech.academy/courses/kotlin-accelerator/engineer-builder/05-testing-security-release/lesson-03-shrink-and-guard-release-build
- Khóa học: [Mobile Action Pro](https://dantech.academy/courses/kotlin-accelerator.md)
- Module: Testing, Security Và Release
- Thời lượng: 10 phút
- Độ khó: intermediate
- Truy cập: Dành cho học viên
- English: https://dantech.academy/en/courses/kotlin-accelerator/engineer-builder/05-testing-security-release/lesson-03-shrink-and-guard-release-build.md

## Mục tiêu

- Đối chiếu debug và release build type: R8, resource shrinking và guard signing
- Giải thích vì sao tham chiếu trực tiếp trong AppFeatures.kt không cần keep rule
- Kiểm tra rule nào thật sự tới R8 bằng -printconfiguration

## Nội dung bài học

1. Mục Tiêu Bài Học
2. Phần 1: Release Là Một Chương Trình Khác
3. Phần 2: Tham Chiếu Trực Tiếp Thì Không Cần Keep Rule
4. Phần 3: Đọc Rule File Theo Từng Section
5. Phần 4: Rule Nào Thật Sự Tới R8?
6. Lộ Trình Đọc Code
7. Những Thứ Dễ Hiểu Nhầm
8. Tham Khảo
9. Ý Chính

## Học cùng AI agent

Toàn bộ bài học dành cho học viên của khóa. Học viên mở bài trên web và bấm nút **Markdown** để copy toàn bài, rồi dán vào Claude, ChatGPT, Cursor hoặc agent bạn đang dùng. Nhanh hơn: tạo token ở `/profile/ai-agents` và agent đọc bài trực tiếp qua MCP.

- [Đăng ký khóa học](https://dantech.academy/kotlin-accelerator/checkout)

---

- Bài trước: [Test Flow Và ViewModel](https://dantech.academy/courses/kotlin-accelerator/engineer-builder/05-testing-security-release/lesson-02-test-flows-and-viewmodels.md)
- Bài tiếp theo: [Bảo Vệ Secrets Trong Build (Android + iOS)](https://dantech.academy/courses/kotlin-accelerator/engineer-builder/05-testing-security-release/lesson-04-protect-secrets-at-build-time.md)
