Help setting up external librarys with GradleRio and Intellij

help

#1

I have created a 2019 GradleRIO project and imported to intellij and all the all the default library’s work. (except for junit but we don’t need it) However we use talons and a navx, so I created a folder called venderdeps like the gradleRio docs say, and I put the .json files for navx and ctre inside the folder. This doesn’t work. I have seen something about an frc2019 folder, but I am unsure what installs it. I assume I missed something, or I don’t understand this new installation process enough. Any help would be great!

edit: The vendor library’s work great on a different computer, will double check why. Thanks for the quick reply’s.


#2

Did you call the folder “vendordep” or “vendordeps”? The latter is correct.


#3

venderdeps. typo. fixed.


#4

Is Gradle detected in your IntelliJ project? There should be a Gradle tab on the right side of the IntelliJ window if it is (Next to Ant Build and Maven Projects). If not, close your IntelliJ window and reopen it. You should immediately get a message to import the project as a Gradle Project (If not, in the bottom-right, select Event Log and the message will also appear there). Import it and the libraries will appear.

Otherwise, if your project is already detected with Gradle in it, select the Gradle tab and click the little refresh button on it so that it will populate the libraries into your project.

Also, this should all be done with an internet connection the first time you do this so that Gradle will be able to download the libraries from the internet into your project. An internet connection is not needed for subsequent builds/deploys.


#5

I would recommend teams use the WPILib offline installer at the very least to get everything set up consistently, even if they don’t use vscode. This also avoids the need for a network connection to cache everything at first use. I also recommend you use vscode to at least create your project (there’s also a separate project creator if you are really opposed to installing vscode).


#6

I will try creating it with vscode/project creator, but having to reopen it in another program every time I wish to add a library will get tedious.


#7

It is detected and the refresh does not fix it.


#8

You can try opening the project in VS code and install the third party-libraries according to this. Again, this only needs to be run once, then you can code the rest of your project in IntelliJ


#9

Can you run a ./gradlew help --info and post the log? That will tell us whether your deps are being detected or not