Skip to content

Conversation

@easyhooon
Copy link
Contributor

@easyhooon easyhooon commented Feb 3, 2026

🔗 관련 이슈

📙 작업 설명

  • AGP 9.0.0 업그레이드에 따른 빌드 설정 대응
    • AGP 9 built-in Kotlin 대응으로 kotlin-android 플러그인 제거 (AndroidApplicationConventionPlugin, AndroidLibraryConventionPlugin)
    • AGP 9 신규 DSL 타입 대응 (com.android.build.gradle.LibraryExtension → com.android.build.api.dsl.LibraryExtension)
    • CommonExtension 제네릭 타입 파라미터 제거 (CommonExtension<*, *, *, *, *, *> → CommonExtension)
    • AGP 9 built-in Kotlin으로 불필요해진 KotlinProjectExtension.jvmToolchain() 제거 (Android 모듈)
    • build-logic에서 kotlin.gradle.plugin 의존성 제거
  • 레거시 Suppress 어노테이션 일괄 제거
    • @file:Suppress("INLINE_FROM_HIGHER_PLATFORM") <- Kotlin 2.0에서 해결
    • @Suppress("DSL_SCOPE_VIOLATION") <- Gradle 8.0에서 해결
  • androidx.core.net.toUri() → Uri.parse()로 교체 (androidx.core 1.17.0에서 제거

🧪 테스트 내역 (선택)

  • 주요 기능 정상 동작 확인
  • 브라우저/기기에서 동작 확인
  • 엣지 케이스 테스트 완료
  • 기존 기능 영향 없음

💬 추가 설명 or 리뷰 포인트 (선택)

androidx.core.net.toUri() → Uri.parse()로 교체 (androidx.core 1.17.0에서 제거

이 내용 관련해서 Uri.parse() 쓰면 toUri()로 변경하라고 안스에서 권장하는데, toUri()쓰면 이제 에러나는 딜레마가 있네요. 아직 안스에 android.core 1.17.0 버전 관련 변경사항이 대응이 안되어있는것 같기도 합니다.

reference)
https://developer.android.com/build/releases/agp-9-0-0-release-notes?hl=ko
https://angrypodo.tistory.com/29

Summary by CodeRabbit

릴리스 노트

  • Chores
    • Gradle 빌드 시스템 9.1.0으로 업그레이드
    • Firebase, Compose, Kotlin 등 주요 의존성 업데이트
    • 빌드 설정 정리 및 최적화

@coderabbitai
Copy link

coderabbitai bot commented Feb 3, 2026

Walkthrough

AGP 9.0으로 업그레이드하면서 더 이상 필요 없는 Kotlin DSL 억제 주석을 제거하고, 라이브러리 확장 임포트를 최신 API로 변경했으며, 플러그인 적용 방식을 간소화하고 주요 의존성 및 Gradle 래퍼를 업데이트했습니다.

Changes

Cohort / File(s) Summary
Build Configuration Suppressions
app/build.gradle.kts, core/common/build.gradle.kts, core/data/api/build.gradle.kts, core/data/impl/build.gradle.kts, core/datastore/impl/build.gradle.kts, core/designsystem/build.gradle.kts, core/di/build.gradle.kts, core/network/build.gradle.kts, core/ocr/build.gradle.kts, core/ui/build.gradle.kts, feature/detail/build.gradle.kts, feature/edit/build.gradle.kts, feature/home/build.gradle.kts, feature/library/build.gradle.kts, feature/login/build.gradle.kts, feature/main/build.gradle.kts, feature/onboarding/build.gradle.kts, feature/record/build.gradle.kts, feature/search/build.gradle.kts, feature/settings/build.gradle.kts, feature/splash/build.gradle.kts, feature/webview/build.gradle.kts
@file:Suppress("INLINE_FROM_HIGHER_PLATFORM") 주석 제거로 AGP 9.0 호환성 확보.
Build Logic Plugin Updates
build-logic/build.gradle.kts, build-logic/src/main/kotlin/AndroidApplicationConventionPlugin.kt, build-logic/src/main/kotlin/AndroidLibraryConventionPlugin.kt
Kotlin Android 플러그인 제거 및 DSL 억제 주석 삭제. 플러그인 적용 방식 간소화.
Library Extension Import Updates
build-logic/src/main/kotlin/AndroidLibraryComposeConventionPlugin.kt, build-logic/src/main/kotlin/AndroidLibraryConventionPlugin.kt
LibraryExtension 임포트를 com.android.build.gradle.LibraryExtension에서 com.android.build.api.dsl.LibraryExtension로 변경.
Android Configuration Functions
build-logic/src/main/kotlin/com/ninecraft/booket/convention/Android.kt, build-logic/src/main/kotlin/com/ninecraft/booket/convention/Compose.kt
CommonExtension 제네릭 파라미터 제거, Kotlin DSL 설정 제거, apply 스코프 블록 사용으로 간소화.
Plugin Constants & Root Build
build-logic/src/main/kotlin/com/ninecraft/booket/convention/Plugins.kt, build.gradle.kts
KOTLIN_ANDROID 상수 제거 및 루트 빌드 파일에서 kotlin-android 플러그인 선언 제거.
Annotation Target Updates
core/common/src/main/kotlin/com/ninecraft/booket/core/common/utils/UiText.kt, core/datastore/impl/src/main/kotlin/com/ninecraft/booket/core/datastore/impl/datasource/Default*DataSource.kt, core/ocr/src/main/kotlin/com/ninecraft/booket/core/ocr/recognizer/CloudOcrRecognizer.kt, feature/screens/src/main/kotlin/com/ninecraft/booket/feature/screens/component/MainTab.kt
생성자 파라미터 주석을 필드 레벨에서 @param: 타겟으로 변경.
Uri Construction Update
core/common/src/main/kotlin/com/ninecraft/booket/core/common/extensions/Context.kt
toUri 확장 함수 대신 직접 Uri.parse 호출로 변경.
Unused Import Removal
build-logic/src/main/kotlin/AndroidRetrofitConventionPlugin.kt
사용하지 않는 임포트 5개 제거.
Dependency & Gradle Wrapper Updates
gradle/libs.versions.toml, gradle/wrapper/gradle-wrapper.properties
AGP 8.12.3 → 9.0.0, Gradle 8.14.1 → 9.1.0 업그레이드. 10개 라이브러리 버전 업데이트 및 kotlin-android 플러그인 선언 제거.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 AGP 9.0으로 도약하며
낡은 억제 주석은 안녕
새로운 API로 우아해진 빌드
플러그인 간소화에 시스템 경쾌
래퍼와 의존성 함께 춤을 춘다 ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed PR title accurately describes the main change: AGP 9.0.0 migration with clear, concise phrasing aligned with the changeset.
Linked Issues check ✅ Passed Code changes fully implement AGP 9.0.0 migration objectives: plugin removal, DSL type updates, suppression elimination, and API replacements per issue #258.
Out of Scope Changes check ✅ Passed All changes are directly related to AGP 9.0.0 migration. Version updates in gradle/libs.versions.toml align with AGP 9 compatibility.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch BOOK-494-chore/#258

Important

Action Needed: IP Allowlist Update

If your organization protects your Git platform with IP whitelisting, please add the new CodeRabbit IP address to your allowlist:

  • 136.113.208.247/32 (new)
  • 34.170.211.100/32
  • 35.222.179.152/32

Failure to add the new IP will result in interrupted reviews.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Fix all issues with AI agents
In `@build-logic/src/main/kotlin/com/ninecraft/booket/convention/Android.kt`:
- Around line 7-18: The Android configuration sets Java
sourceCompatibility/targetCompatibility in configureAndroid (CommonExtension ->
compileOptions using ApplicationConstants.javaVersion) but doesn't align
Kotlin's jvmTarget; add a Kotlin compile task config after the
compileOptions.apply block to set the Kotlin jvmTarget to the same Java version
(use tasks.withType<KotlinCompile>().configureEach and
compilerOptions.jvmTarget.set(JvmTarget.JVM_17> or derive from
ApplicationConstants.javaVersion) so Kotlin bytecode matches Java.

In `@build-logic/src/main/kotlin/com/ninecraft/booket/convention/Compose.kt`:
- Around line 20-29: The ComposeCompilerGradlePluginExtension DSL is always
setting metricsDestination and reportsDestination (metricsDestination,
reportsDestination, includeSourceInformation) which conflicts with the
compiler-arg toggles implemented in buildComposeMetricsParameters()
(enableComposeComposeCompilerMetrics, enableComposeCompilerReports) and leads to
duplicated/uneven paths; make the DSL destinations conditional or unify the
paths: check the boolean gradle properties (enableComposeComposeCompilerMetrics
and enableComposeCompilerReports) before calling
extensions.configure<ComposeCompilerGradlePluginExtension> to set
metricsDestination.file("build/composeMetrics") and
reportsDestination.file("build/composeReports"), or alternatively use the same
path values produced by buildComposeMetricsParameters() so they are consistent
(ensure symbols referenced: ComposeCompilerGradlePluginExtension,
includeSourceInformation, metricsDestination, reportsDestination,
buildComposeMetricsParameters, enableComposeComposeCompilerMetrics,
enableComposeCompilerReports).

In `@gradle/libs.versions.toml`:
- Around line 54-55: 현재 gradle/libs.versions.toml에서 androidx-credentials =
"1.6.0-rc01"로 릴리스 후보(RC)를 사용하고 있는데, 의도된 결정인지 확인하고 필요시 안정 버전으로 롤백하세요; 확인 방법은
프로젝트에서 androidx-credentials가 제공하는 특정 기능/버그픽스(또는 릴리스 노트)를 참조해
"androidx-credentials" 1.6.0-rc01 사용 이유를 명시하고, 의도된 경우 PR 설명에 그 사유를 추가하거나 그렇지 않으면
값을 "1.5.0"처럼 최신 안정판 버전으로 변경하세요.

Comment on lines +7 to 18
internal fun Project.configureAndroid(extension: CommonExtension) {
extension.apply {
compileSdk = libs.versions.compileSdk.get().toInt()

defaultConfig {
defaultConfig.apply {
minSdk = libs.versions.minSdk.get().toInt()
}

compileOptions {
compileOptions.apply {
sourceCompatibility = ApplicationConstants.javaVersion
targetCompatibility = ApplicationConstants.javaVersion
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

# Find and examine ApplicationConstants file
fd -t f "ApplicationConstants" --type f

Repository: YAPP-Github/Reed-Android

Length of output: 151


🏁 Script executed:

# Search for javaVersion definition
rg -t kotlin "javaVersion" -A 2 -B 2

Repository: YAPP-Github/Reed-Android

Length of output: 1696


🌐 Web query:

AGP 9 default Kotlin jvmTarget compatibility

💡 Result:

  • AGP 9.0 uses “built-in Kotlin” and depends on Kotlin Gradle Plugin (KGP) ≥ 2.2.10. If your declared KGP is lower, AGP will auto-upgrade it. [1]
  • Kotlin’s default jvmTarget is still 1.8 (if you don’t set it, it effectively compiles to Java 8 bytecode). [3][4]
  • AGP 9 changes the default Java sourceCompatibility/targetCompatibility to Java 11, so an “unconfigured” project can end up with Java = 11 but Kotlin = 1.8, which is an incompatible mix. [1][3]

Recommended fix (keep Kotlin/Java targets aligned): configure a Java toolchain (preferred), which (if you don’t explicitly set Kotlin jvmTarget) will also make Kotlin target the toolchain version. [3][5]

java {
  toolchain { languageVersion.set(JavaLanguageVersion.of(17)) } // or 11
}
// If you set it explicitly, keep it the same as the toolchain:
kotlin {
  compilerOptions { jvmTarget.set(org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17) } // or JVM_11
}

Sources: AGP 9 release notes [1], Kotlin Gradle docs on defaults/toolchains [3], Kotlin jvmTarget API reference [4], Android “Java versions in Android builds” guidance [5].


Kotlin jvmTarget을 Java 버전과 명시적으로 일치시키세요.

현재 코드는 sourceCompatibilitytargetCompatibility를 Java 17로 설정하지만, Kotlin의 기본 jvmTarget은 1.8로 유지됩니다. 이로 인해 Java와 Kotlin 바이트코드 버전이 불일치하게 됩니다. compileOptions.apply 블록 아래에 Kotlin 컴파일 옵션을 추가하여 jvmTarget을 명시적으로 설정하세요:

tasks.withType<KotlinCompile>().configureEach {
    compilerOptions.jvmTarget.set(JvmTarget.JVM_17)
}

또는 Java 도구체인을 설정하면 Kotlin이 자동으로 따르게 됩니다.

🤖 Prompt for AI Agents
In `@build-logic/src/main/kotlin/com/ninecraft/booket/convention/Android.kt`
around lines 7 - 18, The Android configuration sets Java
sourceCompatibility/targetCompatibility in configureAndroid (CommonExtension ->
compileOptions using ApplicationConstants.javaVersion) but doesn't align
Kotlin's jvmTarget; add a Kotlin compile task config after the
compileOptions.apply block to set the Kotlin jvmTarget to the same Java version
(use tasks.withType<KotlinCompile>().configureEach and
compilerOptions.jvmTarget.set(JvmTarget.JVM_17> or derive from
ApplicationConstants.javaVersion) so Kotlin bytecode matches Java.

Comment on lines +20 to +29
extensions.configure<ComposeCompilerGradlePluginExtension> {
includeSourceInformation.set(true)

metricsDestination.file("build/composeMetrics")
reportsDestination.file("build/composeReports")
metricsDestination.file("build/composeMetrics")
reportsDestination.file("build/composeReports")

stabilityConfigurationFiles.addAll(
project.rootProject.layout.projectDirectory.file("stability.config.conf"),
)
}
stabilityConfigurationFiles.addAll(
project.rootProject.layout.projectDirectory.file("stability.config.conf"),
)
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🌐 Web query:

ComposeCompilerGradlePluginExtension metricsDestination reportsDestination official behavior Gradle plugin

💡 Result:

In the Compose compiler Gradle plugin DSL (composeCompiler { ... }), both metricsDestination and reportsDestination are DirectoryProperty outputs that are only produced when you set them (i.e., they opt-in to dumping files). [1]

  • metricsDestination: when specified, the Compose compiler dumps “build metrics” for the current module (including a module.json with stats like processed composables/classes, stable classes/parameters, skippable functions, etc.). For Kotlin Multiplatform, metrics are written under a target/compilation subdirectory layout derived from KotlinTarget.disambiguationClassifier and KotlinCompilation.compilationName (example: <dest>/jvm/main, <dest>/jvm/custom). [2]

  • reportsDestination: when specified, the Compose compiler dumps “build reports” about the compilation, such as which composable functions are skippable, restartable, readonly, etc., useful for manual runtime-performance analysis. [3]

Sources:
[1] ComposeCompilerGradlePluginExtension API page (Kotlin Gradle Plugins API reference) (kotlinlang.org)
[2] metricsDestination API doc (kotlinlang.org)
[3] reportsDestination API doc (kotlinlang.org)

Citations:


🏁 Script executed:

# First, let's read the full Compose.kt file to understand the context
fd "Compose.kt" --type f | head -5

Repository: YAPP-Github/Reed-Android

Length of output: 138


🏁 Script executed:

# Search for any gradle property usage related to compose metrics
rg "enableComposeCompilerMetrics|enableComposeCompilerReports|metricsDestination|reportsDestination" --type kotlin -A 2 -B 2

Repository: YAPP-Github/Reed-Android

Length of output: 3039


🏁 Script executed:

# Check for gradle.properties or similar configuration files
fd "gradle.properties|local.properties" --type f

Repository: YAPP-Github/Reed-Android

Length of output: 85


🏁 Script executed:

cat -n build-logic/src/main/kotlin/com/ninecraft/booket/convention/Compose.kt

Repository: YAPP-Github/Reed-Android

Length of output: 2909


ComposeCompilerGradlePluginExtension의 DSL 설정과 compiler args의 불일치 수정 필요

현재 코드에서 metricsDestinationreportsDestination은 라인 23-24에서 항상 설정되지만, 실제 gradle 속성(enableComposeComposeCompilerMetrics, enableComposeCompilerReports)은 buildComposeMetricsParameters() 내 compiler args에만 적용됩니다. DSL에서 destination을 설정하면 공식 문서에 따라 파일 생성이 활성화되므로, 현재 구조는 gradle 속성의 toggle 의도와 맞지 않습니다. 또한 DSL 경로(build/composeMetrics)와 compiler args 경로(compose-metrics/relative/path)가 다르므로 중복 생성 가능성도 있습니다.

DSL 설정을 gradle 속성에 따라 조건부로 적용하거나, 경로를 통일하는 것이 필요합니다.

조건부 설정 예시
 extensions.configure<ComposeCompilerGradlePluginExtension> {
     includeSourceInformation.set(true)
 
-    metricsDestination.file("build/composeMetrics")
-    reportsDestination.file("build/composeReports")
+    val enableMetrics = project.providers
+        .gradleProperty("enableComposeCompilerMetrics")
+        .orNull == "true"
+    if (enableMetrics) {
+        metricsDestination.file("build/composeMetrics")
+    }
+
+    val enableReports = project.providers
+        .gradleProperty("enableComposeCompilerReports")
+        .orNull == "true"
+    if (enableReports) {
+        reportsDestination.file("build/composeReports")
+    }
 
     stabilityConfigurationFiles.addAll(
         project.rootProject.layout.projectDirectory.file("stability.config.conf"),
     )
 }
🤖 Prompt for AI Agents
In `@build-logic/src/main/kotlin/com/ninecraft/booket/convention/Compose.kt`
around lines 20 - 29, The ComposeCompilerGradlePluginExtension DSL is always
setting metricsDestination and reportsDestination (metricsDestination,
reportsDestination, includeSourceInformation) which conflicts with the
compiler-arg toggles implemented in buildComposeMetricsParameters()
(enableComposeComposeCompilerMetrics, enableComposeCompilerReports) and leads to
duplicated/uneven paths; make the DSL destinations conditional or unify the
paths: check the boolean gradle properties (enableComposeComposeCompilerMetrics
and enableComposeCompilerReports) before calling
extensions.configure<ComposeCompilerGradlePluginExtension> to set
metricsDestination.file("build/composeMetrics") and
reportsDestination.file("build/composeReports"), or alternatively use the same
path values produced by buildComposeMetricsParameters() so they are consistent
(ensure symbols referenced: ComposeCompilerGradlePluginExtension,
includeSourceInformation, metricsDestination, reportsDestination,
buildComposeMetricsParameters, enableComposeComposeCompilerMetrics,
enableComposeCompilerReports).

Comment on lines +54 to +55
androidx-credentials = "1.6.0-rc01"
googleid = "1.2.0"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🌐 Web query:

androidx credentials latest stable version

💡 Result:

Latest stable AndroidX Credentials (Credential Manager) version is 1.5.0 (artifacts: androidx.credentials:credentials and androidx.credentials:credentials-play-services-auth). [1]

dependencies {
  implementation("androidx.credentials:credentials:1.5.0")
  implementation("androidx.credentials:credentials-play-services-auth:1.5.0")
}

androidx-credentials RC 버전 사용 의도 확인

현재 1.6.0-rc01(릴리스 후보)을 사용 중인데, 최신 안정판은 1.5.0입니다. RC 버전을 사용하면 안정성 측면에서 릴리스 리스크가 증가할 수 있습니다. RC 사용이 특정 기능이나 버그 수정이 필요한 의도된 결정인지 확인 부탁드립니다.

🤖 Prompt for AI Agents
In `@gradle/libs.versions.toml` around lines 54 - 55, 현재
gradle/libs.versions.toml에서 androidx-credentials = "1.6.0-rc01"로 릴리스 후보(RC)를
사용하고 있는데, 의도된 결정인지 확인하고 필요시 안정 버전으로 롤백하세요; 확인 방법은 프로젝트에서 androidx-credentials가
제공하는 특정 기능/버그픽스(또는 릴리스 노트)를 참조해 "androidx-credentials" 1.6.0-rc01 사용 이유를 명시하고,
의도된 경우 PR 설명에 그 사유를 추가하거나 그렇지 않으면 값을 "1.5.0"처럼 최신 안정판 버전으로 변경하세요.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BOOK-494/chore] AGP 9.0 마이그레이션

2 participants