Skip to content
Permalink
Browse files

android: ndk build in Gradle fixed

  • Loading branch information
JaCzekanski committed Jul 31, 2019
1 parent eaa4f67 commit 70efb6d37003c125d03188ca2e57c3beeaa2deae
@@ -23,13 +23,9 @@ 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
ls -lat .
./gradlew assembleRelease
find app/build/outputs
popd

# Tests
@@ -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 70efb6d

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