mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
[build] Fix gazebo gradle IDE warnings (#3806)
Also add note on how to generate all files for the IDE.
This commit is contained in:
@@ -71,6 +71,8 @@ The gradlew wrapper only exists in the root of the main project, so be sure to r
|
||||
|
||||
There are a few tasks other than `build` available. To see them, run the meta-task `tasks`. This will print a list of all available tasks, with a description of each task.
|
||||
|
||||
If opening from a fresh clone, generated java dependencies will not exist. Most IDEs will not run the generation tasks, which will cause lots of IDE errors. Manually run `./gradlew compileJava` from a terminal to run all the compile tasks, and then refresh your IDE's configuration (In VS Code open settings.gradle and save).
|
||||
|
||||
### Faster builds
|
||||
|
||||
`./gradlew build` builds _everything_, which includes debug and release builds for desktop and all installed cross compilers. Many developers don't need or want to build all of this. Therefore, common tasks have shortcuts to only build necessary components for common development and testing tasks.
|
||||
|
||||
@@ -24,6 +24,8 @@ try {
|
||||
} catch(Exception ex) {
|
||||
}
|
||||
|
||||
ext.skip_gz_msgs = false
|
||||
|
||||
if (project.hasProperty("forceGazebo")) {
|
||||
if (!protobuf_version?.trim()) {
|
||||
println "Protobuf is not available. (pkg-config --modversion protobuf failed)"
|
||||
@@ -38,9 +40,11 @@ tasks.whenTaskAdded { task ->
|
||||
task.onlyIf { !project.hasProperty('skip_gz_msgs') }
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation "com.google.protobuf:protobuf-java:${protobuf_version}"
|
||||
implementation "com.google.protobuf:protoc:${protobuf_version}"
|
||||
if (!ext.skip_gz_msgs) {
|
||||
dependencies {
|
||||
implementation "com.google.protobuf:protobuf-java:${protobuf_version}"
|
||||
implementation "com.google.protobuf:protoc:${protobuf_version}"
|
||||
}
|
||||
}
|
||||
|
||||
/* There is a nice gradle plugin for protobuf, and the protoc tool
|
||||
|
||||
Reference in New Issue
Block a user