Browse Source

PEMA-103 WIP

pull/25/head
ignaciogarcia 3 years ago
parent
commit
c85ccd25bb
No known key found for this signature in database GPG Key ID: 5E6A455C909DD623
  1. 10
      android/build.gradle
  2. 1
      android/jni/Android.mk

10
android/build.gradle

@ -1,6 +1,7 @@
// Android pEp JNI adapter Aar gradle build script // Android pEp JNI adapter Aar gradle build script
def pEpEngineSrc = hasProperty('pEpEngineSrc') ? pEpEngineSrc : "../../pEpEngine" def pEpEngineSrc = hasProperty('pEpEngineSrc') ? pEpEngineSrc : "../../pEpEngine"
def libpEpTransportSrc = hasProperty('libpEpTransportSrc') ? libpEpTransportSrc : "../../libpEpTransport"
def buildAutomatic = hasProperty('buildAutomatic') ? buildAutomatic : "true" def buildAutomatic = hasProperty('buildAutomatic') ? buildAutomatic : "true"
//CHeck M1 answers the correct thing off .avaialableprocessors here //CHeck M1 answers the correct thing off .avaialableprocessors here
//def threadsToUse = hasProperty('threadsToUse') ? //def threadsToUse = hasProperty('threadsToUse') ?
@ -102,7 +103,12 @@ android {
commandLine 'make', 'lib-java' commandLine 'make', 'lib-java'
} }
task genpEpEngineSyncSources(type:Exec) { task genlibpEpTransportSources(type:Exec) {
workingDir "${libpEpTransportSrc}"
commandLine 'make', "-j${threadsToUse}"
}
task genpEpEngineSyncSources(type:Exec, dependsOn: 'genlibpEpTransportSources') {
workingDir "${pEpEngineSrc}" workingDir "${pEpEngineSrc}"
commandLine 'make', "-j${threadsToUse}", '-C', 'codegen' commandLine 'make', "-j${threadsToUse}", '-C', 'codegen'
} }
@ -169,7 +175,7 @@ android {
preBuild.dependsOn(externalAssets) preBuild.dependsOn(externalAssets)
} }
def isIdeBuild() { boolean isIdeBuild() {
boolean runningFromIde = project.properties['android.injected.invoked.from.ide'] == 'true' boolean runningFromIde = project.properties['android.injected.invoked.from.ide'] == 'true'
if (runningFromIde) { if (runningFromIde) {
println("GRADLE RUNNING FROM IDE") println("GRADLE RUNNING FROM IDE")

1
android/jni/Android.mk

@ -58,6 +58,7 @@ LOCAL_SRC_FILES := \
../../src/cxx/jniutils.cc ../../src/cxx/jniutils.cc
LOCAL_C_INCLUDES += $(GPGBUILD)/$(TARGET_ARCH_ABI)/include LOCAL_C_INCLUDES += $(GPGBUILD)/$(TARGET_ARCH_ABI)/include
#LOCAL_C_INCLUDES += $(ENGINE_PATH)/build-android/include/pEp
LOCAL_C_INCLUDES += $(LIB_PEP_ADAPTER_PATH)/build-android/include $(SRC_PATH)/libpEpAdapter LOCAL_C_INCLUDES += $(LIB_PEP_ADAPTER_PATH)/build-android/include $(SRC_PATH)/libpEpAdapter
LOCAL_C_INCLUDES += $(LIB_PEP_CXX11_PATH)/build-android/include $(SRC_PATH)/libpEpCxx11 LOCAL_C_INCLUDES += $(LIB_PEP_CXX11_PATH)/build-android/include $(SRC_PATH)/libpEpCxx11
LOCAL_C_INCLUDES += $(ENGINE_PATH)/asn.1 LOCAL_C_INCLUDES += $(ENGINE_PATH)/asn.1

Loading…
Cancel
Save