Skip to content

Commit fa8158d

Browse files
Use single Application.mk for 32/64-bit native builds
1 parent 3442e42 commit fa8158d

File tree

4 files changed

+8
-25
lines changed

4 files changed

+8
-25
lines changed

android-database-sqlcipher/build.gradle

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ android {
2121

2222
sourceSets {
2323
main {
24-
jniLibs.srcDirs "${rootProject.ext.nativeRootOutputDir}/libs32/",
25-
"${rootProject.ext.nativeRootOutputDir}/libs64/"
24+
jniLibs.srcDirs "${rootProject.ext.nativeRootOutputDir}/libs"
2625
}
2726
}
2827

@@ -32,7 +31,7 @@ android {
3231

3332
afterEvaluate {
3433
android.libraryVariants.all { variant ->
35-
variant.javaCompile.dependsOn([buildNative32, buildNative64])
34+
variant.javaCompile.dependsOn(buildNative)
3635
variant.outputs.each { output ->
3736
def outputFile = output.outputFile
3837
if (outputFile != null && outputFile.name.endsWith(".aar")) {

android-database-sqlcipher/native.gradle

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -28,24 +28,13 @@ task buildAmalgamation () {
2828
}
2929
}
3030

31-
task buildNative32() {
32-
description "Build the 32-bit native SQLCipher binaries"
31+
task buildNative() {
32+
description "Build the native SQLCipher binaries"
3333
doLast {
3434
executeNdkBuild(
35-
"${nativeRootOutputDir}/libs32",
35+
"${nativeRootOutputDir}/libs",
3636
file("src/main/cpp").absolutePath,
37-
file("src/main/cpp/Application32.mk").absolutePath,
38-
"${sqlcipherCFlags}")
39-
}
40-
}
41-
42-
task buildNative64() {
43-
description "Build the 64-bit native SQLCipher binaries"
44-
doLast {
45-
executeNdkBuild(
46-
"${nativeRootOutputDir}/libs64",
47-
file("src/main/cpp").absolutePath,
48-
file("src/main/cpp/Application64.mk").absolutePath,
37+
file("src/main/cpp/Application.mk").absolutePath,
4938
"${sqlcipherCFlags}")
5039
}
5140
}
@@ -70,7 +59,7 @@ task cleanNative() {
7059
description "Clean the native (JNI) build artifacts"
7160
doLast {
7261
logger.info "Cleaning native build artifacts"
73-
["libs32", "libs64", "obj"].each {
62+
["libs", "obj"].each {
7463
new File("${projectDir}/src/main/${it}").deleteDir()
7564
}
7665
}

android-database-sqlcipher/src/main/cpp/Application64.mk renamed to android-database-sqlcipher/src/main/cpp/Application.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
APP_PROJECT_PATH := $(shell pwd)
2-
APP_ABI := x86_64 arm64-v8a
2+
APP_ABI := armeabi armeabi-v7a x86 x86_64 arm64-v8a
33
APP_PLATFORM := android-21
44
APP_BUILD_SCRIPT := $(APP_PROJECT_PATH)/Android.mk
55
APP_STL := stlport_static

android-database-sqlcipher/src/main/cpp/Application32.mk

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)