mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-03 03:01:44 +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,7 @@
|
||||
if (project.hasProperty('onlylinuxathena')) {
|
||||
return;
|
||||
}
|
||||
|
||||
description = "A plugin that listens on a socket so that you can use the real Driver Station software to connect to the simulation"
|
||||
|
||||
ext {
|
||||
@@ -7,7 +11,6 @@ ext {
|
||||
|
||||
apply plugin: 'google-test-test-suite'
|
||||
|
||||
|
||||
ext {
|
||||
staticGtestConfigs = [:]
|
||||
}
|
||||
@@ -17,28 +20,22 @@ apply from: "${rootDir}/shared/googletest.gradle"
|
||||
|
||||
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