@@ -40,12 +40,14 @@ task buildNative() {
4040 " ${ nativeRootOutputDir} /libs32" ,
4141 file(" src/main/cpp" ). absolutePath,
4242 file(" src/main/cpp/Application32.mk" ). absolutePath,
43- " ${ sqlcipherCFlags} " , " ${ otherSqlcipherCFlags} " )
43+ " ${ sqlcipherCFlags} " , " ${ otherSqlcipherCFlags} " ,
44+ " ${ minimumAndroidSdkVersion} " )
4445 executeNdkBuild(
4546 " ${ nativeRootOutputDir} /libs64" ,
4647 file(" src/main/cpp" ). absolutePath,
4748 file(" src/main/cpp/Application64.mk" ). absolutePath,
48- " ${ sqlcipherCFlags} " , " ${ otherSqlcipherCFlags} " )
49+ " ${ sqlcipherCFlags} " , " ${ otherSqlcipherCFlags} " ,
50+ " ${ minimumAndroid64BitSdkVersion} " )
4951 exec {
5052 workingDir " ${ nativeRootOutputDir} "
5153 commandLine " mkdir" , " -p" , " libs"
@@ -115,7 +117,7 @@ def gitClean(directory) {
115117}
116118
117119def executeNdkBuild (outputDir , androidMkDirectory , applicationMkFile ,
118- cflags , otherSqlcipherCFlags ) {
120+ cflags , otherSqlcipherCFlags , androidVersion ) {
119121 logger. info " Executing NDK build command"
120122 exec {
121123 def outputDirectory = " NDK_LIBS_OUT=${ outputDir} "
@@ -125,7 +127,7 @@ def executeNdkBuild(outputDir, androidMkDirectory, applicationMkFile,
125127 " SQLCIPHER_DIR" : " ${ sqlcipherDir} " ,
126128 " SQLCIPHER_OTHER_CFLAGS" : " ${ otherSqlcipherCFlags} " ,
127129 " ANDROID_NATIVE_ROOT_DIR" : " ${ androidNativeRootDir} " ,
128- " NDK_APP_PLATFORM" : " ${ targetAndroidSdkVersion } " ]
130+ " NDK_APP_PLATFORM" : " ${ androidVersion } " ]
129131 environment(environmentVariables)
130132 commandLine " ndk-build" , " ${ ndkBuildType} " ,
131133 " --environment-overrides" , outputDirectory,
0 commit comments