Skip to content
Permalink
Browse files

android: added .apk sigining

  • Loading branch information
JaCzekanski committed Jul 31, 2019
1 parent d841687 commit eaa4f67401ead6a6f65bbb96b3d51346406a356a
Showing with 33 additions and 11 deletions.
  1. +7 −7 .appveyor.yml
  2. +2 −0 .gitignore
  3. +1 −0 .travis.yml
  4. +4 −4 .travis/android/build.sh
  5. +19 −0 android/app/build.gradle
  6. BIN android/avocado.keystore.enc
@@ -6,20 +6,20 @@ environment:
PREMAKE_VERSION: 5.0.0-alpha13
SDL_VERSION: 2.0.9
matrix:
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
SKIP_DEPLOY: skip
TOOLSET: vs2017
platform: Win32
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
SKIP_DEPLOY: skip
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 Preview
TOOLSET: vs2017
platform: x64
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 Preview
TOOLSET: vs2017
platform: Win32
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 Preview
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
TOOLSET: vs2017
platform: x64
SKIP_DEPLOY: skip
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
TOOLSET: vs2017
platform: Win32
SKIP_DEPLOY: skip

# TODO: Move to PowerShell script
before_build:
@@ -71,3 +71,5 @@ config.json
src/version.h
out.txt
*.xcworkspace

*.keystore
@@ -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
@@ -1,5 +1,8 @@
apply plugin: 'com.android.application'

def signingPassword = System.getenv("keystore_password")
def signingEnabled = System.getenv("CI") == "true"

android {
compileSdkVersion 28
defaultConfig {
@@ -18,12 +21,28 @@ android {
abiFilters "x86_64", "arm64-v8a"
}
}
signingConfigs {
if (signingEnabled) {
release {
storeFile = file("../avocado.keystore")
keyAlias = "avocado"
storePassword = signingPassword
keyPassword = signingPassword
}
}
}

buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
if (signingEnabled) {
signingConfig signingConfigs.release
}
}
}


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

0 comments on commit eaa4f67

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