GradleRIO building both debug and release builds

#1

By default, for a c++ project, “WPILib Build” in VSCode builds the project six times: Athena debug/release, simulation debug/release, and test debug/release. Even when deploying, it still builds the code for both debug and release. Besides being slow, it’s annoying to see the same compiler errors repeated six times. Is there a way to only build the debug OR release build?

1 Like

#2

When deploying, Gradle will only build what it needs to. Are you certain that it is actually building both release and debug on deploy? You can run with ./gradlew deploy -Pdeploy-dry --console=plain, which should give some insight into what tasks are being run

0 Likes

#3

Well, that only starts compiling release, but it also terminates early as I’m not connected to a RIO. And the ordinary ./gradlew build builds all six still.

0 Likes