-
Notifications
You must be signed in to change notification settings - Fork 0
chore: debug, release 앱 환경 분리 #107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
5d006e1
7f78871
eb89b8b
ec06d98
693c615
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,6 +1,7 @@ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| @file:Suppress("INLINE_FROM_HIGHER_PLATFORM") | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import com.android.build.gradle.internal.cxx.configure.gradleLocalProperties | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import java.util.Properties | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| plugins { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| alias(libs.plugins.booket.android.application) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -12,21 +13,47 @@ plugins { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| android { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| namespace = "com.ninecraft.booket" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| defaultConfig { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| buildConfigField("String", "KAKAO_NATIVE_APP_KEY", getApiKey("KAKAO_NATIVE_APP_KEY")) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| manifestPlaceholders["KAKAO_NATIVE_APP_KEY"] = getApiKey("KAKAO_NATIVE_APP_KEY").trim('"') | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| signingConfigs { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| create("release") { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| val propertiesFile = rootProject.file("keystore.properties") | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| val properties = Properties() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| properties.load(propertiesFile.inputStream()) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| storeFile = rootProject.file(properties["STORE_FILE"] as String) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| storePassword = properties["STORE_PASSWORD"] as String | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| keyAlias = properties["KEY_ALIAS"] as String | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| keyPassword = properties["KEY_PASSWORD"] as String | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+16
to
26
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
-val propertiesFile = rootProject.file("keystore.properties")
-val properties = Properties()
-properties.load(propertiesFile.inputStream())
+val propertiesFile = rootProject.file("keystore.properties")
+if (!propertiesFile.exists()) {
+ logger.warn("⚠️ keystore.properties not found – skipping release signing config.")
+ return@create // signingConfig.release 생성 중단
+}
+val properties = Properties().apply {
+ propertiesFile.inputStream().use { load(it) }
+}📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| buildTypes { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| release { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| isMinifyEnabled = false | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| getByName("debug") { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| isDebuggable = true | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| applicationIdSuffix = ".dev" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| manifestPlaceholders += mapOf( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| "appName" to "@string/app_name_dev", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| getByName("release") { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| isDebuggable = false | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| isMinifyEnabled = true | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| isShrinkResources = true | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| signingConfig = signingConfigs.getByName("release") | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| manifestPlaceholders += mapOf( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| "appName" to "@string/app_name", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| proguardFiles( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| getDefaultProguardFile("proguard-android-optimize.txt"), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| "proguard-rules.pro", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| defaultConfig { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| buildConfigField("String", "KAKAO_NATIVE_APP_KEY", getApiKey("KAKAO_NATIVE_APP_KEY")) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| manifestPlaceholders["KAKAO_NATIVE_APP_KEY"] = getApiKey("KAKAO_NATIVE_APP_KEY").trim('"') | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| buildFeatures { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| buildConfig = true | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| <resources> | ||
| <string name="app_name">Reed</string> | ||
| <string name="app_name_dev">Reed.dev</string> | ||
| </resources> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
NPE 위험: 프로퍼티 강제 캐스팅
properties["STORE_FILE"] as String식은 키 누락 시NullPointerException을 유발합니다. 안전한 프로퍼티 조회로 변경해 주세요.📝 Committable suggestion
🤖 Prompt for AI Agents