mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-06 03:31:43 +00:00
[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.
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
if (project.hasProperty('onlylinuxathena')) {
|
||||
return;
|
||||
}
|
||||
|
||||
description = "WebSocket Server Extension"
|
||||
|
||||
@@ -20,25 +23,20 @@ apply from: "${rootDir}/shared/plugins/setupBuild.gradle"
|
||||
|
||||
model {
|
||||
testSuites {
|
||||
def comps = $.components
|
||||
if (!project.hasProperty('onlylinuxathena')) {
|
||||
"${pluginName}Test"(GoogleTestTestSuiteSpec) {
|
||||
for(NativeComponentSpec c : comps) {
|
||||
if (c.name == pluginName) {
|
||||
testing c
|
||||
break
|
||||
}
|
||||
"${pluginName}Test"(GoogleTestTestSuiteSpec) {
|
||||
for(NativeComponentSpec c : $.components) {
|
||||
if (c.name == pluginName) {
|
||||
testing c
|
||||
break
|
||||
}
|
||||
sources {
|
||||
cpp {
|
||||
source {
|
||||
srcDirs 'src/test/native/cpp'
|
||||
include '**/*.cpp'
|
||||
}
|
||||
exportedHeaders {
|
||||
srcDirs 'src/test/native/include', 'src/main/native/cpp'
|
||||
}
|
||||
}
|
||||
}
|
||||
sources.cpp {
|
||||
source {
|
||||
srcDirs 'src/test/native/cpp'
|
||||
include '**/*.cpp'
|
||||
}
|
||||
exportedHeaders {
|
||||
srcDirs 'src/test/native/include', 'src/main/native/cpp'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user