8000 Create git clean method · Fiv38/android-database-sqlcipher@19c97ff · GitHub
[go: up one dir, main page]

Skip to content

Commit 19c97ff

Browse files
Create git clean method
1 parent 7e06621 commit 19c97ff

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

android-database-sqlcipher/native.gradle

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -40,25 +40,19 @@ task buildNative64() {
4040
}
4141
}
4242

43-
task cleanOpenSSL {
43+
task cleanOpenSSL() {
4444
description "Clean the OpenSSL source"
4545
doLast {
46-
logger.info "Cleaning OpenSSL directory:${rootProject.ext.opensslDir}"
47-
exec {
48-
workingDir "${rootProject.ext.opensslDir}"
49-
commandLine "git", "checkout", "-f"
50-
}
46+
logger.info "Cleaning OpenSSL source"
47+
gitClean("${rootProject.ext.opensslDir}")
5148
}
5249
}
5350

5451
task cleanSQLCipher() {
5552
description "Clean the SQLCipher source"
5653
doLast {
57-
logger.info "Cleaning SQLCipher directory:${rootProject.ext.sqlcipherDir}"
58-
exec {
59-
workingDir "${rootProject.ext.sqlcipherDir}"
60-
commandLine "git", "checkout", "-f"
61-
}
54+
logger.info "Cleaning SQLCipher source"
55+
gitClean("${rootProject.ext.sqlcipherDir}")
6256
}
6357
}
6458

@@ -73,6 +67,14 @@ task cleanNative() {
7367
}
7468
}
7569

70+
def gitClean(directory) {
71+
logger.info "Cleaning directory:${directory}"
72+
exec {
73+
workingDir "${directory}"
74+
commandLine "git", "checkout", "-f"
75+
}
76+
}
77+
7678
def executeNdkBuild(outputDir, androidMkDirectory, applicationMkFile, cflags) {
7779
logger.info "Executing NDK build command"
7880
exec {

0 commit comments

Comments
 (0)
0