Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions build-logic/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ dependencies {
implementation(libs.android.gradle.plugin)
implementation(libs.kotlin.gradle.plugin)
implementation(libs.hilt.gradle.plugin)
implementation(libs.kotlin.compose.compiler.gradle.plugin)
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,51 @@ package com.into.websoso

import com.android.build.api.dsl.ApplicationDefaultConfig
import com.android.build.api.dsl.BuildType
import com.android.build.gradle.internal.cxx.configure.gradleLocalProperties
import java.io.File
import java.util.Properties

/**
* local.properties를 읽는 함수
*/
fun getLocalProperties(rootDir: File): Properties {
val properties = Properties()
val localPropertiesFile = File(rootDir, "local.properties")
if (localPropertiesFile.exists()) {
localPropertiesFile.inputStream().use { properties.load(it) }
}
return properties
}

fun ApplicationDefaultConfig.buildConfigs(
rootDir: File,
block: BuildConfigScope.() -> Unit,
) {
val properties = gradleLocalProperties(rootDir)
val properties = getLocalProperties(rootDir)
BuildConfigScope { name, key ->
val value = properties.getProperty(key)
buildConfigField("String", name, value)
val rawValue = properties.getProperty(key) ?: ""
val cleanedValue = rawValue.removeSurrounding("\"")

buildConfigField("String", name, "\"$cleanedValue\"")
}.apply(block)
Comment on lines +24 to 30

Copy link
Copy Markdown

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:

cat -n "build-logic/src/main/kotlin/com/into/websoso/BuildConfigExtensions.kt"

Repository: Team-WSS/WSS-Android

Length of output: 1954


🏁 Script executed:

# local.properties 파일 검색
fd -t f "local.properties" -o "local.properties.example"

Repository: Team-WSS/WSS-Android

Length of output: 231


🏁 Script executed:

# git history에서 이전 버전 확인
git log --oneline -n 20 -- "build-logic/src/main/kotlin/com/into/websoso/BuildConfigExtensions.kt"

Repository: Team-WSS/WSS-Android

Length of output: 87


🏁 Script executed:

# trim('"')과 관련된 코드 검색
rg "trim.*\(" "build-logic/src/main/kotlin/com/into/websoso/"

Repository: Team-WSS/WSS-Android

Length of output: 200


🏁 Script executed:

git show --stat 5a46a944

Repository: Team-WSS/WSS-Android

Length of output: 50376


🏁 Script executed:

git show 5a46a944 -- "build-logic/src/main/kotlin/com/into/websoso/BuildConfigExtensions.kt"

Repository: Team-WSS/WSS-Android

Length of output: 2066


🏁 Script executed:

# 코드에서 실제로 다른 처리 방식 확인
rg "removeSurrounding|trim" "build-logic/src/main/kotlin/com/into/websoso/BuildConfigExtensions.kt"

Repository: Team-WSS/WSS-Android

Length of output: 250


🏁 Script executed:

# 이 파일을 사용하는 곳에서 local.properties 형식 확인
rg "buildConfigs|getLocalProperty" --type kotlin -A 2 -B 2 | head -50

Repository: Team-WSS/WSS-Android

Length of output: 2861


파일 내 따옴표 처리 방식의 불일치를 수정하세요.

이 파일은 새로 추가되었으나, buildConfigs() 함수들(라인 27, 40)에서는 removeSurrounding("\"") 를 사용하고, getLocalProperty() 함수(라인 49)에서는 trim('"')를 사용하고 있습니다. 두 방식의 동작이 다르므로 일관된 방식으로 통일해야 합니다.

  • removeSurrounding("\""): 양쪽 모두 따옴표로 감싸진 경우만 제거
  • trim('"'): 앞뒤 따옴표 문자를 모두 제거 (불완전한 따옴표 처리 가능)
🤖 Prompt for AI Agents
In @build-logic/src/main/kotlin/com/into/websoso/BuildConfigExtensions.kt around
lines 24 - 30, The code uses two different quote-stripping behaviors; unify them
by choosing one approach and applying it consistently: either replace
removeSurrounding("\"") in the buildConfigs() implementations with trim('"') to
allow trimming unmatched quotes, or change getLocalProperty() to use
removeSurrounding("\"") if you want to only drop enclosing pairs; update all
occurrences (buildConfigs(), getLocalProperty(), and any other helpers) to the
chosen method so quote handling is consistent across BuildConfigExtensions.kt.

}

fun BuildType.buildConfigs(
rootDir: File,
block: BuildConfigScope.() -> Unit,
) {
val properties = gradleLocalProperties(rootDir)
val properties = getLocalProperties(rootDir)
BuildConfigScope { name, key ->
val value = properties.getProperty(key)
buildConfigField("String", name, value)
val rawValue = properties.getProperty(key) ?: ""
val cleanedValue = rawValue.removeSurrounding("\"")

buildConfigField("String", name, "\"$cleanedValue\"")
}.apply(block)
}

fun getLocalProperty(
rootDir: File,
key: String,
): String = gradleLocalProperties(rootDir).getProperty(key).trim('"')
): String = getLocalProperties(rootDir).getProperty(key).trim('"')

fun interface BuildConfigScope {
fun string(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ fun Project.setNamespace(name: String) {
}
}

internal val Project.applicationExtension: CommonExtension<*, *, *, *, *>
internal val Project.applicationExtension: CommonExtension<*, *, *, *, *, *>
get() = extensions.getByType<ApplicationExtension>()

internal val Project.libraryExtension: CommonExtension<*, *, *, *, *>
internal val Project.libraryExtension: CommonExtension<*, *, *, *, *, *>
get() = extensions.getByType<LibraryExtension>()

internal val Project.androidExtension: CommonExtension<*, *, *, *, *>
internal val Project.androidExtension: CommonExtension<*, *, *, *, *, *>
get() = runCatching { libraryExtension }
.recoverCatching { applicationExtension }
.onFailure { println("Could not find Library or Application extension from this project") }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
import com.into.websoso.androidExtension
import com.into.websoso.websosoDependencies

plugins {
id("org.jetbrains.kotlin.plugin.compose")
}

androidExtension.apply {
buildFeatures.compose = true
composeOptions.kotlinCompilerExtensionVersion = "1.5.2"
}

websosoDependencies {
Expand Down
1 change: 1 addition & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ plugins {
alias(libs.plugins.kotlin.kapt) apply false
alias(libs.plugins.ktlint)
alias(libs.plugins.android.library) apply false
alias(libs.plugins.compose.compiler) apply false
}
61 changes: 31 additions & 30 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,72 +4,72 @@ versionCode = "10041"
versionName = "1.4.0"

# Gradle Plugin & Kotlin
android-gradle-plugin = "8.1.3"
kotlin = "1.9.0"
serialization = "1.5.1"
android-gradle-plugin = "8.13.2"
kotlin = "2.2.0"
serialization = "1.9.0"
Comment on lines +7 to +9

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🌐 Web query:

Android Gradle Plugin 8.13.2 release notes Kotlin 2.2.0 compatibility

💡 Result:

Short answer: AGP 8.13.2 is not officially compatible with Kotlin 2.2.0. The Kotlin compatibility table indicates Kotlin 2.2.0–2.2.10 is supported up to AGP 8.10.0; AGP 8.13.x targets Kotlin 2.3+. Recommend upgrading Kotlin to 2.3+ or downgrading AGP to ≤8.10 if you must stay on Kotlin 2.2.0. [1][2]

Sources:
[1] Android Gradle plugin 8.13.2 release notes — Android Developers.
[2] Kotlin Multiplatform / version compatibility table — Kotlin documentation.


🌐 Web query:

Kotlin 2.2.0 release notes breaking changes

💡 Result:

Key breaking changes in Kotlin 2.2.0 (summary):

  • Language versions < 1.8 no longer supported: the compiler drops support for -language-version=1.6 and 1.7 (feature sets older than 1.8 aren’t supported). [1]
  • JVM default-method generation changed: interface functions are compiled to JVM default methods by default (new stable -jvm-default option replaces -Xjvm-default; modes: enable (default), no-compatibility, disable). This affects bytecode and binary compatibility/bridges. [1]
  • Gradle DSL change: kotlinOptions { } is now an error; migrate to compilerOptions { } (Gradle DSL for compiler options changed). [1]
  • Ant support deprecated (planned removal in a future 2.3.0): Ant build integration is deprecated. [1]
  • Scripting focus narrowed: changes/deprecations to Kotlin scripting support (migration for some script use-cases). [1]

Sources: Kotlin “What’s new in 2.2.0” and Kotlin Blog announcement. [1][2]

References
[1] Kotlin — What’s new in Kotlin 2.2.0 (release notes / breaking changes).
[2] Kotlin Blog — “Kotlin 2.2.0 Released”.


🌐 Web query:

Android Gradle Plugin 8.13.2 stability requirements

💡 Result:

Short answer: AGP 8.13.2 requires Gradle 8.13 (minimum) and a JDK 17 runtime to run builds. Use the matching Gradle wrapper (gradle 8.13) and ensure your Gradle/IDE JDK (or org.gradle.java.home) points to JDK 17. [1][2]

Sources:

  • Android Gradle plugin release notes (AGP 8.13 → minimum Gradle 8.13). [1]
  • Java versions in Android builds (AGP 8.x requires JDK 17). [2]

Android Gradle Plugin 8.13.2와 Kotlin 2.2.0는 호환되지 않습니다. 즉시 해결이 필요합니다.

공식 호환성 테이블에 따르면 Kotlin 2.2.0–2.2.10은 AGP 8.10.0까지만 지원되며, AGP 8.13.x는 Kotlin 2.3 이상을 요구합니다. 현재 구성은 컴파일 오류나 런타임 문제를 유발할 수 있습니다. Kotlin을 2.3 이상으로 업그레이드하거나, 반드시 Kotlin 2.2.0을 사용해야 한다면 AGP를 8.10 이하로 다운그레이드하세요.

추가로 Kotlin 2.2.0의 주요 변경 사항도 확인이 필요합니다:

  • kotlinOptions { } DSL이 더 이상 작동하지 않음 (반드시 compilerOptions { }로 마이그레이션 필요)
  • JVM 기본 메서드 생성 방식 변경으로 인한 바이너리 호환성 영향
  • Kotlin 1.8 미만의 언어 버전 지원 중단
🤖 Prompt for AI Agents
In @gradle/libs.versions.toml around lines 7 - 9, 현재 gradle/libs.versions.toml의
android-gradle-plugin, kotlin, serialization 버전 조합이 호환되지 않습니다:
android-gradle-plugin = "8.13.2"은 Kotlin 2.3 이상을 요구하므로 kotlin = "2.2.0"을 즉시
업그레이드하거나 AGP를 8.10 이하로 내리세요; 구체적으로 libs.versions.toml의 kotlin 항목(kotlin) 값을
2.3.x 이상으로 올리거나 android-gradle-plugin 항목(android-gradle-plugin)을 8.10.x 이하로
다운그레이드하고, 변경 후 빌드 스크립트에서 kotlinOptions → compilerOptions 마이그레이션 필요 여부와 바이너리 호환성
영향을 점검하세요.


# Dependency Injection
hilt = "2.48"
hilt-navigation-compose = "1.2.0"
dagger = "2.56.1"
hilt = "2.57.2"
hilt-navigation-compose = "1.3.0"
dagger = "2.57.2"
javax-inject = "1"

# Firebase
google-services = "4.4.2"
firebase-bom = "33.7.0"
google-services = "4.4.4"
firebase-bom = "34.7.0"

# Analytics
amplitude = "1.+"

# AndroidX Libraries
androidx = "1.9.0"
appcompat = "1.6.1"
material = "1.11.0"
constraintlayout = "2.1.4"
viewpager2 = "1.0.0"
fragment-ktx = "1.6.1"
androidx = "1.15.0"
appcompat = "1.7.1"
material = "1.13.0"
constraintlayout = "2.2.1"
viewpager2 = "1.1.0"
fragment-ktx = "1.8.5"
lifecycle-extensions = "2.2.0"
datastore-preferences = "1.1.1"
security-crypto = "1.1.0-alpha06"
room = "2.6.1"
datastore-preferences = "1.2.0"
security-crypto = "1.1.0"
room = "2.8.4"
paging = "3.3.6"

# Testing Libraries
junit = "4.13.2"
androidx-test-junit = "1.1.5"
espresso-core = "3.5.1"
androidx-test-junit = "1.3.0"
espresso-core = "3.7.0"

# Networking Libraries
retrofit = "2.11.0"
retrofit = "3.0.0"
retrofit-kotlinx-serialization = "1.0.0"
okhttp = "4.11.0"
okhttp-logging-interceptor = "4.10.0"
okhttp = "5.3.2"
okhttp-logging-interceptor = "5.3.2"

# Coroutines
coroutines = "1.6.4"
coroutines = "1.10.2"

# Image Loading Libraries
coil = "2.7.0"
coil-transformers = "1.0.6"

# Misc UI Libraries
dots-indicator = "5.0"
lottie = "5.0.2"
dots-indicator = "5.1.0"
lottie = "6.7.1"
pull-to-refresh = "1.5.2"

# Social Login Libraries
kakao = "2.15.0"
kakao = "2.23.1"

# Ktlint
ktlint = "12.1.0"
ktlint = "14.0.1"

# Jetpack Compose Libraries
compose-bom = "2024.12.01"
compose-compiler = "1.5.2"
compose-ui = "1.7.6"
compose-bom = "2025.12.01"
compose-ui = "1.10.0"

[plugins]
android-application = { id = "com.android.application", version.ref = "android-gradle-plugin" }
compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
kotlin-kapt = { id = "org.jetbrains.kotlin.kapt", version.ref = "kotlin" }
Expand All @@ -85,6 +85,7 @@ android-library = { id = "com.android.library", version.ref = "android-gradle-pl
android-gradle-plugin = { group = "com.android.tools.build", name = "gradle", version.ref = "android-gradle-plugin" }
kotlin-gradle-plugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" }
hilt-gradle-Plugin = { group = "com.google.dagger", name = "hilt-android-gradle-plugin", version.ref = "hilt" }
kotlin-compose-compiler-gradle-plugin = { group = "org.jetbrains.kotlin", name = "compose-compiler-gradle-plugin", version.ref = "kotlin" }

# AndroidX Libraries
androidx-core-ktx = { module = "androidx.core:core-ktx", version.ref = "androidx" }
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Sun Mar 10 17:48:02 KST 2024
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading