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

[PLAYSTORE] release to playstore #10

Closed
wants to merge 3 commits into from
Closed
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
9 changes: 4 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@ language: android
dist: trusty

before_install:
- openssl aes-256-cbc -K $encrypted_a039e732823a_key -iv $encrypted_a039e732823a_iv -in travis/secrets.tar.enc -out travis/secrets.tar -d
- tar xvf travis/secrets.tar
- cp travis/google-services.json app/google-services.json
- cp travis/home-assistant-mobile-apps-5fd6b9dd0fdb.json serviceCredentialsFile.json
- chmod ugo+x travis/before_install.sh
- ./travis/before_install.sh

android:
components:
Expand All @@ -26,4 +24,5 @@ script:
- echo $TRAVIS_COMMIT_MESSAGE > CHANGES.md
- export VERSION_CODE=`git rev-list --count HEAD`
- 'if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then bash ./gradlew testReleaseUnitTest; fi'
- 'if [ "$TRAVIS_BRANCH" = "master" ]; then bash ./gradlew assembleRelease appDistributionUploadRelease; fi'
- 'if [ "$TRAVIS_BRANCH" = "master" ]; then bash ./gradlew assembleRelease appDistributionUploadRelease; fi'
- ./gradlew assembleRelease
21 changes: 21 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,27 @@ android {
serviceCredentialsFile = "serviceCredentialsFile.json"
releaseNotesFile = "CHANGES.md"
}

signingConfigs {
release {
storeFile file('../release_keystore.keystore')
storePassword "${System.env.KEYSTORE_PASSWORD ?: ""}"
keyAlias "$System.env.KEYSTORE_ALIAS" ?: ""
keyPassword "${System.env.KEYSTORE_ALIAS_PASSWORD ?: ""}"
v2SigningEnabled true
}
}

buildTypes {
release {
debuggable false
jniDebuggable false
zipAlignEnabled true
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt')
signingConfig signingConfigs.release
}
}
}

dependencies {
Expand Down
Binary file added app/release/app-release.aab
Binary file not shown.
10 changes: 10 additions & 0 deletions travis/before_install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash

if [ "$TRAVIS_PULL_REQUEST" = "false" ]
then
openssl aes-256-cbc -K $encrypted_a039e732823a_key -iv $encrypted_a039e732823a_iv -in travis/secrets.tar.enc -out travis/secrets.tar -d
tar xvf travis/secrets.tar
cp travis/google-services.json app/google-services.json
cp travis/release_keystore.keystore release_keystore.keystore
cp travis/home-assistant-mobile-apps-5fd6b9dd0fdb.json serviceCredentialsFile.json
fi
Binary file modified travis/secrets.tar.enc
Binary file not shown.