Brian Silverman | 8fce748 | 2020-01-05 13:18:21 -0800 | [diff] [blame] | 1 | ext { |
| 2 | nativeName = 'wpilibOldCommands' |
| 3 | devMain = 'edu.wpi.first.wpilibj.commands.DevMain' |
| 4 | } |
| 5 | |
| 6 | evaluationDependsOn(':ntcore') |
| 7 | evaluationDependsOn(':cscore') |
| 8 | evaluationDependsOn(':hal') |
Austin Schuh | 1e69f94 | 2020-11-14 15:06:14 -0800 | [diff] [blame^] | 9 | evaluationDependsOn(':wpimath') |
Brian Silverman | 8fce748 | 2020-01-05 13:18:21 -0800 | [diff] [blame] | 10 | evaluationDependsOn(':wpilibc') |
| 11 | evaluationDependsOn(':cameraserver') |
| 12 | evaluationDependsOn(':wpilibj') |
| 13 | |
| 14 | apply from: "${rootDir}/shared/javacpp/setupBuild.gradle" |
| 15 | |
| 16 | dependencies { |
| 17 | implementation project(':wpiutil') |
| 18 | implementation project(':ntcore') |
| 19 | implementation project(':cscore') |
| 20 | implementation project(':hal') |
Austin Schuh | 1e69f94 | 2020-11-14 15:06:14 -0800 | [diff] [blame^] | 21 | implementation project(':wpimath') |
Brian Silverman | 8fce748 | 2020-01-05 13:18:21 -0800 | [diff] [blame] | 22 | implementation project(':wpilibj') |
| 23 | devImplementation project(':wpiutil') |
| 24 | devImplementation project(':ntcore') |
| 25 | devImplementation project(':cscore') |
| 26 | devImplementation project(':hal') |
Austin Schuh | 1e69f94 | 2020-11-14 15:06:14 -0800 | [diff] [blame^] | 27 | devImplementation project(':wpimath') |
Brian Silverman | 8fce748 | 2020-01-05 13:18:21 -0800 | [diff] [blame] | 28 | devImplementation project(':wpilibj') |
| 29 | } |
| 30 | |
| 31 | nativeUtils.exportsConfigs { |
| 32 | wpilibOldCommands { |
| 33 | x86ExcludeSymbols = ['_CT??_R0?AV_System_error', '_CT??_R0?AVexception', '_CT??_R0?AVfailure', |
| 34 | '_CT??_R0?AVruntime_error', '_CT??_R0?AVsystem_error', '_CTA5?AVfailure', |
| 35 | '_TI5?AVfailure', '_CT??_R0?AVout_of_range', '_CTA3?AVout_of_range', |
| 36 | '_TI3?AVout_of_range', '_CT??_R0?AVbad_cast'] |
| 37 | x64ExcludeSymbols = ['_CT??_R0?AV_System_error', '_CT??_R0?AVexception', '_CT??_R0?AVfailure', |
| 38 | '_CT??_R0?AVruntime_error', '_CT??_R0?AVsystem_error', '_CTA5?AVfailure', |
| 39 | '_TI5?AVfailure', '_CT??_R0?AVout_of_range', '_CTA3?AVout_of_range', |
| 40 | '_TI3?AVout_of_range', '_CT??_R0?AVbad_cast'] |
| 41 | } |
| 42 | } |
| 43 | |
| 44 | apply plugin: DisableBuildingGTest |
| 45 | |
| 46 | model { |
| 47 | components {} |
| 48 | binaries { |
| 49 | all { |
| 50 | if (!it.buildable || !(it instanceof NativeBinarySpec)) { |
| 51 | return |
| 52 | } |
| 53 | lib project: ':wpilibc', library: 'wpilibc', linkage: 'shared' |
| 54 | lib project: ':ntcore', library: 'ntcore', linkage: 'shared' |
| 55 | project(':hal').addHalDependency(it, 'shared') |
| 56 | lib project: ':wpiutil', library: 'wpiutil', linkage: 'shared' |
Austin Schuh | 1e69f94 | 2020-11-14 15:06:14 -0800 | [diff] [blame^] | 57 | lib project: ':wpimath', library: 'wpimath', linkage: 'shared' |
Brian Silverman | 8fce748 | 2020-01-05 13:18:21 -0800 | [diff] [blame] | 58 | |
| 59 | if (it.component.name == "${nativeName}Dev") { |
| 60 | lib project: ':ntcore', library: 'ntcoreJNIShared', linkage: 'shared' |
| 61 | project(':hal').addHalJniDependency(it) |
| 62 | } |
| 63 | |
| 64 | if (it instanceof GoogleTestTestSuiteBinarySpec) { |
| 65 | nativeUtils.useRequiredLibrary(it, 'opencv_shared') |
| 66 | lib project: ':cscore', library: 'cscore', linkage: 'shared' |
| 67 | } |
| 68 | if ((it instanceof NativeExecutableBinarySpec || it instanceof GoogleTestTestSuiteBinarySpec) && it.targetPlatform.name == nativeUtils.wpi.platforms.roborio) { |
| 69 | nativeUtils.useRequiredLibrary(it, 'netcomm_shared', 'chipobject_shared', 'visa_shared', 'ni_runtime_shared') |
| 70 | } |
| 71 | } |
| 72 | } |
| 73 | tasks { |
| 74 | def c = $.components |
| 75 | def found = false |
| 76 | def systemArch = getCurrentArch() |
| 77 | c.each { |
| 78 | if (it in NativeExecutableSpec && it.name == "${nativeName}Dev") { |
| 79 | it.binaries.each { |
| 80 | if (!found) { |
| 81 | def arch = it.targetPlatform.name |
| 82 | if (arch == systemArch) { |
| 83 | def filePath = it.tasks.install.installDirectory.get().toString() + File.separatorChar + 'lib' |
| 84 | |
| 85 | found = true |
| 86 | } |
| 87 | } |
| 88 | } |
| 89 | } |
| 90 | } |
| 91 | } |
| 92 | } |
| 93 | |
| 94 | test { |
| 95 | testLogging { |
| 96 | outputs.upToDateWhen {false} |
| 97 | showStandardStreams = true |
| 98 | } |
| 99 | } |