Browse Source

Android : use pEpEngine system.db build

JNI-44
Edouard Tisserant 10 years ago
parent
commit
fbdb809a83
  1. 14
      android/build.gradle

14
android/build.gradle

@ -7,6 +7,7 @@ def buildAutomatic = hasProperty('buildAutomatic') ? buildAutomatic : "true"
def pEpAppPackageName = hasProperty('pEpAppPackageName') ? pEpAppPackageName : "com.pep.k9" def pEpAppPackageName = hasProperty('pEpAppPackageName') ? pEpAppPackageName : "com.pep.k9"
def pEpEngineAndroid = new File(new File(pEpEngineSrc), 'build-android') def pEpEngineAndroid = new File(new File(pEpEngineSrc), 'build-android')
def pEpEngineDB = new File(new File(pEpEngineSrc), 'db')
def libetpanAndroid = new File(new File(pEpEngineSrc), '../libetpan/build-android') def libetpanAndroid = new File(new File(pEpEngineSrc), '../libetpan/build-android')
def externalInstallDir = file('external/data/data/' + pEpAppPackageName + '/app_opt') def externalInstallDir = file('external/data/data/' + pEpAppPackageName + '/app_opt')
@ -99,12 +100,23 @@ android {
unzipDeps.dependsOn buildpEpEngine unzipDeps.dependsOn buildpEpEngine
} }
// builds pEpEnginge's system.db
task buildpEpEngineSystemDB(type:Exec) {
workingDir pEpEngineDB
commandLine 'make', 'system.db'
}
// copy pEpEnginge's system.db to asset // copy pEpEnginge's system.db to asset
task cpDBAssets(type: Copy) { task cpDBAssets(type: Copy) {
from file(new File(new File(pEpEngineSrc), 'db/system.db')) from file(new File(pEpEngineDB, 'system.db'))
into 'assets' into 'assets'
} }
if(buildAutomatic=="true"){
cpDBAssets.dependsOn buildpEpEngineSystemDB
}
// call regular ndk-build(.cmd) script from app directory // call regular ndk-build(.cmd) script from app directory
task jniBuild(type: Exec) { task jniBuild(type: Exec) {
commandLine getNdkBuildCmd(), 'V=1', 'GPGBUILD='+externalInstallDir.absolutePath commandLine getNdkBuildCmd(), 'V=1', 'GPGBUILD='+externalInstallDir.absolutePath

Loading…
Cancel
Save