Commit 1312a542 by sofijajvc Committed by Ian Baker

Avoid sync failures if libgav1 isn't present

PiperOrigin-RevId: 273734495
parent 3d0886f4
Showing with 6 additions and 4 deletions
...@@ -54,13 +54,15 @@ android { ...@@ -54,13 +54,15 @@ android {
} }
} }
// Check that the Android NDK and CMake are present, to avoid gradle sync // Check that the Android NDK, CMake and libgav1 are present, to avoid gradle
// failures if they aren't installed. To use the extension it is necessary to // sync failures if the tools aren't installed or libgav1 is missing. To use
// install the NDK and CMake from the SDK Manager. // 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 ndkDirectory = project.android.ndkDirectory
def sdkDirectory = project.android.sdkDirectory def sdkDirectory = project.android.sdkDirectory
if (ndkDirectory != null && !ndkDirectory.toString().isEmpty() 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.path = 'src/main/jni/CMakeLists.txt'
android.externalNativeBuild.cmake.version = '3.7.1+' android.externalNativeBuild.cmake.version = '3.7.1+'
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment