android-proguard-setup

Configure ProGuard/R8 minification and resource shrinking for Android release builds.

3|1|Updated Dec 4, 2025
One-click install
npx skills add https://github.com/hitoshura25/claude-devtools --skill android-proguard-setup
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: android-proguard-setup
Source: https://github.com/hitoshura25/claude-devtools/tree/main/skills/android-proguard-setup
Command: npx skills add https://github.com/hitoshura25/claude-devtools --skill android-proguard-setup

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill streamlines the setup of ProGuard/R8 for Android release builds, ensuring minification and resource shrinking are enabled with safe defaults to protect code and optimize APK size.

Core Features & Use Cases

  • Auto-configure rules: Create or update app/proguard-rules.pro with safe defaults to preserve necessary code paths.
  • Enable release minification: Update app/build.gradle.kts to enable isMinifyEnabled and isShrinkResources in the release build.
  • Validation & notes: Provide verification steps to confirm minification is active and rules are applied, with guidance for library-specific considerations.

Quick Start

Use the android-proguard-setup skill to enable ProGuard/R8 for your Android project by creating or updating app/proguard-rules.pro and enabling minification in app/build.gradle.kts.

Frequently Asked Questions about android-proguard-setup

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I enable ProGuard minification for an Android release build?

ProGuard and R8 shrinking reduce APK size by removing unused code and resources during release builds. ProGuard relies on mapping rules to preserve necessary code paths, while R8 acts as the default Android minifier offering integrated desugaring and optimization.

What safe default rules do I need for Android R8 resource shrinking?

You configure safe ProGuard defaults by creating or updating the app/proguard-rules.pro file. This ensures necessary code paths are preserved during minification, preventing runtime crashes while optimizing your release APK size.

Can I set up Gradle Kotlin DSL build configuration for R8 minification?

Yes, R8 minification is compatible with Android projects using Gradle Kotlin DSL. The setup requires updating app/build.gradle.kts to enable minification flags and ensuring the app/proguard-rules.pro file exists for custom rules.

Why does my Android release build fail after enabling ProGuard rules?

After enabling minification, verify that isMinifyEnabled is properly set in app/build.gradle.kts and that app/proguard-rules.pro exists. The Skill validates these prerequisites and provides verification steps to confirm flags are active and rules are applied correctly.

Do I need a proguard-rules.pro file to enable minification in Android?

Yes, the app/proguard-rules.pro file is a required prerequisite. It must exist and contain safe default rules to preserve necessary code paths before you enable minification and resource shrinking in your Android release builds.