Skip to content

Commit

Permalink
The encrypted certificate of the application. For release and debug #17
Browse files Browse the repository at this point in the history
  • Loading branch information
modos189 committed Dec 9, 2018
1 parent 9cb75d6 commit 444650e
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 26 deletions.
27 changes: 12 additions & 15 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,38 +1,35 @@
language: android
jdk: oraclejdk8

branches:
only:
- master

android:
components:
- platform-tools
- tools
- build-tools-28.0.3
- android-28
- extra-android-m2repository

addons:
apt:
packages:
- python3
ssh_known_hosts: modos189.ru

notifications:
email:
on_success: change
on_failure: always

before_script:
- openssl aes-256-cbc -K $encrypted_460819c10bef_key -iv $encrypted_460819c10bef_iv -in deploy_rsa.enc -out /tmp/deploy_rsa -d
- chmod 600 /tmp/deploy_rsa
- eval "$(ssh-agent -s)"
- ssh-add /tmp/deploy_rsa
- rm -rf build/local/*
- rm -rf build/mobile/*

- openssl aes-256-cbc -K $encrypted_460819c10bef_key -iv $encrypted_460819c10bef_iv
-in deploy_rsa.enc -out /tmp/deploy_rsa -d
- openssl aes-256-cbc -K $encrypted_50771c031334_key -iv $encrypted_50771c031334_iv
-in mobile/app/android.jks.enc -out mobile/app/android.jks -d
- chmod 600 /tmp/deploy_rsa
- eval "$(ssh-agent -s)"
- ssh-add /tmp/deploy_rsa
- rm -rf build/local/*
- rm -rf build/mobile/*
script:
- "./build.py local"
- "./build.py mobile"
- "bash ./deploy.sh"
- "./build.py local"
- "./build.py mobile"
- bash ./deploy.sh
Binary file removed mobile/app/android-debug-key.p12
Binary file not shown.
39 changes: 28 additions & 11 deletions mobile/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -36,21 +36,38 @@ android {
}

signingConfigs {
if (project.hasProperty('signKeyStorePassword')) {
if (System.getenv("TRAVIS")) {
release {
keyAlias rootProject.ext.signKeyAlias
keyPassword rootProject.ext.signKeyPassword
storeFile file(rootProject.ext.signKeyStore)
storePassword rootProject.ext.signKeyStorePassword
storeFile rootProject.file('android.jks')
storePassword System.getenv("KEYSTORE_PASS")
keyAlias System.getenv("ALIAS_NAME")
keyPassword System.getenv("ALIAS_PASS")
}
}
if (project.hasProperty('debugSignKeyStorePassword')) {
debug {
keyAlias rootProject.ext.debugSignKeyAlias
keyPassword rootProject.ext.debugSignKeyPassword
storeFile file(rootProject.ext.debugSignKeyStore)
storePassword rootProject.ext.debugSignKeyStorePassword
storeFile rootProject.file('android.jks')
storePassword System.getenv("KEYSTORE_PASS")
keyAlias System.getenv("ALIAS_NAME")
keyPassword System.getenv("ALIAS_PASS")
}
} else {

if (project.hasProperty('signKeyStorePassword') && new File(rootProject.ext.signKeyStore).exists()) {
release {
keyAlias rootProject.ext.signKeyAlias
keyPassword rootProject.ext.signKeyPassword
storeFile file(rootProject.ext.signKeyStore)
storePassword rootProject.ext.signKeyStorePassword
}
}
if (project.hasProperty('debugSignKeyStorePassword') && new File(rootProject.ext.debugSignKeyStore).exists()) {
debug {
keyAlias rootProject.ext.debugSignKeyAlias
keyPassword rootProject.ext.debugSignKeyPassword
storeFile file(rootProject.ext.debugSignKeyStore)
storePassword rootProject.ext.debugSignKeyStorePassword
}
}

}
}

Expand Down

0 comments on commit 444650e

Please sign in to comment.