You’re right! I added that to build.gradle and it worked flawlessly. I guess when you create a template in vscode it doesn’t add that repository section in the build.gradle. thank you everyone for you help!
I would not recommend following this advice - adding to build.gradle allows you to more easily update dependencies when needed and automatically download them when first setting up a project on a new computer. Adding to build.gradle is a more standard-compliant way to track dependencies, and will help prevent accidents where one forgets to download one of them. The manual download way is (as far as I can remember) deprecated for next year.
As was stated elsewhere in the thread, the repositories block isn’t a part of the template’s build.gradle, so will need to be added manually.
Yup. Downloading and placing into a folder is a brute force way of making sure you have exactly the same jar every build (say, if you don’t trust Gradle to do that for some reason, or it’s not available in a repository, or something like that maybe… eh).
The key is that you don’t want it outside of version control. Putting into the local disk User folder will mean that any time you want to change that Jar version (or deply from a new PC), you have to manually update the file. Not the end of the world, but definitely doesn’t scale well (what if you had to maintain this project for 5 years, onboarding someone new every month? what if you had to change the version of that jar file every month?).
The folder in user/wpilib will no longer work in 2019, and doesn’t work in the alpha either. So for the gradlerio stuff, in the build.gradle is absolutely the right way to do it.
Technically the stuff in the build.gradle file isn’t in the version control either, because the actual dependencies get put in your local gradle repo.
(generally in USER_HOME/.gradle/)
Very true! In the case of gradle, you create files in version control that specify to the tool what .jar’s you need (rather than just keeping the .jar’s themselves there). Insert explanation about why caching is good in this case here.
I have the new vscode working with the plugins.(java) We are using the zip portable version of vscode. I have added the data folder to make it portable. I was able to build the code at home where I have normal internet. At school the district blocks the download of the dependency jar files. I thought the downloads would be saved in the vscode data folder and then we could build at school. Any work arounds for restrictive school internet environments when trying to build the code? What about at competition? I could see either not having internet or having a restricted internet and then not being able to build. Any suggestions?