Skip to content

Commit

Permalink
Merge pull request #8 from Nexters/feature/add-keystore
Browse files Browse the repository at this point in the history
Feature/add keystore
  • Loading branch information
eshc123 authored Jul 29, 2024
2 parents 0f36db2 + 3fc185a commit e2b8721
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 16 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/android-cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: build-android-app
on:
push:
branches:
- master
workflow_dispatch:

jobs:
build:
runs-on: macos-latest
environment: Android CI/CD

steps:
- uses: actions/checkout@v2

- name: Create LocalProperites
env:
CREDENTIAL_WEB_CLIENT_ID: ${{ secrets.CREDENTIAL_WEB_CLIENT_ID }}
MISSION_MATE_BASE_URL: ${{ secrets.MISSION_MATE_BASE_URL }}
run: |
echo CREDENTIAL_WEB_CLIENT_ID=\"$CREDENTIAL_WEB_CLIENT_ID\" > ./local.properties
echo MISSION_MATE_BASE_URL=\"$MISSION_MATE_BASE_URL\" >> ./local.properties
- name: Generate Keystore file from Github Secrets
env:
KEYSTORE: ${{ secrets.KEYSTORE_BASE64 }}
run: |
echo "$KEYSTORE" > ./mission-mate-keystore.b64
base64 -d -i ./mission-mate-keystore.b64 > ./mission-mate-keystore.jks
- name: Build with Gradle
run: fastlane beta
File renamed without changes.
26 changes: 10 additions & 16 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import com.android.build.gradle.internal.cxx.configure.gradleLocalProperties
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import java.io.FileInputStream
import java.util.Properties

plugins {
alias(libs.plugins.android.application)
Expand All @@ -9,10 +8,6 @@ plugins {
alias(libs.plugins.kotlin.ksp)
}

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

android {
namespace = "com.goalpanzi.mission_mate"
compileSdk = 34
Expand All @@ -30,19 +25,18 @@ android {
}
}

// signingConfigs {
// create("release") {
// keyAlias = keystoreProperties["keyAlias"] as String
// keyPassword = keystoreProperties["keyPassword"] as String
// storeFile = file(keystoreProperties["storeFile"] as String)
// storePassword = keystoreProperties["storePassword"] as String
// }
// }
signingConfigs {
create("release") {
storeFile = file("../mission-mate-keystore.jks")
storePassword = gradleLocalProperties(rootDir, providers).getProperty("SIGNING_STORE_PASSWORD")
keyAlias = gradleLocalProperties(rootDir, providers).getProperty("SIGNING_KEY_ALIAS")
keyPassword = gradleLocalProperties(rootDir, providers).getProperty("SIGNING_KEY_PASSWORD")
}
}

buildTypes {
release {
getByName("debug")
// signingConfig = signingConfigs.getByName("release")
signingConfig = signingConfigs.getByName("release")
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
Expand Down

0 comments on commit e2b8721

Please sign in to comment.