@@ -14,14 +14,14 @@ task buildOpenSSL() {
14
14
exec {
15
15
workingDir " ${ projectDir} "
16
16
commandLine " ./build-openssl-libraries.sh" ,
17
- " ${ minimumAndroidSdkVersion} " ,
18
- " ${ minimumAndroid64BitSdkVersion} " ,
19
- " ${ opensslVersion} "
17
+ " ${ minimumAndroidSdkVersion} " ,
18
+ " ${ minimumAndroid64BitSdkVersion} " ,
19
+ " ${ opensslVersion} "
20
20
}
21
21
}
22
22
}
23
23
24
- task buildAmalgamation () {
24
+ task buildAmalgamation () {
25
25
onlyIf {
26
26
def amalgamation = new File (" ${ projectDir} /src/main/external/sqlcipher/sqlite3.c" )
27
27
return ! amalgamation. exists()
@@ -35,7 +35,7 @@ task buildAmalgamation () {
35
35
exec {
36
36
workingDir " ${ projectDir} /src/main/external/sqlcipher"
37
37
environment(" CFLAGS" , " ${ sqlcipherCFlags} " )
38
- commandLine " make" , " sqlite3.c"
38
+ commandLine " make" , " sqlite3.c"
39
39
}
40
40
}
41
41
}
@@ -47,14 +47,14 @@ task buildNative() {
47
47
" ${ nativeRootOutputDir} /libs32" ,
48
48
file(" src/main/cpp" ). absolutePath,
49
49
file(" src/main/cpp/Application32.mk" ). absolutePath,
50
- " ${ sqlcipherCFlags} " , " ${ otherSqlcipherCFlags} " ,
51
- " ${ minimumAndroidSdkVersion} " )
50
+ " ${ sqlcipherCFlags} " , " ${ otherSqlcipherCFlags} " ,
51
+ " ${ minimumAndroidSdkVersion} " )
52
52
executeNdkBuild(
53
53
" ${ nativeRootOutputDir} /libs64" ,
54
54
file(" src/main/cpp" ). absolutePath,
55
55
file(" src/main/cpp/Application64.mk" ). absolutePath,
56
- " ${ sqlcipherCFlags} " , " ${ otherSqlcipherCFlags} " ,
57
- " ${ minimumAndroid64BitSdkVersion} " )
56
+ " ${ sqlcipherCFlags} " , " ${ otherSqlcipherCFlags} " ,
57
+ " ${ minimumAndroid64BitSdkVersion} " )
58
58
exec {
59
59
workingDir " ${ nativeRootOutputDir} "
60
60
commandLine " mkdir" , " -p" , " libs"
@@ -73,7 +73,7 @@ task cleanOpenSSL() {
73
73
doLast {
74
74
logger. info " Cleaning OpenSSL source"
75
75
File file = new File (" ${ opensslDir} " )
76
- if (file. exists()){
76
+ if (file. exists()) {
77
77
file. deleteDir()
78
78
}
79
79
}
@@ -86,8 +86,8 @@ task cleanSQLCipher() {
86
86
gitClean(" ${ sqlcipherDir} " )
87
87
File amalgamationSource = new File (" ${ sqlcipherDir} /sqlite3.c" )
88
88
File amalgamationHeader = new File (" ${ sqlcipherDir} /sqlite3.h" )
89
- if (amalgamationSource. exists()) amalgamationSource. delete()
90
- if (amalgamationHeader. exists()) amalgamationHeader. delete()
89
+ if (amalgamationSource. exists()) amalgamationSource. delete()
90
+ if (amalgamationHeader. exists()) amalgamationHeader. delete()
91
91
}
92
92
}
93
93
@@ -97,7 +97,7 @@ task cleanNative() {
97
97
logger. info " Cleaning native build artifacts"
98
98
[" libs" , " libs32" , " libs64" , " obj" ]. each {
99
99
File file = new File (" ${ projectDir} /src/main/${ it} " )
100
- if (file. exists()){
100
+ if (file. exists()) {
101
101
file. deleteDir()
102
102
}
103
103
}
@@ -138,15 +138,15 @@ def executeNdkBuild(outputDir, androidMkDirectory, applicationMkFile,
138
138
exec {
139
139
def outputDirectory = " NDK_LIBS_OUT=${ outputDir} "
140
140
def applicationFile = " NDK_APPLICATION_MK=${ applicationMkFile} "
141
- def environmentVariables = [" SQLCIPHER_CFLAGS" : " ${ cflags} " ,
142
- " OPENSSL_DIR" : " ${ opensslDir} " ,
143
- " SQLCIPHER_DIR" : " ${ sqlcipherDir} " ,
141
+ def environmentVariables = [" SQLCIPHER_CFLAGS" : " ${ cflags} " ,
142
+ " OPENSSL_DIR" : " ${ opensslDir} " ,
143
+ " SQLCIPHER_DIR" : " ${ sqlcipherDir} " ,
144
144
" SQLCIPHER_OTHER_CFLAGS" : " ${ otherSqlcipherCFlags} " ,
145
145
" ANDROID_NATIVE_ROOT_DIR" : " ${ androidNativeRootDir} " ,
146
- " NDK_APP_PLATFORM" : " ${ androidVersion} " ]
146
+ " NDK_APP_PLATFORM" : " ${ androidVersion} " ]
147
147
environment(environmentVariables)
148
148
commandLine " ndk-build" , " ${ ndkBuildType} " ,
149
- " --environment-overrides" , outputDirectory,
150
- " -C" , androidMkDirectory, applicationFile
149
+ " --environment-overrides" , outputDirectory,
150
+ " -C" , androidMkDirectory, applicationFile
151
151
}
152
152
}
0 commit comments