View Single Post
  #3   Spotlight this post!  
Unread 06-07-2014, 19:06
jamestautges jamestautges is offline
Registered User
FRC #1306 (Badgerbots)
Team Role: Programmer
 
Join Date: Nov 2013
Rookie Year: 2012
Location: Madison, WI
Posts: 4
jamestautges is an unknown quantity at this point
Re: Adding a custom library to Robot Code? (Java)

Go into the build.xml file and add something along the lines of the following code:
Code:
<exec executable="rm">
    <arg value="-rf" />
    <arg value="/path/to/robot/project/src/LibraryName" />
</exec>
<exec executable="cp">
    <arg value="-R" />
    <arg value="/path/to/library/src/org" />
    <arg value="src/" />
</exec>
This copies the library to the robot project's src directory which makes it available during the build. The rm makes sure that the directory is updated every build, in case the library has changed. If you're using windows, you'll have to change the command names, but this should work on any Unix system.
Reply With Quote