From 865f25aaa0d45bea15a839482017301acf44dae8 Mon Sep 17 00:00:00 2001 From: Noah Gleason Date: Mon, 30 Oct 2017 17:54:55 -0400 Subject: [PATCH] Update gradleRIO --- RoboRIO/build.gradle | 52 +++++++++++++++++++++++++++++--------------- build.gradle | 4 ++++ 2 files changed, 38 insertions(+), 18 deletions(-) diff --git a/RoboRIO/build.gradle b/RoboRIO/build.gradle index b0fd7250..47bb8fc8 100644 --- a/RoboRIO/build.gradle +++ b/RoboRIO/build.gradle @@ -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 { @@ -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 { @@ -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' @@ -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 { @@ -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) { diff --git a/build.gradle b/build.gradle index f3eab9e9..9827e13d 100644 --- a/build.gradle +++ b/build.gradle @@ -5,4 +5,8 @@ allprojects { url 'https://jitpack.io' } } +} + +task wrapper(type: Wrapper) { + gradleVersion = '4.2.1' } \ No newline at end of file