build(android): 릴리스 서명 구성 + AAB - key.properties 기반 서명
CI / build (push) Failing after 14m30s

- key.properties(있으면) 로 릴리스 서명, 없으면 디버그 폴백
- 키스토어/key.properties 는 gitignore (커밋 금지)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
ByungCheol
2026-06-28 17:16:59 +09:00
parent e8dc6b5568
commit db68ea1680
2 changed files with 25 additions and 0 deletions
+5
View File
@@ -99,3 +99,8 @@ app/src/main/assets/public
app/src/main/assets/capacitor.config.json
app/src/main/assets/capacitor.plugins.json
app/src/main/res/xml/config.xml
# 릴리스 서명 (절대 커밋 금지)
*.jks
*.keystore
key.properties
+20
View File
@@ -1,5 +1,13 @@
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 {
namespace = "kr.sblog.slimbudget"
compileSdk = rootProject.ext.compileSdkVersion
@@ -16,8 +24,20 @@ android {
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 {
release {
// 키스토어가 있으면 릴리스 서명, 없으면 디버그 서명(로컬 테스트용)
signingConfig hasReleaseKeystore ? signingConfigs.release : signingConfigs.debug
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}