Files
allwpilib/shared/opencv.gradle
Sam Carlberg 793b0a3187 [build] Migrate to Gradle version catalogs (#8524)
Also fixes the google compile-testing library to 0.23.0 (the latest
available at time of writing) instead of a wildcard

Jackson versions were inconsistent across projects; most were on 2.19.2,
but the fields subproject was on 2.15.2. All projects are now on 2.19.2
for consistency
2026-02-20 15:31:33 -08:00

32 lines
1.1 KiB
Groovy

if (project.hasProperty('useCpp') && project.useCpp) {
model {
binaries {
withType(NativeBinarySpec).all {
def binary = it
project.sharedCvConfigs.each {
if (binary.component.name == it.key) {
nativeUtils.useRequiredLibrary(binary, 'opencv_shared')
}
}
project.staticCvConfigs.each {
if (binary.component.name == it.key) {
nativeUtils.useRequiredLibrary(binary, 'opencv_static')
}
}
}
}
}
}
if (project.hasProperty('useJava') && project.useJava) {
dependencies {
implementation libs.thirdparty.opencv
if (!project.hasProperty('skipDev') || !project.skipDev) {
devImplementation libs.thirdparty.opencv
}
if (project.hasProperty('useDocumentation') && project.useDocumentation) {
javaSource(variantOf(libs.thirdparty.opencv) { classifier("sources") })
}
}
}