blob: c8a4cb916e32472df00fa6f6ce6c114e576c86c6 [file] [log] [blame]
Brian Silverman8fce7482020-01-05 13:18:21 -08001ext {
2 nativeName = 'wpilibOldCommands'
3 devMain = 'edu.wpi.first.wpilibj.commands.DevMain'
4}
5
6evaluationDependsOn(':ntcore')
7evaluationDependsOn(':cscore')
8evaluationDependsOn(':hal')
Austin Schuh1e69f942020-11-14 15:06:14 -08009evaluationDependsOn(':wpimath')
Brian Silverman8fce7482020-01-05 13:18:21 -080010evaluationDependsOn(':wpilibc')
11evaluationDependsOn(':cameraserver')
12evaluationDependsOn(':wpilibj')
13
14apply from: "${rootDir}/shared/javacpp/setupBuild.gradle"
15
16dependencies {
17 implementation project(':wpiutil')
18 implementation project(':ntcore')
19 implementation project(':cscore')
20 implementation project(':hal')
Austin Schuh1e69f942020-11-14 15:06:14 -080021 implementation project(':wpimath')
Brian Silverman8fce7482020-01-05 13:18:21 -080022 implementation project(':wpilibj')
23 devImplementation project(':wpiutil')
24 devImplementation project(':ntcore')
25 devImplementation project(':cscore')
26 devImplementation project(':hal')
Austin Schuh1e69f942020-11-14 15:06:14 -080027 devImplementation project(':wpimath')
Brian Silverman8fce7482020-01-05 13:18:21 -080028 devImplementation project(':wpilibj')
29}
30
31nativeUtils.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
44apply plugin: DisableBuildingGTest
45
46model {
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 Schuh1e69f942020-11-14 15:06:14 -080057 lib project: ':wpimath', library: 'wpimath', linkage: 'shared'
Brian Silverman8fce7482020-01-05 13:18:21 -080058
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
94test {
95 testLogging {
96 outputs.upToDateWhen {false}
97 showStandardStreams = true
98 }
99}