Squashed 'third_party/allwpilib/' content from commit b0167e633
Change-Id: I5653017a690eec1917e8fff9017195d8af307926
git-subtree-dir: third_party/allwpilib
git-subtree-split: b0167e6337135545e7053acb89dd5726accc7dec
diff --git a/shared/opencv.gradle b/shared/opencv.gradle
new file mode 100644
index 0000000..ca3764d
--- /dev/null
+++ b/shared/opencv.gradle
@@ -0,0 +1,33 @@
+def opencvVersion = '3.4.7-2'
+
+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 "edu.wpi.first.thirdparty.frc2020.opencv:opencv-java:${opencvVersion}"
+ if (!project.hasProperty('skipDev') || !project.skipDev) {
+ devImplementation "edu.wpi.first.thirdparty.frc2020.opencv:opencv-java:${opencvVersion}"
+ }
+ if (project.hasProperty('useDocumentation') && project.useDocumentation) {
+ javaSource "edu.wpi.first.thirdparty.frc2020.opencv:opencv-java:${opencvVersion}:sources"
+ }
+ }
+}