@@ -96,12 +96,12 @@ def generateAmalgamation = tasks.register("generateAmalgamation") {
9696 group = " SQLCipher"
9797 def sqlcipherDir = new File (" ${ project.rootDir} /sqlcipher/src/main/jni/sqlcipher/" )
9898 def sqlcipherSourceDir = new File (sqlcipherDir. absolutePath, " src/" )
99- def sqlcipherSubmodule = new File (project . rootDir . absolutePath, " .git/modules/sqlcipher/src/main/jni/sqlcipher/src " )
99+ def sqlcipherReadMe = new File (sqlcipherSourceDir . absolutePath, " README.md " )
100100 def amalgamationSource = new File (sqlcipherDir. absolutePath, " sqlite3.c" )
101101 def amalgamationHeader = new File (sqlcipherDir. absolutePath, " sqlite3.h" )
102102 doLast {
103- if (! sqlcipherSubmodule . exists()) {
104- log. withStyle(Style.Info ). println (' SQLCipher submodule missing, initializing' )
103+ if (! sqlcipherReadMe . exists()) {
104+ log. withStyle(Style.Info ). println (' SQLCipher README missing, initializing submodule ' )
105105 shellCmd(project. rootDir. absolutePath, " git" , " submodule" , " update" , " --init" )
106106 }
107107 log. withStyle(Style.Info ). println (' SQLCipher amalgamation not found, generating.' )
@@ -137,9 +137,9 @@ def cleanAmalgamation = tasks.register("cleanAmalgamation") {
137137 println " Clean SQLCipher amalgamation"
138138 delete(amalgamationSource, amalgamationHeader)
139139 }
140- outputs . upToDateWhen {
141- return ! amalgamationSource. exists()
142- && ! amalgamationHeader. exists()
140+ onlyIf {
141+ return amalgamationSource. exists()
142+ || amalgamationHeader. exists()
143143 }
144144}
145145
0 commit comments