1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 23:33:05 +04:00

android: update build scripts

This commit is contained in:
Alexander Alekhin
2022-10-23 14:31:02 +00:00
parent 23edec83fb
commit c29a3aa0a0
2 changed files with 23 additions and 1 deletions
+10
View File
@@ -35,6 +35,7 @@ task clean(type: Delete) {
// }
//}
def opencv_strict_build_configuration = @ANDROID_STRICT_BUILD_CONFIGURATION@;
gradle.afterProject { project ->
if (project.pluginManager.hasPlugin('com.android.application')
@@ -90,5 +91,14 @@ gradle.afterProject { project ->
}
}
// Android Gradle Plugin (AGP) 3.5+ is required
// https://github.com/android/ndk-samples/wiki/Configure-NDK-Path
def isNdkVersionSupported = project.android.metaClass.getProperties().find { it.name == 'ndkVersion' } != null
if ((false || opencv_strict_build_configuration) && isNdkVersionSupported) {
gradle.println("Override ndkVersion for the project ${project.name}")
project.android {
ndkVersion '@ANDROID_NDK_REVISION@'
}
}
}
}