mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
Adds spotless formatting for Gradle, xml, md, and gitignore files. yml linting is not performed as it requires a dependency on npm.
55 lines
1.7 KiB
Groovy
55 lines
1.7 KiB
Groovy
description = "A shared object library that will interface between a robot and the Gazebo plugins."
|
|
|
|
apply plugin: 'edu.wpi.first.NativeUtils'
|
|
apply plugin: 'cpp'
|
|
|
|
ext.skiplinuxathena = true
|
|
ext.skiplinuxraspbian = true
|
|
ext.pluginName = 'halsim_gazebo'
|
|
|
|
/* If gz_msgs or gazebo is not available, do not attempt a build */
|
|
def gazebo_version = ""
|
|
def gazebo_cppflags = ""
|
|
def gazebo_linker_args = ""
|
|
|
|
try {
|
|
gazebo_version = "pkg-config --modversion gazebo".execute().text.trim()
|
|
println "Gazebo version is [${gazebo_version}]"
|
|
gazebo_cppflags = "pkg-config --cflags gazebo".execute().text.split()
|
|
gazebo_linker_args = "pkg-config --libs gazebo protobuf".execute().text.split()
|
|
} catch(Exception ex) { }
|
|
|
|
if (project.hasProperty("makeSim")) {
|
|
if (!gazebo_version?.trim()) {
|
|
println "Gazebo development files are not available. (pkg-config --modversion gazebo failed)"
|
|
println "makeSim set. Forcing build - failure likely."
|
|
}
|
|
} else {
|
|
ext.skip_frc_plugins = true
|
|
println "Skipping FRC Plugins."
|
|
}
|
|
|
|
evaluationDependsOn(":simulation:gz_msgs")
|
|
def gz_msgs_project = project(":simulation:gz_msgs")
|
|
|
|
if (!gz_msgs_project.hasProperty('skip_gz_msgs') && !project.hasProperty('skip_frc_plugins')) {
|
|
|
|
apply from: "${rootDir}/shared/plugins/setupBuild.gradle"
|
|
}
|
|
|
|
model {
|
|
binaries {
|
|
all {
|
|
if (it instanceof StaticLibraryBinarySpec) {
|
|
it.buildable = false
|
|
return
|
|
}
|
|
linker.args gazebo_linker_args
|
|
cppCompiler.args gazebo_cppflags
|
|
lib project: ":simulation:gz_msgs", library: "gz_msgs", linkage: "static"
|
|
}
|
|
}
|
|
}
|
|
|
|
/* TODO: Publish this library */
|