Brian Silverman | 8fce748 | 2020-01-05 13:18:21 -0800 | [diff] [blame] | 1 | plugins { |
| 2 | id 'java' |
| 3 | id 'application' |
| 4 | id 'cpp' |
| 5 | id 'visual-studio' |
| 6 | } |
| 7 | |
| 8 | apply plugin: 'edu.wpi.first.NativeUtils' |
| 9 | |
| 10 | apply from: "${rootDir}/shared/config.gradle" |
| 11 | |
| 12 | ext { |
| 13 | staticCvConfigs = [multiCameraServerCpp: []] |
| 14 | useJava = true |
| 15 | useCpp = true |
| 16 | skipDev = true |
| 17 | } |
| 18 | |
| 19 | apply from: "${rootDir}/shared/opencv.gradle" |
| 20 | |
James Kuszmaul | b13e13f | 2023-11-22 20:44:04 -0800 | [diff] [blame] | 21 | application { |
| 22 | mainClass = 'edu.wpi.Main' |
| 23 | } |
Brian Silverman | 8fce748 | 2020-01-05 13:18:21 -0800 | [diff] [blame] | 24 | |
| 25 | apply plugin: 'com.github.johnrengelman.shadow' |
| 26 | |
| 27 | repositories { |
James Kuszmaul | cf32412 | 2023-01-14 14:07:17 -0800 | [diff] [blame] | 28 | maven { |
| 29 | url = 'https://frcmaven.wpi.edu/artifactory/ex-mvn' |
| 30 | } |
Brian Silverman | 8fce748 | 2020-01-05 13:18:21 -0800 | [diff] [blame] | 31 | } |
| 32 | |
| 33 | dependencies { |
James Kuszmaul | b13e13f | 2023-11-22 20:44:04 -0800 | [diff] [blame] | 34 | implementation 'com.google.code.gson:gson:2.10.1' |
Brian Silverman | 8fce748 | 2020-01-05 13:18:21 -0800 | [diff] [blame] | 35 | |
| 36 | implementation project(':wpiutil') |
James Kuszmaul | cf32412 | 2023-01-14 14:07:17 -0800 | [diff] [blame] | 37 | implementation project(':wpinet') |
Brian Silverman | 8fce748 | 2020-01-05 13:18:21 -0800 | [diff] [blame] | 38 | implementation project(':ntcore') |
| 39 | implementation project(':cscore') |
| 40 | implementation project(':cameraserver') |
| 41 | } |
| 42 | |
| 43 | model { |
| 44 | components { |
| 45 | multiCameraServerCpp(NativeExecutableSpec) { |
Brian Silverman | 8fce748 | 2020-01-05 13:18:21 -0800 | [diff] [blame] | 46 | sources { |
| 47 | cpp { |
| 48 | source { |
| 49 | srcDirs = ['src/main/native/cpp'] |
| 50 | includes = ['**/*.cpp'] |
| 51 | } |
| 52 | exportedHeaders { |
| 53 | srcDirs = ['src/main/native/include'] |
| 54 | includes = ['**/*.h'] |
| 55 | } |
| 56 | } |
| 57 | } |
| 58 | binaries.all { binary -> |
Austin Schuh | 812d0d1 | 2021-11-04 20:16:48 -0700 | [diff] [blame] | 59 | lib project: ':cameraserver', library: 'cameraserver', linkage: 'static' |
James Kuszmaul | cf32412 | 2023-01-14 14:07:17 -0800 | [diff] [blame] | 60 | project(':ntcore').addNtcoreDependency(binary, 'static') |
Austin Schuh | 812d0d1 | 2021-11-04 20:16:48 -0700 | [diff] [blame] | 61 | lib project: ':cscore', library: 'cscore', linkage: 'static' |
James Kuszmaul | cf32412 | 2023-01-14 14:07:17 -0800 | [diff] [blame] | 62 | lib project: ':wpinet', library: 'wpinet', linkage: 'static' |
Austin Schuh | 812d0d1 | 2021-11-04 20:16:48 -0700 | [diff] [blame] | 63 | lib project: ':wpiutil', library: 'wpiutil', linkage: 'static' |
James Kuszmaul | b13e13f | 2023-11-22 20:44:04 -0800 | [diff] [blame] | 64 | if (binary.targetPlatform.name == nativeUtils.wpi.platforms.roborio) { |
| 65 | nativeUtils.useRequiredLibrary(binary, 'ni_link_libraries', 'ni_runtime_libraries') |
| 66 | } |
Brian Silverman | 8fce748 | 2020-01-05 13:18:21 -0800 | [diff] [blame] | 67 | } |
| 68 | } |
| 69 | } |
| 70 | } |