mirror of
https://github.com/hmalik144/Driver.git
synced 2025-12-10 02:45:20 +00:00
Local testing
This commit is contained in:
@@ -118,15 +118,11 @@ commands:
|
||||
steps:
|
||||
# The next step will run the unit tests
|
||||
- run:
|
||||
name: Setup keystore
|
||||
name: Setup keystore & properties
|
||||
command: |
|
||||
echo "$BASE64_KEYSTORE" | base64 --decode > "$PWD/app/keystore.jks"
|
||||
FILE=$PWD/app/keystore.jks
|
||||
if [[ -f "$FILE" ]]; then
|
||||
echo "$FILE exists."
|
||||
else
|
||||
echo "$FILE does not exist."
|
||||
fi
|
||||
echo "$BASE64_KEYSTORE" | base64 --decode > "$FILE"
|
||||
printf 'releaseKeyAlias=%s\nreleaseKeyPassword=%s\nreleaseKeyStore=%s\nreleaseStorePassword=%s' $RELEASE_KEY_ALIAS $RELEASE_KEY_PASSWORD $FILE $RELEASE_STORE_PASSWORD > keystore.properties
|
||||
- run:
|
||||
name: files list
|
||||
command: |
|
||||
|
||||
@@ -6,9 +6,14 @@ plugins {
|
||||
id 'androidx.navigation.safeargs'
|
||||
}
|
||||
|
||||
def relStorePassword = System.getenv("RELEASE_STORE_PASSWORD")
|
||||
def relKeyPassword = System.getenv("RELEASE_KEY_PASSWORD")
|
||||
def relKeyAlias = System.getenv("RELEASE_KEY_ALIAS")
|
||||
def keyStorePropertiesFile = rootProject.file("keystore.properties")
|
||||
def keyStoreProperties = new Properties()
|
||||
if (keyStorePropertiesFile.exists()) {
|
||||
keyStoreProperties.load(new FileInputStream(keyStorePropertiesFile))
|
||||
}
|
||||
|
||||
def keystorePath = System.getenv('PWD') + "/app/keystore.jks"
|
||||
def keystore = file(keystorePath).exists() ? file(keystorePath) : null
|
||||
|
||||
android {
|
||||
compileSdkVersion 31
|
||||
@@ -37,10 +42,10 @@ android {
|
||||
|
||||
signingConfigs {
|
||||
release {
|
||||
storePassword relStorePassword
|
||||
keyPassword relKeyPassword
|
||||
keyAlias relKeyAlias
|
||||
storeFile rootProject.file("app/keystore.jks").exists() ? rootProject.file("app/keystore.jks") : null
|
||||
keyAlias keyStoreProperties['releaseKeyAlias']
|
||||
keyPassword keyStoreProperties['releaseKeyPassword']
|
||||
storeFile keystore
|
||||
storePassword keyStoreProperties['releaseStorePassword']
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -36,12 +36,7 @@ platform :android do
|
||||
task: "clean bundle",
|
||||
flavor: "Driver",
|
||||
build_type: "Release",
|
||||
properties: {
|
||||
"android.injected.signing.store.file" => ENV['PWD'] + "/app/keystore.jks",
|
||||
"android.injected.signing.store.password" => ENV['RELEASE_STORE_PASSWORD'],
|
||||
"android.injected.signing.key.alias" => ENV['RELEASE_KEY_ALIAS'],
|
||||
"android.injected.signing.key.password" => ENV['RELEASE_KEY_PASSWORD'],
|
||||
})
|
||||
)
|
||||
upload_to_play_store(
|
||||
aab: "app/build/outputs/bundle/driverRelease/app-driver-release.aab",
|
||||
json_key: "google-play-key.json",
|
||||
|
||||
Reference in New Issue
Block a user