From 5175fa46ea79a3da9ac0de37e3a0049ecbc49140 Mon Sep 17 00:00:00 2001 From: Sangho Kim Date: Sun, 1 Dec 2024 03:04:34 +0900 Subject: [PATCH] =?UTF-8?q?[ADD/#178]=20keyStoreProperties=20=EB=94=94?= =?UTF-8?q?=EB=B2=84=EA=B9=85=20=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/firebase_distribution_builder.yml | 2 +- app/build.gradle.kts | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/firebase_distribution_builder.yml b/.github/workflows/firebase_distribution_builder.yml index bfa9949..0ee5ac7 100644 --- a/.github/workflows/firebase_distribution_builder.yml +++ b/.github/workflows/firebase_distribution_builder.yml @@ -59,7 +59,6 @@ jobs: run: | echo "$keystore_file" > app/gentiKeyStore.b64 base64 -d -i app/gentiKeyStore.b64 > app/gentiKeyStore.jks - echo "KEYSTORE_PATH=/home/runner/work/Genti-Android/Genti-Android/app/gentiKeyStore.jks" >> $GITHUB_ENV - name: Access Keystore Properties env: @@ -67,6 +66,7 @@ jobs: key_password: ${{ secrets.KEY_PASSWORD }} key_alias: ${{ secrets.KEY_ALIAS }} run: | + echo "storeFile=gentiKeyStore.jks" > keystore.properties echo "storePassword=\"$store_password\"" >> keystore.properties echo "keyAlias=\"$key_alias\"" >> keystore.properties echo "keyPassword=\"$key_password\"" >> keystore.properties diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 1cecea5..e456f4b 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -21,12 +21,18 @@ android { val keystorePropertiesFile = rootProject.file("keystore.properties") val keystoreProperties = Properties() if (keystorePropertiesFile.exists()) { + println("keystore.properties 파일이 존재합니다: ${keystorePropertiesFile.absolutePath}") keystoreProperties.load(keystorePropertiesFile.inputStream()) + println("keystore.properties 파일 로드 성공!") + println("storePassword: ${keystoreProperties["storePassword"]}") + println("keyAlias: ${keystoreProperties["keyAlias"]}") + println("keyPassword: ${keystoreProperties["keyPassword"]}") + } else { + println("keystore.properties 파일이 존재하지 않습니다: ${keystorePropertiesFile.absolutePath}") } signingConfigs { create("release") { - val keystorePath = System.getenv("KEYSTORE_PATH") ?: "${rootDir}/app/gentiKeyStore.jks" - storeFile = file(keystorePath) + storeFile = file(keystoreProperties["storeFile"] as String) storePassword = keystoreProperties["storePassword"] as String keyAlias = keystoreProperties["keyAlias"] as String keyPassword = keystoreProperties["keyPassword"] as String