Skip to content
Merged
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
4 changes: 2 additions & 2 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ android {
applicationId = "com.eatssu.android"
minSdk = 28
targetSdk = 35
versionCode = 44
versionName = "3.1.6"
versionCode = 45
versionName = "3.1.7"
Comment on lines +26 to +27
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

버전 정보를 build.gradle.kts 파일에 직접 하드코딩하기보다 version.properties와 같은 별도 파일로 분리하여 관리하는 것을 권장합니다. 이 방식은 다음과 같은 장점이 있습니다:

  • 버전 정보가 중앙에서 관리되어 명확성이 높아집니다.
  • CI/CD 파이프라인에서 버전을 자동으로 업데이트하기 용이해집니다.
  • 여러 모듈에서 동일한 버전 정보를 참조해야 할 때 유용합니다.

version.properties 파일 예시:

VERSION_NAME=3.1.7
VERSION_CODE=45

build.gradle.kts 적용 예시:

// build.gradle.kts 상단에 추가
val versionProps = java.util.Properties()
project.rootProject.file("version.properties").inputStream().use { versionProps.load(it) }

android {
    defaultConfig {
        // ...
        versionCode = versionProps.getProperty("VERSION_CODE").toInt()
        versionName = versionProps.getProperty("VERSION_NAME")
    }
    // ...
}


testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
Expand Down
Loading