From 1312a542951d397f44f896341451a653189d6ff9 Mon Sep 17 00:00:00 2001 From: sofijajvc Date: Wed, 9 Oct 2019 14:33:30 +0100 Subject: [PATCH] Avoid sync failures if libgav1 isn't present PiperOrigin-RevId: 273734495 --- extensions/av1/build.gradle | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/extensions/av1/build.gradle b/extensions/av1/build.gradle index e2912a4932..a0f42509b6 100644 --- a/extensions/av1/build.gradle +++ b/extensions/av1/build.gradle @@ -54,13 +54,15 @@ android { } } -// Check that the Android NDK and CMake are present, to avoid gradle sync -// failures if they aren't installed. To use the extension it is necessary to -// install the NDK and CMake from the SDK Manager. +// Check that the Android NDK, CMake and libgav1 are present, to avoid gradle +// sync failures if the tools aren't installed or libgav1 is missing. To use +// the extension it is necessary to install the NDK and CMake from the SDK +// Manager and fetch libgav1 following the steps in README. def ndkDirectory = project.android.ndkDirectory def sdkDirectory = project.android.sdkDirectory if (ndkDirectory != null && !ndkDirectory.toString().isEmpty() - && new File(sdkDirectory.toString() + '/cmake').exists()) { + && new File(sdkDirectory.toString() + '/cmake').exists() + && project.file('src/main/jni/libgav1').exists()) { android.externalNativeBuild.cmake.path = 'src/main/jni/CMakeLists.txt' android.externalNativeBuild.cmake.version = '3.7.1+' }