Skip to content

Commit b9e41e9

Browse files
committed
Skipped prepare.py when Phase 1 artifacts are already present.
1 parent 808c3b4 commit b9e41e9

1 file changed

Lines changed: 11 additions & 6 deletions

File tree

TMessagesProj/build.gradle

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -250,12 +250,17 @@ def getProps(String propName) {
250250

251251
task buildNativeDeps(description: 'Build native dependencies.') {
252252
doFirst {
253-
exec {
254-
def ndkDir = android.ndkDirectory
255-
println "NDK Directory: ${ndkDir}"
256-
println "Working Directory: ${projectDir}/jni"
257-
workingDir "${projectDir}/jni"
258-
commandLine 'python3', 'prepare.py', 'silent', 'ndk=' + ndkDir, 'arm', 'arm64'
253+
def boringsslLib = file("${projectDir}/jni/boringssl/build/arm64-v8a/crypto/libcrypto.a")
254+
if (boringsslLib.exists()) {
255+
println "Phase 1 native artifacts already present, skipping prepare.py"
256+
} else {
257+
exec {
258+
def ndkDir = android.ndkDirectory
259+
println "NDK Directory: ${ndkDir}"
260+
println "Working Directory: ${projectDir}/jni"
261+
workingDir "${projectDir}/jni"
262+
commandLine 'python3', 'prepare.py', 'silent', 'ndk=' + ndkDir, 'arm', 'arm64'
263+
}
259264
}
260265
}
261266
}

0 commit comments

Comments
 (0)