"Team private" libraries when using VSC Alpha

our 2018 code had some non-standard libraries; we made a /lib/ folder in the project, put the jars there, added the folder to the Eclipse build (so eclipse was happy), and listed the folder in build.properties (userLibs=lib/) so that Ant was happy when building.

How do we do this in the brave new world?

Assuming they’re publically available in repositories (and not custom-made ones that you build locally on the pc’s), here’s how we’re (attempting) to do it so far:

If you do want a local file, you can do the following. The root is the root of your project.


 compile files('lib/something_local.jar')

Put that inside your dependencies block.

that did it.

I see that ctre() wpilib() and navx() are all defined. Is there one for pathfinder?

I can place the pathfinder.jar we have been using in lib/ and call it out, but I don’t know how to handle the .so…

You should also be able to create your own repository by adding


repositories {
    maven { url "file://" + projectDir + "/libs/java" }
}

And then using maven repository folder structure in the libs/java folder.

Example:

Have your jar in the following folder:

{project_directory}/libs/java/my/group/id/artifactid/version/artifactid-version.jar

and then add this in your dependencies section of your build.gradle

compile group: 'my.group.id', name: 'artifactid', version: 'version'

If you also have native dependencies, you can also add the following to your dependencies section as well to pick up those files.

nativeLib  fileTree(dir: 'libs/native', include: '*.so')

EDIT:

For pathfinder there is a import function as well.
Just put the following in your dependencies section.

compile pathfinder()

Between this and the main thread, I’ll toss in a suggestion that a useful documentation section could be “Recipies” that shows short snippits of the recommended way of doing some of these advanced-but-somewhat-common actions.

This will do it:


pathfinder()