1- task buildOpenSSL () {
1+ task buildOpenSSL () {
22 onlyIf {
33 def armNativeFile = new File (" ${ androidNativeRootDir} /armeabi/libcrypto.a" )
44 return ! armNativeFile. exists()
@@ -7,14 +7,14 @@ task buildOpenSSL () {
77 exec {
88 workingDir " ${ projectDir} "
99 commandLine " ./build-openssl-libraries.sh" ,
10- " ${ minimumAndroidSdkVersion} " ,
11- " ${ minimumAndroid64BitSdkVersion} " ,
12- " ${ opensslVersion} "
10+ " ${ minimumAndroidSdkVersion} " ,
11+ " ${ minimumAndroid64BitSdkVersion} " ,
12+ " ${ opensslVersion} "
1313 }
1414 }
1515}
1616
17- task buildAmalgamation () {
17+ task buildAmalgamation () {
1818 onlyIf {
1919 def amalgamation = new File (" ${ projectDir} /src/main/external/sqlcipher/sqlite3.c" )
2020 return ! amalgamation. exists()
@@ -28,7 +28,7 @@ task buildAmalgamation () {
2828 exec {
2929 workingDir " ${ projectDir} /src/main/external/sqlcipher"
3030 environment(" CFLAGS" , " ${ sqlcipherCFlags} " )
31- commandLine " make" , " sqlite3.c"
31+ commandLine " make" , " sqlite3.c"
3232 }
3333 }
3434}
@@ -40,14 +40,14 @@ task buildNative() {
4040 " ${ nativeRootOutputDir} /libs32" ,
4141 file(" src/main/cpp" ). absolutePath,
4242 file(" src/main/cpp/Application32.mk" ). absolutePath,
43- " ${ sqlcipherCFlags} " , " ${ otherSqlcipherCFlags} " ,
44- " ${ minimumAndroidSdkVersion} " )
43+ " ${ sqlcipherCFlags} " , " ${ otherSqlcipherCFlags} " ,
44+ " ${ minimumAndroidSdkVersion} " )
4545 executeNdkBuild(
4646 " ${ nativeRootOutputDir} /libs64" ,
4747 file(" src/main/cpp" ). absolutePath,
4848 file(" src/main/cpp/Application64.mk" ). absolutePath,
49- " ${ sqlcipherCFlags} " , " ${ otherSqlcipherCFlags} " ,
50- " ${ minimumAndroid64BitSdkVersion} " )
49+ " ${ sqlcipherCFlags} " , " ${ otherSqlcipherCFlags} " ,
50+ " ${ minimumAndroid64BitSdkVersion} " )
5151 exec {
5252 workingDir " ${ nativeRootOutputDir} "
5353 commandLine " mkdir" , " -p" , " libs"
@@ -66,7 +66,7 @@ task cleanOpenSSL() {
6666 doLast {
6767 logger. info " Cleaning OpenSSL source"
6868 File file = new File (" ${ opensslDir} " )
69- if (file. exists()){
69+ if (file. exists()) {
7070 file. deleteDir()
7171 }
7272 }
@@ -79,8 +79,8 @@ task cleanSQLCipher() {
7979 gitClean(" ${ sqlcipherDir} " )
8080 File amalgamationSource = new File (" ${ sqlcipherDir} /sqlite3.c" )
8181 File amalgamationHeader = new File (" ${ sqlcipherDir} /sqlite3.h" )
82- if (amalgamationSource. exists()) amalgamationSource. delete()
83- if (amalgamationHeader. exists()) amalgamationHeader. delete()
82+ if (amalgamationSource. exists()) amalgamationSource. delete()
83+ if (amalgamationHeader. exists()) amalgamationHeader. delete()
8484 }
8585}
8686
@@ -90,7 +90,7 @@ task cleanNative() {
9090 logger. info " Cleaning native build artifacts"
9191 [" libs" , " libs32" , " libs64" , " obj" ]. each {
9292 File file = new File (" ${ projectDir} /src/main/${ it} " )
93- if (file. exists()){
93+ if (file. exists()) {
9494 file. deleteDir()
9595 }
9696 }
@@ -122,15 +122,15 @@ def executeNdkBuild(outputDir, androidMkDirectory, applicationMkFile,
122122 exec {
123123 def outputDirectory = " NDK_LIBS_OUT=${ outputDir} "
124124 def applicationFile = " NDK_APPLICATION_MK=${ applicationMkFile} "
125- def environmentVariables = [" SQLCIPHER_CFLAGS" : " ${ cflags} " ,
126- " OPENSSL_DIR" : " ${ opensslDir} " ,
127- " SQLCIPHER_DIR" : " ${ sqlcipherDir} " ,
125+ def environmentVariables = [" SQLCIPHER_CFLAGS" : " ${ cflags} " ,
126+ " OPENSSL_DIR" : " ${ opensslDir} " ,
127+ " SQLCIPHER_DIR" : " ${ sqlcipherDir} " ,
128128 " SQLCIPHER_OTHER_CFLAGS" : " ${ otherSqlcipherCFlags} " ,
129129 " ANDROID_NATIVE_ROOT_DIR" : " ${ androidNativeRootDir} " ,
130- " NDK_APP_PLATFORM" : " ${ androidVersion} " ]
130+ " NDK_APP_PLATFORM" : " ${ androidVersion} " ]
131131 environment(environmentVariables)
132132 commandLine " ndk-build" , " ${ ndkBuildType} " ,
133- " --environment-overrides" , outputDirectory,
134- " -C" , androidMkDirectory, applicationFile
133+ " --environment-overrides" , outputDirectory,
134+ " -C" , androidMkDirectory, applicationFile
135135 }
136136}
0 commit comments