Java Environment Setup Help

Hey all,

I apologize if this has already been addressed. I’m a mentor and I’m trying to make programming as least discouraging as possible. Part of the discouragement, is just the mere setup of FRC JAVA infrastructure. What I wanted to do preseason, but even more now, is have a central location of libraries, jars, javadocs etc. such that any of my students can deploy code from their laptops.

I code in fairly primitive/cowboy languages primarily (i.e. MS VBA, PERL, etc.) so setting up environments is not my forte. So my question, is for 8 programmers on 10 laptops how do I create a repeatable process to setup WPI and third party libraries. We currently use (in addition to WPI of course) CTRE, NAVx, PathFinder, and Raspberry PI (RPI may be a separate implementation).

We use github currently, is there a way to put “all the stuffs” there?

Does my question make sense, how can I clarify this?

We use GradleRIO, it vastly simplifies downloading and controlling versions of libraries including wpilib, CTRE, NAVX, and PathFinder. And it makes builds / deploys much faster too, so that’s nice.

Here are the docs on how to use GradleRIO.

1 Like

I did run across this in another post:
would it help with javadocs as well? .
Do you mind sending me your files for me to look at for an example?

Once I create my setup, how do I make it portable to the 9 other setups… or would I have to RUN “./gradlew eclipse” on all setups

My team uses the default wpi java plugins, but makes the user libs folder a GitHub repository. Then each programmer clones the repository to that folder and gets all the libs. If there’s an update to any of the libraries, only 1 person has to redownload the libraries and put them in the folder, because that person then pushes their lib folder to GitHub and everyone else pulls.

It is a little tricky to set up initially, but onces it works it’s very easy to set up for a new laptop.

That’s another interesting solution. Thanks for that!

Follow up questions:

When you deploy robot code, are you somehow ignoring the deployment of those libraries onto the roboRio?

Perhaps that’s a stupid question?

No, the wpi plugin deploys the libraries in the user libs folder like it normally would. WPI does automatically ignore all the extra files in that folder that are related to the GitHub repository - it only deploys the libraries. For now, if you’re already using the wpi plugins to deploy I would stick with it, but I would try out GradleRIO in the off-season. I didn’t get to it last year, but everyone who tries it seems to love it. Hopefully the wpi plugins make some improvements in that area for next season.