Skip to content

Commit 9a4659d

Browse files
committed
format gradle file
1 parent cec41b9 commit 9a4659d

File tree

2 files changed

+23
-23
lines changed

2 files changed

+23
-23
lines changed

android-database-sqlcipher/build-openssl-libraries.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,17 @@ OPENSSL=openssl-$3
1010

1111
(cd src/main/external/${OPENSSL};
1212

13-
if [ ! ${MINIMUM_ANDROID_SDK_VERSION} ]; then
13+
if [[ ! ${MINIMUM_ANDROID_SDK_VERSION} ]]; then
1414
echo "MINIMUM_ANDROID_SDK_VERSION was not provided, include and rerun"
1515
exit 1
1616
fi
1717

18-
if [ ! ${MINIMUM_ANDROID_64_BIT_SDK_VERSION} ]; then
18+
if [[ ! ${MINIMUM_ANDROID_64_BIT_SDK_VERSION} ]]; then
1919
echo "MINIMUM_ANDROID_64_BIT_SDK_VERSION was not provided, include and rerun"
2020
exit 1
2121
fi
2222

23-
if [ ! ${ANDROID_NDK_ROOT} ]; then
23+
if [[ ! ${ANDROID_NDK_ROOT} ]]; then
2424
echo "ANDROID_NDK_ROOT environment variable not set, set and rerun"
2525
exit 1
2626
fi

android-database-sqlcipher/native.gradle

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
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

Comments
 (0)