Skip to content
Permalink
Browse files

android: added .apk sigining

  • Loading branch information
JaCzekanski committed Jul 31, 2019
1 parent d841687 commit 3bcf9fda298a0b2293e3dfdeff0fa60e9bca4ccd
Showing with 14 additions and 4 deletions.
  1. +1 −0 .travis.yml
  2. +4 −4 .travis/android/build.sh
  3. +9 −0 android/app/build.gradle
  4. BIN android/avocado.keystore.enc
@@ -15,6 +15,7 @@ matrix:
sudo: required
dist: trusty
cache: ccache
before_install: openssl aes-256-cbc -K $encrypted_7333c7dd5b15_key -iv $encrypted_7333c7dd5b15_iv -in android/avocado.keystore.enc -out android/avocado.keystore -d
install: "./.travis/android/pull-container.sh"
script: "./.travis/android/run-container.sh"
after_success: "./.travis/notify-discord.sh success $WEBHOOK_URL"
@@ -8,7 +8,7 @@ export DATE=`date +%Y%m%d`
export COMMIT=`git rev-parse --short=7 HEAD`
export ARTIFACT=avocado-$OS-$DATE-$COMMIT.apk
export ASSETS_DIR=android/app/src/main/assets
export TARGET_DIR=android/app/build/outputs/apk/debug
export TARGET_DIR=android/app/build/outputs/apk/release
export NDK_CCACHE="$(which ccache)"

# Configure cache
@@ -28,13 +28,13 @@ pushd android
NDK_PROJECT_PATH=`pwd`/app ndk-build PM5_CONFIG=release_x64 -j4 avocado NDK_DEBUG=0
ccache -s

# Java code (debug for now)
./gradlew assembleDebug
# Java code
./gradlew assembleRelease
popd

# Tests
# No test suite for Android right now

# Package and prepare upload artifact
mkdir -p upload
cp $TARGET_DIR/app-debug.apk upload/$ARTIFACT
cp $TARGET_DIR/app-release.apk upload/$ARTIFACT
@@ -24,6 +24,15 @@ android {
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}

def isRunningOnTravis = System.getenv("CI") == "true"
if (isRunningOnTravis) {
signingConfigs.release.storeFile = file("../avocado.keystore")
signingConfigs.release.keyAlias = "avocado"
signingConfigs.release.storePassword = System.getenv("keystore_password")
signingConfigs.release.keyPassword = System.getenv("keystore_password")
}

// externalNativeBuild {
// ndkBuild {
// path 'jni/Android.mk'
Binary file not shown.

0 comments on commit 3bcf9fd

Please sign in to comment.
You can’t perform that action at this time.