Created
January 27, 2015 00:50
-
-
Save ThomasJClark/0ed21bc24c395aa2e9b4 to your computer and use it in GitHub Desktop.
WPILib grade build
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
plugins { | |
id "java" | |
id 'org.hidetake.ssh' version '0.4.5' | |
} | |
sourceCompatibility = '1.8' | |
targetCompatibility = '1.8' | |
def wpilibDir = System.env['HOME'] + '/wpilib/java/current' | |
repositories { | |
mavenCentral() | |
flatDir { | |
dirs wpilibDir + '/lib' | |
} | |
} | |
dependencies { | |
compile name: 'NetworkTables' | |
compile name: 'WPILib' | |
} | |
remotes { | |
roboRIO { | |
host = 'roboRIO-' + team + '.local' | |
user = 'admin' | |
password = '' | |
} | |
} | |
ssh.settings { | |
knownHosts = allowAnyHosts | |
} | |
jar { | |
baseName = 'FRCUserProgram' | |
manifest { | |
attributes 'Main-Class': 'edu.wpi.first.wpilibj.RobotBase', | |
'Robot-Class': robotClass | |
} | |
from { | |
configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } | |
} | |
} | |
task deploy(dependsOn: 'jar') << { | |
description = "Deploy the user program to the roboRIO" | |
ssh.run { | |
session(remotes.roboRIO) { | |
put jar.archivePath, '/home/lvuser' | |
put wpilibDir + '/ant/robotCommand', '/home/lvuser' | |
execute '. /etc/profile.d/natinst-path.sh; /usr/local/frc/bin/frcKillRobot.sh -t -r' | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Use this file to set your main class and team number | |
robotClass = org.usfirst.frc.team190.robot.Robot | |
team = 190 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment