Advertisement
Guest User

Untitled

a guest
Jul 10th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Groovy 1.38 KB | None | 0 0
  1. plugins {
  2.     id "java"
  3.     id "edu.wpi.first.GradleRIO" version "2018.06.21"
  4. }
  5.  
  6. def ROBOT_CLASS = "frc.team0997.robot.Robot"
  7.  
  8. // Define my targets (RoboRIO) and artifacts (deployable files)
  9. // This is added by GradleRIO's backing project EmbeddedTools.
  10. deploy {
  11.     targets {
  12.         target("roborio", edu.wpi.first.gradlerio.frc.RoboRIO) {
  13.             // Team can be overridden by command line, for use with VSCode
  14.             team = getTeamOrDefault(0997)
  15.         }
  16.     }
  17.     artifacts {
  18.         artifact('frcJava', edu.wpi.first.gradlerio.frc.FRCJavaArtifact) {
  19.             targets << "roborio"
  20.             // Debug can be overridden by command line, for use with VSCode
  21.             debug = getDebugOrDefault(false)
  22.         }
  23.     }
  24. }
  25.  
  26. // Defining my dependencies. In this case, WPILib (+ friends), CTRE Toolsuite (Talon SRX)
  27. // and NavX.
  28. dependencies {
  29.     compile wpilib()
  30.     compile ctre()
  31.     compile navx()
  32. }
  33.  
  34. // Setting up my Jar File. In this case, adding all libraries into the main jar ('fat jar')
  35. // in order to make them all available at runtime. Also adding the manifest so WPILib
  36. // knows where to look for our Robot Class.
  37. jar {
  38.     from configurations.compile.collect { it.isDirectory() ? it : zipTree(it) }
  39.     manifest edu.wpi.first.gradlerio.GradleRIOPlugin.javaManifest(ROBOT_CLASS)
  40. }
  41.  
  42. task wrapper(type: Wrapper) {
  43.     gradleVersion = '4.7'
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement