ext { | |
nativeName = 'wpilibNewCommands' | |
devMain = 'edu.wpi.first.wpilibj.commands.DevMain' | |
} | |
evaluationDependsOn(':ntcore') | |
evaluationDependsOn(':cscore') | |
evaluationDependsOn(':hal') | |
evaluationDependsOn(':wpilibc') | |
evaluationDependsOn(':cameraserver') | |
evaluationDependsOn(':wpilibj') | |
apply from: "${rootDir}/shared/javacpp/setupBuild.gradle" | |
dependencies { | |
implementation project(':wpiutil') | |
implementation project(':ntcore') | |
implementation project(':cscore') | |
implementation project(':hal') | |
implementation project(':wpilibj') | |
devImplementation project(':wpiutil') | |
devImplementation project(':ntcore') | |
devImplementation project(':cscore') | |
devImplementation project(':hal') | |
devImplementation project(':wpilibj') | |
testImplementation 'com.google.guava:guava:19.0' | |
testImplementation 'org.mockito:mockito-core:2.27.0' | |
} | |
nativeUtils.exportsConfigs { | |
wpilibNewCommands { | |
x86ExcludeSymbols = ['_CT??_R0?AV_System_error', '_CT??_R0?AVexception', '_CT??_R0?AVfailure', | |
'_CT??_R0?AVruntime_error', '_CT??_R0?AVsystem_error', '_CTA5?AVfailure', | |
'_TI5?AVfailure', '_CT??_R0?AVout_of_range', '_CTA3?AVout_of_range', | |
'_TI3?AVout_of_range', '_CT??_R0?AVbad_cast'] | |
x64ExcludeSymbols = ['_CT??_R0?AV_System_error', '_CT??_R0?AVexception', '_CT??_R0?AVfailure', | |
'_CT??_R0?AVruntime_error', '_CT??_R0?AVsystem_error', '_CTA5?AVfailure', | |
'_TI5?AVfailure', '_CT??_R0?AVout_of_range', '_CTA3?AVout_of_range', | |
'_TI3?AVout_of_range', '_CT??_R0?AVbad_cast'] | |
} | |
} | |
apply plugin: DisableBuildingGTest | |
model { | |
components {} | |
binaries { | |
all { | |
if (!it.buildable || !(it instanceof NativeBinarySpec)) { | |
return | |
} | |
lib project: ':wpilibc', library: 'wpilibc', linkage: 'shared' | |
lib project: ':ntcore', library: 'ntcore', linkage: 'shared' | |
project(':hal').addHalDependency(it, 'shared') | |
lib project: ':wpiutil', library: 'wpiutil', linkage: 'shared' | |
if (it.component.name == "${nativeName}Dev") { | |
lib project: ':ntcore', library: 'ntcoreJNIShared', linkage: 'shared' | |
project(':hal').addHalJniDependency(it) | |
} | |
if (it instanceof GoogleTestTestSuiteBinarySpec) { | |
nativeUtils.useRequiredLibrary(it, 'opencv_shared') | |
lib project: ':cscore', library: 'cscore', linkage: 'shared' | |
} | |
if ((it instanceof NativeExecutableBinarySpec || it instanceof GoogleTestTestSuiteBinarySpec) && it.targetPlatform.name == nativeUtils.wpi.platforms.roborio) { | |
nativeUtils.useRequiredLibrary(it, 'netcomm_shared', 'chipobject_shared', 'visa_shared', 'ni_runtime_shared') | |
} | |
} | |
} | |
tasks { | |
def c = $.components | |
def found = false | |
def systemArch = getCurrentArch() | |
c.each { | |
if (it in NativeExecutableSpec && it.name == "${nativeName}Dev") { | |
it.binaries.each { | |
if (!found) { | |
def arch = it.targetPlatform.name | |
if (arch == systemArch) { | |
def filePath = it.tasks.install.installDirectory.get().toString() + File.separatorChar + 'lib' | |
found = true | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
test { | |
testLogging { | |
outputs.upToDateWhen {false} | |
showStandardStreams = true | |
} | |
} |