- key.properties(있으면) 로 릴리스 서명, 없으면 디버그 폴백 - 키스토어/key.properties 는 gitignore (커밋 금지) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -99,3 +99,8 @@ app/src/main/assets/public
|
|||||||
app/src/main/assets/capacitor.config.json
|
app/src/main/assets/capacitor.config.json
|
||||||
app/src/main/assets/capacitor.plugins.json
|
app/src/main/assets/capacitor.plugins.json
|
||||||
app/src/main/res/xml/config.xml
|
app/src/main/res/xml/config.xml
|
||||||
|
|
||||||
|
# 릴리스 서명 (절대 커밋 금지)
|
||||||
|
*.jks
|
||||||
|
*.keystore
|
||||||
|
key.properties
|
||||||
|
|||||||
@@ -1,5 +1,13 @@
|
|||||||
apply plugin: 'com.android.application'
|
apply plugin: 'com.android.application'
|
||||||
|
|
||||||
|
// 릴리스 서명: android/key.properties 가 있으면 사용, 없으면 디버그 서명으로 폴백.
|
||||||
|
def keystorePropsFile = rootProject.file("key.properties")
|
||||||
|
def keystoreProps = new Properties()
|
||||||
|
if (keystorePropsFile.exists()) {
|
||||||
|
keystoreProps.load(new FileInputStream(keystorePropsFile))
|
||||||
|
}
|
||||||
|
def hasReleaseKeystore = keystorePropsFile.exists()
|
||||||
|
|
||||||
android {
|
android {
|
||||||
namespace = "kr.sblog.slimbudget"
|
namespace = "kr.sblog.slimbudget"
|
||||||
compileSdk = rootProject.ext.compileSdkVersion
|
compileSdk = rootProject.ext.compileSdkVersion
|
||||||
@@ -16,8 +24,20 @@ android {
|
|||||||
ignoreAssetsPattern = '!.svn:!.git:!.ds_store:!*.scc:.*:!CVS:!thumbs.db:!picasa.ini:!*~'
|
ignoreAssetsPattern = '!.svn:!.git:!.ds_store:!*.scc:.*:!CVS:!thumbs.db:!picasa.ini:!*~'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
signingConfigs {
|
||||||
|
if (hasReleaseKeystore) {
|
||||||
|
release {
|
||||||
|
storeFile rootProject.file(keystoreProps['storeFile'])
|
||||||
|
storePassword keystoreProps['storePassword']
|
||||||
|
keyAlias keystoreProps['keyAlias']
|
||||||
|
keyPassword keystoreProps['keyPassword']
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
buildTypes {
|
buildTypes {
|
||||||
release {
|
release {
|
||||||
|
// 키스토어가 있으면 릴리스 서명, 없으면 디버그 서명(로컬 테스트용)
|
||||||
|
signingConfig hasReleaseKeystore ? signingConfigs.release : signingConfigs.debug
|
||||||
minifyEnabled false
|
minifyEnabled false
|
||||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user