@@ -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
5451task 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+
7678def executeNdkBuild (outputDir , androidMkDirectory , applicationMkFile , cflags ) {
7779 logger. info " Executing NDK build command"
7880 exec {
0 commit comments