From ee337eb6fb5205538ceac51b3055b655a5fb78e3 Mon Sep 17 00:00:00 2001 From: omer358 Date: Fri, 23 Aug 2024 05:15:37 +0300 Subject: [PATCH 1/5] add keystore extensions to .gitignore --- .gitignore | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 7ea9ae8..ee00046 100644 --- a/.gitignore +++ b/.gitignore @@ -67,8 +67,8 @@ captures/ # Keystore files # Uncomment the following lines if you do not want to check your keystore files in. -#*.jks -#*.keystore +*.jks +*.keystore # External native build folder generated in Android Studio 2.2 and later .cxx/ From 35ea8cd6d8a402c1690c1ff961b5175aee43e14c Mon Sep 17 00:00:00 2001 From: omer358 Date: Fri, 23 Aug 2024 05:34:50 +0300 Subject: [PATCH 2/5] ignore release folder --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index ee00046..7ea9096 100644 --- a/.gitignore +++ b/.gitignore @@ -30,7 +30,8 @@ bin/ gen/ out/ # Uncomment the following line in case you need and you don't have the release build type files in your app -# release/ +app/release/ +app/release/baselineProfiles/ # Gradle files .gradle/ From 3f00d0a5afe7890a53cd7e9ec2c83c1e8c093dca Mon Sep 17 00:00:00 2001 From: omer358 Date: Fri, 23 Aug 2024 21:55:13 +0300 Subject: [PATCH 3/5] update .gitignore file --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 7ea9096..c5426e0 100644 --- a/.gitignore +++ b/.gitignore @@ -70,6 +70,7 @@ captures/ # Uncomment the following lines if you do not want to check your keystore files in. *.jks *.keystore +/keys/ # External native build folder generated in Android Studio 2.2 and later .cxx/ From 42804f62a88a5522ca1dcbf3c85be64cc928f8a8 Mon Sep 17 00:00:00 2001 From: omer358 Date: Fri, 23 Aug 2024 22:04:47 +0300 Subject: [PATCH 4/5] config signing key for release config --- app/build.gradle.kts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 654291a..281748a 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -10,6 +10,15 @@ plugins { } android { + signingConfigs { + + create("release") { + storeFile = file("$projectDir/keys/keystore.jks") + storePassword = System.getenv("REMEMBER_ME_KEYSTORE_PASSWORD") + keyAlias = System.getenv("REMEMBER_ME_KEYSTORE_ALIAS") + keyPassword = System.getenv("REMEMBER_ME_KEY_PASSWORD") + } + } namespace = "com.example.rememberme" compileSdk = 34 @@ -35,10 +44,14 @@ android { "proguard-rules.pro" ) isDebuggable = false + multiDexEnabled = true + signingConfig = signingConfigs.getByName("release") } debug { isMinifyEnabled = false isDebuggable = true + multiDexEnabled = true + signingConfig = signingConfigs.getByName("debug") } } compileOptions { From e17a0b54ae1054acdf2eabf18f37e73ce2478801 Mon Sep 17 00:00:00 2001 From: omer358 Date: Fri, 23 Aug 2024 22:05:38 +0300 Subject: [PATCH 5/5] config keystore for github actions --- .github/workflows/build_and_deploy_apk.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/workflows/build_and_deploy_apk.yml b/.github/workflows/build_and_deploy_apk.yml index 0797a1c..ce47bc3 100644 --- a/.github/workflows/build_and_deploy_apk.yml +++ b/.github/workflows/build_and_deploy_apk.yml @@ -18,6 +18,21 @@ jobs: distribution: 'zulu' cache: gradle + - name: Set environment variables + run: | + echo "export REMEMBER_ME_KEY_PASSWORD=${{ secrets.REMEMBER_ME_KEY_PASSWORD }}" >> $GITHUB_ENV + echo "export REMEMBER_ME_KEYSTORE_PASSWORD=${{ secrets.E_COMMERCE_KEY_STORE_PASSWORD }}" >> $GITHUB_ENV + + - name: Decrypt Keystore File + env: + RELEASE_KEYSTORE_PHRASE: ${{ secrets.REMEMBER_RELEASE_KEYSTORE }} + RELEASE_KEYSTORE_FILE: ${{ secrets.KEYSTORE_FILE }} + run: | + mkdir keys + echo "$REMEMBER_RELEASE_KEYSTORE" > keys/keystore.jks.asc + echo "$RELEASE_KEYSTORE_PHRASE" > keystore_passphrase.txt + gpg -d --passphrase-file=keystore_passphrase.txt --batch keys/keystore.jks.asc > keys/keystore.jks + - name: Cache Gradle packages uses: actions/cache@v2 with: