Files
allwpilib/simulation/halsim_ws_core/build.gradle
Tyler Veness 5f651df5d5 [build] Clean up Gradle configs (#5685)
Putting an early exit if statement at the top instead of wrapping the
whole file contents unbreaks unit test configs, as was discovered for
SysId. It reduces nesting as well.

Unused plugins were removed from the beginnings of files as well.
2023-09-27 21:45:25 -07:00

59 lines
1.4 KiB
Groovy

if (project.hasProperty('onlylinuxathena')) {
return;
}
apply plugin: 'cpp'
apply plugin: 'edu.wpi.first.NativeUtils'
apply plugin: ExtraTasks
description = "Core library for WebSocket extensions"
ext {
includeWpiutil = true
includeWpinet = true
pluginName = 'halsim_ws_core'
}
apply plugin: 'google-test-test-suite'
ext {
staticGtestConfigs = [:]
}
staticGtestConfigs["${pluginName}Test"] = []
apply from: "${rootDir}/shared/googletest.gradle"
apply from: "${rootDir}/shared/config.gradle"
apply from: "${rootDir}/shared/plugins/publish.gradle"
model {
components {
halsim_ws_core(NativeLibrarySpec) {
sources.cpp {
source {
srcDirs = ['src/main/native/cpp']
includes = ["**/*.cpp"]
}
exportedHeaders {
srcDirs = ["src/main/native/include"]
}
}
binaries.all {
project(':hal').addHalDependency(it, 'shared')
lib project: ':wpinet', library: 'wpinet', linkage: 'shared'
lib project: ':wpiutil', library: 'wpiutil', linkage: 'shared'
}
appendDebugPathToBinaries(binaries)
}
}
binaries {
all {
if (it.targetPlatform.name == nativeUtils.wpi.platforms.roborio) {
it.buildable = false
return
}
}
}
}