Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

keystore 공유를 위한 설정 #92

Merged
merged 3 commits into from
Nov 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .github/workflows/android-pull-request-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,13 @@ jobs:
run: chmod +x gradlew

- 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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

여기 오타 발견했어욥 !! keystore.properties 가 아니라 debug.keystore 로 바꿔야할 것 같습니당

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

엥 그러네요 왜 발견은 못 했지...?

echo "$KEYSTORE_PROPERTIES" > keystore.properties
./gradlew testDebugUnitTest --stacktrace

- name: Publish Test Results
if: always()
Expand Down
1 change: 1 addition & 0 deletions android/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ render.experimental.xml
# Keystore files
*.jks
*.keystore
keystore.properties

# Google Services (e.g. APIs or Firebase)
google-services.json
Expand Down
16 changes: 16 additions & 0 deletions android/app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
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)
alias(libs.plugins.org.jetbrains.kotlin.android)
id("catchytape.android.hilt")
}

val keystorePropertiesFile = rootProject.file("keystore.properties")
val keystoreProperties = Properties()
keystoreProperties.load(FileInputStream(keystorePropertiesFile))

android {
namespace = "com.ohdodok.catchytape"
compileSdk = 33
Expand All @@ -19,6 +26,15 @@ android {
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}

signingConfigs {
getByName("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
Expand Down
Loading