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:
@@ -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@'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user