본문으로 건너뛰기
Skillpedia
모바일 앱10k · #11907

agp-9-upgrade

하는 일

이 스킬은 Android 프로젝트를 Android Gradle Plugin 버전 9로 옮기고, 이를 필요로 하는 의존성을 업데이트합니다. Android 개발자가 업그레이드를 진행할 때 쓰는 스킬입니다. Kotlin Multiplatform 프로젝트는 다루지 않습니다.

사용하는 경우

  • ✓Android 프로젝트가 아직 이전 Android Gradle Plugin을 쓰고 있고 버전 9로 옮기고 싶을 때.
  • ✓Android Gradle Plugin 9으로 업그레이드하면서 빌드가 깨져 마이그레이션 단계가 필요할 때.
  • ✓KSP나 Hilt를 Android Gradle Plugin 9와 호환되는 버전으로 업데이트하고 싶을 때.

스킬 링크

https://github.com/android/skills/blob/main/build-system/agp/agp-9-upgrade/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/android/skills/blob/main/build-system/agp/agp-9-upgrade/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“내 Android 프로젝트를 Android Gradle Plugin 9로 업그레이드하고 깨진 부분을 고쳐 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

이 스킬은 먼저 현재 플러그인 버전을 확인합니다. 9보다 낮은 버전이면, 건너뛰라고 하지 않는 한 Android Studio의 Upgrade Assistant를 실행하라고 요청합니다. 그다음 마이그레이션 가이드를 따릅니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Migration guide

See the AGP 9 migration guide for the major changes, many breaking, in AGP 9 compared to AGP 8.

Requirements

If the user requests to update or migrate to AGP 9, first check the AGP version used in the project. If it is lower than 9, stop and ask the user to run the AGP Upgrade Assistant in Android Studio to update to the latest stable version of AGP, and confirm when done. The user may also request that this requirement be skipped; if this is the case, you should update the version of AGP to the latest stable version as part of the AGP 9 migration. See the AGP 9 migration guide for how to do this.

Each version of AGP has its own set of compatibilities with other tools, such as Gradle, JDK, and Kotlin. The release notes for each of these versions will include a Compatibility table indicating the minimum versions for these tools.

Do not use this skill for KMP projects, as they are unsupported.

Steps

If AGP is already at 9 or higher, then do the following:

Step 1: Update dependencies

If KSP (com.google.devtools.ksp) is used in the project, ensure it is on version 2.3.6 or higher.

If Hilt is used in the project, ensure it is on version 2.59.2 or higher.

Step 2: Migrate to built-in Kotlin

See the guide for detailed information.

Step 3. Migrate to the new AGP DSL

See the guide for detailed information.

See also gradle-recipes for examples on how to migrate old code to code that is compatible with AGP 9 and the new DSL.

Step 4. Migrate kapt to KSP or legacy-kapt

If KSP (com.google.devtools.ksp) or kapt (org.jetbrains.kotlin.kapt) are used in the project, see KSP, kapt, and legacy-kapt for detailed migration steps.

Step 5. BuildConfig

If any Android module contains custom BuildConfig fields, see BuildConfig for detailed information.

Step 6. Update gradle.properties

After the migration, check gradle.properties. Remove the following flags:

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

Additionally, delete all temporary files you've created.

Guidelines

  • Never write or run python scripts.
  • Only search the Gradle dependency cache when inspecting external dependencies, and only as a last resort.
  • Never add android.disallowKotlinSourceSets=false to gradle.properties.
  • When verifying changes, don't run the clean task. This is a waste of time.

Verification

After migration, verify the following:

  1. Gradle IDE sync succeeds.
  2. ./gradlew help succeeds.
  3. ./gradlew build --dry-run succeeds.

Troubleshooting

Paparazzi v2.0.0-alpha04 and lower versions have issues with AGP 9. See references/paparazzi-gradle-9.md for details.

자주 묻는 질문

Upgrade Assistant를 먼저 실행해야 하나요?

프로젝트가 9보다 낮은 버전이라면, 그 단계를 건너뛰라고 하지 않는 한 스킬이 실행을 요청합니다.

Kotlin Multiplatform 프로젝트에도 쓸 수 있나요?

아니요. 이 스킬은 해당 프로젝트를 지원하지 않습니다.

함께 업데이트해야 하는 다른 도구는 무엇인가요?

KSP나 Hilt처럼 최소 버전이 필요한 도구들이 있으며, 스킬이 이를 업데이트합니다.

상세 정보

작성자의 원본 설명

Upgrades, or migrates, an Android project to use Android Gradle Plugin (AGP) version 9. Do not use this skill for migrating Kotlin Multiplatform (KMP) projects.

repo: android/skills

인기도

GitHub 스타
10k
순위
#11907
라이선스
Apache-2.0
업데이트
2026. 10. 29.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬