From 84c67b190350dbf93a0862a471fdf724f932fe64 Mon Sep 17 00:00:00 2001 From: algosketch Date: Wed, 15 Nov 2023 18:04:26 +0900 Subject: [PATCH 1/3] =?UTF-8?q?chore=20:=20debug=20=ED=82=A4=EC=8A=A4?= =?UTF-8?q?=ED=86=A0=EC=96=B4=20=EA=B0=80=EC=A0=B8=EC=99=80=EC=84=9C=20?= =?UTF-8?q?=EB=B9=8C=EB=93=9C=ED=95=98=EB=8F=84=EB=A1=9D=20=EC=84=A4?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- android/.gitignore | 1 + android/app/build.gradle.kts | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/android/.gitignore b/android/.gitignore index 99d1577..69d858d 100644 --- a/android/.gitignore +++ b/android/.gitignore @@ -24,6 +24,7 @@ render.experimental.xml # Keystore files *.jks *.keystore +keystore.properties # Google Services (e.g. APIs or Firebase) google-services.json diff --git a/android/app/build.gradle.kts b/android/app/build.gradle.kts index df1114b..dcdec89 100644 --- a/android/app/build.gradle.kts +++ b/android/app/build.gradle.kts @@ -1,3 +1,6 @@ +import java.util.Properties +import java.io.FileInputStream + @Suppress("DSL_SCOPE_VIOLATION") // TODO: Remove once KTIJ-19369 is fixed plugins { alias(libs.plugins.com.android.application) @@ -5,6 +8,10 @@ plugins { id("catchytape.android.hilt") } +val keystorePropertiesFile = rootProject.file("keystore.properties") +val keystoreProperties = Properties() +keystoreProperties.load(FileInputStream(keystorePropertiesFile)) + android { namespace = "com.ohdodok.catchytape" compileSdk = 33 @@ -19,6 +26,15 @@ android { testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" } + signingConfigs { + create("debug") { + keyAlias = keystoreProperties["debug.keyAlias"] as String + keyPassword = keystoreProperties["debug.keyPassword"] as String + storeFile = file(keystoreProperties["debug.storeFile"] as String) + storePassword = keystoreProperties["debug.storePassword"] as String + } + } + buildTypes { release { isMinifyEnabled = false From 7bc61b238b3c66e5ec9901ae68ffb060a244fad8 Mon Sep 17 00:00:00 2001 From: algosketch Date: Wed, 15 Nov 2023 18:22:00 +0900 Subject: [PATCH 2/3] =?UTF-8?q?chore=20:=20GitHub=20Actions=EC=97=90?= =?UTF-8?q?=EC=84=9C=20debug=20keystore=20=EB=B6=88=EB=9F=AC=EC=98=A4?= =?UTF-8?q?=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/android-pull-request-ci.yml | 2 ++ android/app/build.gradle.kts | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/android-pull-request-ci.yml b/.github/workflows/android-pull-request-ci.yml index 2fd39fc..3bee96b 100644 --- a/.github/workflows/android-pull-request-ci.yml +++ b/.github/workflows/android-pull-request-ci.yml @@ -30,6 +30,8 @@ jobs: - name: Grant execute permission for gradlew run: chmod +x gradlew + - run: echo $DEBUG_KEYSTORE | base64 -d > keystore.properties + - name: Run unit tests run: ./gradlew testDebugUnitTest --stacktrace diff --git a/android/app/build.gradle.kts b/android/app/build.gradle.kts index dcdec89..bfd4a9d 100644 --- a/android/app/build.gradle.kts +++ b/android/app/build.gradle.kts @@ -27,7 +27,7 @@ android { } signingConfigs { - create("debug") { + getByName("debug") { keyAlias = keystoreProperties["debug.keyAlias"] as String keyPassword = keystoreProperties["debug.keyPassword"] as String storeFile = file(keystoreProperties["debug.storeFile"] as String) From 4f6d60158a9e5b7a4568384f0c5e72bb965cfded Mon Sep 17 00:00:00 2001 From: algosketch Date: Wed, 15 Nov 2023 22:00:44 +0900 Subject: [PATCH 3/3] =?UTF-8?q?chore=20:=20GitHub=20Actions=EC=97=90?= =?UTF-8?q?=EC=84=9C=20keystore.properties=20=EB=B6=88=EB=9F=AC=EC=98=A4?= =?UTF-8?q?=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/android-pull-request-ci.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/android-pull-request-ci.yml b/.github/workflows/android-pull-request-ci.yml index 3bee96b..11f050a 100644 --- a/.github/workflows/android-pull-request-ci.yml +++ b/.github/workflows/android-pull-request-ci.yml @@ -30,10 +30,14 @@ jobs: - name: Grant execute permission for gradlew run: chmod +x gradlew - - run: echo $DEBUG_KEYSTORE | base64 -d > keystore.properties - - name: Run unit tests - run: ./gradlew testDebugUnitTest --stacktrace + env: + DEBUG_KEYSTORE: ${{ secrets.DEBUG_KEYSTORE }} + KEYSTORE_PROPERTIES: ${{ secrets.KEYSTORE_PROPERTIES }} + run: | + echo "$DEBUG_KEYSTORE" | base64 -d > keystore.properties + echo "$KEYSTORE_PROPERTIES" > keystore.properties + ./gradlew testDebugUnitTest --stacktrace - name: Publish Test Results if: always()