How would I create a Java FRC library?

Me, along with the other programmers on our team have developed a small set of classes that we re-use in our projects. We’d like to bundle these classes into one library/repo and publish it on GitHub for anyone to use.

However, I’m not sure on where to get started on doing this, as I’ve never made a library in Java before. Although, I’ve had experience writing libraries in other programming languages like C or Lua, but writing libraries for those languages is very simple, all you had to do is include the header at the top of the file.

So I’m not exactly sure what to do. I’m guessing that I have to create a new repo, set the package name to whatever I feel like, and write the classes in there, and upload that repo to github/etc … But how would other teams import and use our library?

Any help is greatly appreciated :>

1 Like

I would recommend packaging it up and uploading it to Maven Central. From there, any team can use it as a dependency in their build.gradle (or build.gradle.kts) file, and then just import the classes from the package

1 Like