Skip to content

Instantly share code, notes, and snippets.

@JaciBrunning
Created January 8, 2017 06:48
Show Gist options
  • Save JaciBrunning/bfe30eb366ad3d679e88fc19e9652c25 to your computer and use it in GitHub Desktop.
Save JaciBrunning/bfe30eb366ad3d679e88fc19e9652c25 to your computer and use it in GitHub Desktop.
buildscript {
repositories {
mavenCentral()
maven {
name = "GradleRIO"
url = "http://dev.imjac.in/maven"
}
}
dependencies {
classpath group: 'jaci.openrio.gradle', name: 'GradleRIO', version: '+' //Change this line if you wish to Update GradleRIO
}
}
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'eclipse'
apply plugin: 'GradleRIO' //Apply the GradleRIO plugin
gradlerio.robotClass = "org.usfirst.frc.team0000.Robot" //The class for the main Robot Class. Used in manifest
gradlerio.team = "5333" //Your FRC team number (e.g. 5333 for team 'Can't C#', or 47 for Chief Delphi)
//gradlerio.rioIP = "10.53.33.20" //Uncomment to specify the IP address of the RIO
dependencies {
compile fileTree(dir: "<tooldir>", include: '**/*.jar')
}
def robotManifest = {
attributes 'Main-Class': 'edu.wpi.first.wpilibj.RobotBase'
attributes 'Robot-Class': gradlerio.robotClass
}
jar {
from configurations.compile.collect { it.isDirectory() ? it : zipTree(it) }
manifest robotManifest
}
task genJavadoc(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
artifacts {
archives genJavadoc
}
fileTree(dir: "<tooldir>", include: '**/*.so').each { File f ->
gradlerio.deployers += [ to: "/usr/local/frc/lib/${f.name}.jar", from: f.file ]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment