| plugins { |
| id 'java' |
| id 'application' |
| id 'cpp' |
| id 'visual-studio' |
| } |
| |
| apply plugin: 'edu.wpi.first.NativeUtils' |
| |
| apply from: "${rootDir}/shared/config.gradle" |
| |
| ext { |
| staticCvConfigs = [multiCameraServerCpp: []] |
| useJava = true |
| useCpp = true |
| skipDev = true |
| } |
| |
| apply from: "${rootDir}/shared/opencv.gradle" |
| |
| application { |
| mainClass = 'edu.wpi.Main' |
| } |
| |
| apply plugin: 'com.github.johnrengelman.shadow' |
| |
| repositories { |
| maven { |
| url = 'https://frcmaven.wpi.edu/artifactory/ex-mvn' |
| } |
| } |
| |
| dependencies { |
| implementation 'com.google.code.gson:gson:2.10.1' |
| |
| implementation project(':wpiutil') |
| implementation project(':wpinet') |
| implementation project(':ntcore') |
| implementation project(':cscore') |
| implementation project(':cameraserver') |
| } |
| |
| model { |
| components { |
| multiCameraServerCpp(NativeExecutableSpec) { |
| sources { |
| cpp { |
| source { |
| srcDirs = ['src/main/native/cpp'] |
| includes = ['**/*.cpp'] |
| } |
| exportedHeaders { |
| srcDirs = ['src/main/native/include'] |
| includes = ['**/*.h'] |
| } |
| } |
| } |
| binaries.all { binary -> |
| lib project: ':cameraserver', library: 'cameraserver', linkage: 'static' |
| project(':ntcore').addNtcoreDependency(binary, 'static') |
| lib project: ':cscore', library: 'cscore', linkage: 'static' |
| lib project: ':wpinet', library: 'wpinet', linkage: 'static' |
| lib project: ':wpiutil', library: 'wpiutil', linkage: 'static' |
| if (binary.targetPlatform.name == nativeUtils.wpi.platforms.roborio) { |
| nativeUtils.useRequiredLibrary(binary, 'ni_link_libraries', 'ni_runtime_libraries') |
| } |
| } |
| } |
| } |
| } |