Skip to content

Commit

Permalink
Merge pull request #103 from blair-robot-project/gradlerio_update
Browse files Browse the repository at this point in the history
Update gradleRIO
  • Loading branch information
Noah Gleason authored Oct 30, 2017
2 parents b858653 + 865f25a commit 5cf3701
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 18 deletions.
52 changes: 34 additions & 18 deletions RoboRIO/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,9 @@ plugins {
id 'java'
id 'eclipse'
id 'idea'
id 'jaci.openrio.gradle.GradleRIO' version "2017.1.5"
id "jaci.openrio.gradle.GradleRIO" version "2017.10.30"
}

group 'org.usfirst.frc.team449.robot2017'
version '1.0'

repositories {
mavenCentral()
maven {
Expand All @@ -19,13 +16,39 @@ repositories {
maven { url "https://plugins.gradle.org/m2/" }
}

group 'org.usfirst.frc.team449.robot2017'
version '1.0'

def TEAM = 449
def ROBOT_CLASS = "org.usfirst.frc.team449.robot.Robot"

// Define my targets (RoboRIO) and artifacts (deployable files)
// This is added by GradleRIO's backing project EmbeddedTools.
deploy {
targets {
target("roborio", jaci.openrio.gradle.frc.RoboRIO) {
team = TEAM
}
}
artifacts {
artifact('frcJava', jaci.openrio.gradle.frc.FRCJavaArtifact) {
targets << "roborio"
}
}
}

wpi {
wpilibVersion = "2017.3.1" // The WPILib version to use. For this version of GradleRIO, must be a 2017 version.
ntcoreVersion = "3.1.7" // The NetworkTables Core version to use.
opencvVersion = "3.1.0" // The OpenCV version to use.
cscoreVersion = "1.0.2" // The CSCore version to use.
talonSrxVersion = "4.4.1.14" // The CTRE Toolsuite (Talon SRX) version to use.
ctreVersion = "4.4.1.14" // The CTRE Toolsuite (Talon SRX) version to use.
navxVersion = "3.0.331" // The NavX-MXP library version to use.

smartDashboardVersion = '...'
javaInstallerVersion = '...'

toolchainVersion = '...'
}

dependencies {
Expand All @@ -40,11 +63,11 @@ dependencies {
compile group: 'com.fasterxml.jackson.module', name: 'jackson-module-parameter-names', version: '2.9.0.pr3'
compile 'org.jetbrains:annotations:13.0'
compile wpilib()
compile talonSrx()
compile ctre()
compile navx()
}

/* GradleRIO stuff */
/* CopyResources stuff */
remotes {
rio {
host = 'roboRIO-449-frc.local'
Expand All @@ -53,16 +76,6 @@ remotes {
}
}

frc {
team = '449'
robotClass = "org.usfirst.frc.team449.robot.Robot"
}

def robotManifest = {
attributes 'Main-Class': 'edu.wpi.first.wpilibj.RobotBase'
attributes 'Robot-Class': frc.robotClass
}

task('copyResources') {
doLast {
ssh.run {
Expand All @@ -77,9 +90,12 @@ task('copyResources') {
}

/* Generic artifact gen stuff */
// Java only. Setup your Jar File.
jar {
// Compile a 'fat jar' (libraries included)
from configurations.compile.collect { it.isDirectory() ? it : zipTree(it) }
manifest robotManifest
// Include your Manifest. Arguments are your Robot Main Class.
manifest jaci.openrio.gradle.GradleRIOPlugin.javaManifest(ROBOT_CLASS)
}

task genJavadoc(type: Jar, dependsOn: javadoc) {
Expand Down
4 changes: 4 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,8 @@ allprojects {
url 'https://jitpack.io'
}
}
}

task wrapper(type: Wrapper) {
gradleVersion = '4.2.1'
}

0 comments on commit 5cf3701

Please sign in to comment.