Skip to content
Permalink
Browse files

android: ndk build in Gradle fixed

  • Loading branch information
JaCzekanski committed Jul 31, 2019
1 parent eaa4f67 commit 4d887ea080271869ac89b98f55d171d4bdf89372
@@ -6,7 +6,6 @@ matrix:
sudo: required
dist: trusty
cache: ccache
install: "./.travis/linux/pull-container.sh"
script: "./.travis/linux/run-container.sh"
after_success: "./.travis/notify-discord.sh success $WEBHOOK_URL"
after_failure: "./.travis/notify-discord.sh failure $WEBHOOK_URL"
@@ -16,7 +15,6 @@ matrix:
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"
after_failure: "./.travis/notify-discord.sh failure $WEBHOOK_URL"
@@ -30,7 +28,7 @@ matrix:
after_failure: "./.travis/notify-discord.sh failure $WEBHOOK_URL"

notifications:
- email: false
email: false

deploy:
provider: script
@@ -23,12 +23,6 @@ find $ASSETS_DIR -type f -name .gitignore -exec rm {} \;

# Build
pushd android

# Native code
NDK_PROJECT_PATH=`pwd`/app ndk-build PM5_CONFIG=release_x64 -j4 avocado NDK_DEBUG=0
ccache -s

# Java code
./gradlew assembleRelease
popd

This file was deleted.

@@ -3,4 +3,9 @@

mkdir -p "$HOME/.ccache"

docker run -v $(pwd):/home/build -v "$HOME/.ccache":/root/.ccache avocadoemu/android /bin/bash -ex /home/build/.travis/android/build.sh
docker run \
-v $(pwd):/home/build \
-v "$HOME/.ccache":/root/.ccache \
-e keystore_password="$keystore_password" \
avocadoemu/android \
/bin/bash -ex /home/build/.travis/android/build.sh

This file was deleted.

@@ -3,5 +3,9 @@

mkdir -p "$HOME/.ccache"

docker run -v $(pwd):/home/build -v "$HOME/.ccache":/root/.ccache avocadoemu/linux-clang6 /bin/bash -ex /home/build/.travis/linux/build.sh
docker run \
-v $(pwd):/home/build \
-v "$HOME/.ccache":/root/.ccache \
avocadoemu/linux-clang6 \
/bin/bash -ex /home/build/.travis/linux/build.sh

@@ -146,4 +146,5 @@ fastlane/report.xml
fastlane/README.md


app/obj
app/obj
app/.externalNativeBuild/
@@ -1,7 +1,8 @@
apply plugin: 'com.android.application'

def signingPassword = System.getenv("keystore_password")
def signingEnabled = System.getenv("CI") == "true"
def signingEnabled = signingPassword != null
println "App signing: $signingEnabled"

android {
compileSdkVersion 28
@@ -13,13 +14,10 @@ android {
versionName "0.1.0"
externalNativeBuild {
ndkBuild {
arguments 'PM5_CONFIG=release_x64 NDK_DEBUG=0'
targets "libavocado.so"
arguments 'PM5_CONFIG=release_x64', '-j4'
targets "avocado"
}
}
ndk {
abiFilters "x86_64", "arm64-v8a"
}
}
signingConfigs {
if (signingEnabled) {
@@ -39,18 +37,20 @@ android {
if (signingEnabled) {
signingConfig signingConfigs.release
}
ndk {
abiFilters "arm64-v8a", "armeabi-v7a"
}
}
debug {
ndk {
abiFilters "x86_64"
}
}
}


// externalNativeBuild {
// ndkBuild {
// path 'jni/Android.mk'
// }
// }
sourceSets{
main {
jniLibs.srcDirs = ['obj/local']
externalNativeBuild {
ndkBuild {
path 'jni/Android.mk'
}
}
}
@@ -4,7 +4,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.0-beta02'
classpath 'com.android.tools.build:gradle:3.4.2'
}
}

@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-5.5.1-bin.zip
@@ -7,7 +7,7 @@ workspace "Avocado"
startproject "avocado"
defaultplatform "x86"

ndkabi "arm64-v8a"
ndkabi "arm64-v8a armeabi-v7a"
ndkstl "c++_static"
ndkplatform "android-24"

0 comments on commit 4d887ea

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