Gradle Build Issues Involving Vendor Dependencies after Cloning Repository

I am in the process of having several of my students refamiliarize themselves with code from last year. I had 3 of them install the WPILib install of VSCode and clone our repository using git. Mind you, this code builds, and did so on 2 of the 3 students’ machines. I have one student that received almost immediate failure upon attempting to build robot code in VSCode.

In VSCode, my student was getting squiggly line errors in the build.gradle file on the import at the top telling them that particular vendor dependencies were unable to be resolved.

I would like to be able to run a gradle build in debug mode for more information about what exactly it is breaking on so I can get better help. I am fairly certain it’s very simple, however, I haven’t been successful in attempting to run a build from command line with the --debug, etc. options. If someone could get us started there, that would be appreciated.

1 Like

Did the student build with an internet connection?

The easiest ways to figure Gradle errors out is to look at the terminal that pops up, and scroll up to the top or until you see red text. That’ll give a lot more info.

1 Like

They did build with an internet connection.

To my knowledge, the output shown in the terminal was nothing more than the build failed message, no indication as to what went wrong.

Any idea how to run gradlew build from command line with the options? My inability to solve this issue myself revolves around my limited understanding of gradle. Any good content, preferably simple English walkthrough would be preferable.

Gradle tends to be very verbose, often such that the real error message is off the screen. This isn’t helped by vscode hiding the scroll bar until you mouse over. I suspect all you need to do is scroll up.

For example, here’s an example of a build failure:

But when you scroll up about 10 screens, you get to the real problem:

3 Likes

Make sure the student is using the VS Code that was installed with WPILib, not a standalone installation.

I had a student somehow managed to get the WPIlib extension in VS Code, but he had not used the WPILib installer. :man_shrugging:

1 Like

U can use regular VScode, you just need to download and install the wpilib extension.

I hope it’s that simple. We will be trying again over the next few days sometime. Hopefully I can share the root cause of build failure and maybe the solution.

This is true, however the vscode packaged with wpilib is tested and known to be compatible. The WPIlib installer also packages a known good version of the JDK that the packaged vscode will use. It is highly recommended to use the vscode packaged with wpilib.

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.