Community코딩 & 개발github.com

lerchenflo/claudeskills

Android 프로젝트를 Android Gradle Plugin (AGP) 버전 9로 업그레이드 또는 마이그레이션합니다. Kotlin Multiplatform (KMP) 프로젝트에는 이 스킬을 사용하지 마세요.

claudeskills란 무엇인가요?

이 스킬은 Android 프로젝트를 AGP 9로 마이그레이션하는 과정을 안내합니다. AGP 9의 주요 변경 사항과 함께, Gradle, JDK, Kotlin 등 도구 호환성 정보를 제공합니다. Android Studio의 AGP 업그레이드 도우미를 통해 안정적인 최신 AGP 버전으로 먼저 업데이트한 후, 이 스킬을 사용하여 AGP 9로의 전환을 수행합니다. 주요 단계로는 의존성 업데이트, 내장 Kotlin으로의 마이그레이션, 새로운 AGP DSL 적용, kapt를 KSP 또는 legacy-kapt로 전환, BuildConfig 설정 변경, gradle.properties 정리 등이 포함됩니다. KMP 프로젝트는 지원되지 않으므로 이 스킬을 사용해서는 안 됩니다.

지원 대상✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/lerchenflo/claudeskills/tree/HEAD/android/agp-9-upgrade

Installed? Explore more 코딩 & 개발 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

즐겨 사용하는 AI에게 물어보기

이 에이전트 스킬이 미리 로드된 새 채팅을 엽니다.

문서

마이그레이션 가이드

AGP 8 대비 AGP 9의 주요 변경 사항(대부분 호환성이 깨짐)은 AGP 9 마이그레이션 가이드를 참조하세요.

요구 사항

사용자가 AGP 9로 업데이트 또는 마이그레이션을 요청하면, 먼저 프로젝트에서 사용 중인 AGP 버전을 확인하세요. 버전이 9보다 낮으면 중단하고, 사용자에게 Android Studio에서 AGP 업그레이드 도우미를 실행하여 최신 안정 버전의 AGP로 업데이트한 후 완료되었음을 확인하도록 요청하세요. 사용자가 이 요구 사항을 건너뛰기를 요청할 수도 있습니다. 이 경우 AGP 9 마이그레이션의 일환으로 AGP 버전을 최신 안정 버전으로 업데이트해야 합니다. 이 작업을 수행하는 방법은 AGP 9 마이그레이션 가이드를 참조하세요.

각 AGP 버전은 Gradle, JDK, Kotlin과 같은 다른 도구와의 호환성 세트가 있습니다. 각 버전의 릴리스 노트에는 이러한 도구의 최소 버전을 나타내는 호환성 표가 포함됩니다.

KMP 프로젝트에는 이 스킬을 사용하지 마세요. 지원되지 않습니다.

단계

AGP가 이미 9 이상이면 다음을 수행하세요:

1단계: 의존성 업데이트

프로젝트에서 KSP(com.google.devtools.ksp)를 사용하는 경우, 버전 2.3.6 이상인지 확인하세요.

프로젝트에서 Hilt를 사용하는 경우, 버전 2.59.2 이상인지 확인하세요.

2단계: 내장 Kotlin으로 마이그레이션

자세한 내용은 가이드를 참조하세요.

3단계: 새로운 AGP DSL로 마이그레이션

자세한 내용은 가이드를 참조하세요.

AGP 9 및 새로운 DSL과 호환되는 코드로 이전 코드를 마이그레이션하는 방법에 대한 예제는 gradle-recipes도 참조하세요.

4단계: kapt를 KSP 또는 legacy-kapt로 마이그레이션

프로젝트에서 KSP(com.google.devtools.ksp) 또는 kapt(org.jetbrains.kotlin.kapt)를 사용하는 경우, 자세한 마이그레이션 단계는 KSP, kapt, and legacy-kapt를 참조하세요.

5단계: BuildConfig

Android 모듈에 사용자 정의 BuildConfig 필드가 있는 경우, 자세한 내용은 BuildConfig를 참조하세요.

6단계: gradle.properties 업데이트

마이그레이션 후 gradle.properties를 확인하세요. 다음 플래그를 제거하세요:

  1. android.builtInKotlin
  2. android.newDsl
  3. android.uniquePackageNames
  4. android.enableAppCompileTimeRClass

또한 생성한 모든 임시 파일을 삭제하세요.

지침

  • Python 스크립트를 작성하거나 실행하지 마세요.
  • 외부 종속성을 검사할 때만 Gradle 종속성 캐시를 검색하고, 최후의 수단으로만 사용하세요.
  • android.disallowKotlinSourceSets=false를 gradle.properties에 추가하지 마세요.
  • 변경 사항을 확인할 때 clean 작업을 실행하지 마세요. 시간 낭비입니다.

검증

마이그레이션 후 다음을 확인하세요:

  1. Gradle IDE 동기화가 성공합니다.
  2. ./gradlew help가 성공합니다.
  3. ./gradlew build --dry-run이 성공합니다.

문제 해결

Paparazzi v2.0.0-alpha04 및 이전 버전은 AGP 9에 문제가 있습니다. 자세한 내용은 references/paparazzi-gradle-9.md를 참조하세요.

Individual skills in this repo

This repo contains 4 individual skills — each has its own dedicated page.

lerchenflo/claudeskills

Provides instructions for installing and using the `android` CLI. The `android` command-line tool is a critical tool for Android development and helps you create new Android projects, run Android apps on devices, manage and interact with Android virtual devices (including screenshots and UI inspection), manage Android SDK components, look up official Android documentation, and discover and install official Android skills.

lerchenflo/claudeskills

Manages Android performance profiling and debugging. Triggers when the user asks to record or analyze Android performance data, such as system traces, heap dumps, method recordings, callstack samples, memory allocations, or investigate bottlenecks, jank, memory leaks, and app startup issues on Android, or when the user asks to write, debug, or execute ad-hoc SQL queries. Applies to both user and system apps or services.

lerchenflo/claudeskills

Analyzes Android apps to identify key user workflows for AppFunctions such as creating a note, playing media, or sending an automated or AI agent triggered message, voice commands, or system shortcuts, without needing to open the app UI. Generates Kotlin code to expose these workflows to the Android system, allowing agents to discover and execute them on-device. Also refines KDoc documentation to ensure AI agents correctly understand and use the provided functionality.

lerchenflo/claudeskills

Use this skill to migrate your Jetpack Compose app to add adaptive edge-to-edge support and troubleshoot common issues. Use this skill to fix UI components (like buttons or lists) that are obscured by or overlapping with the navigation bar or status bar, fix IME insets, and fix system bar legibility.

관련 스킬