Guest User

Untitled

a guest
Sep 4th, 2018
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Groovy 2.47 KB | None | 0 0
  1. plugins {
  2.     id "java"
  3.     id "idea"
  4.     id "edu.wpi.first.GradleRIO" version "2018.06.21"
  5. }
  6.  
  7. def ROBOT_CLASS = "java.main.frc.team3324.robot.Robot"
  8.  
  9. // Define my targets (RoboRIO) and artifacts (deployable files)
  10. // This is added by GradleRIO's backing project EmbeddedTools.
  11. deploy {
  12.     targets {
  13.         target("roborio", edu.wpi.first.gradlerio.frc.RoboRIO) {
  14.             // Team can be overridden by command line, for use with VSCode
  15.             team = getTeamOrDefault(3324)
  16.  
  17. //            locations() {
  18. //                ssh {
  19. //                    address = "3324"  // Required. The address to try
  20. //                    user = 'myuser'             // Required. The user to login as
  21. //                    password = ''               // The password for the user. Default: blank (empty) string
  22. //                    ipv6 = false                // Are IPv6 addresses permitted? Default: false
  23. //                }
  24. //            }
  25.         }
  26.         artifacts {
  27.             artifact('frcJava', edu.wpi.first.gradlerio.frc.FRCJavaArtifact) {
  28.                 targets << "roborio"
  29.                 // Debug can be overridden by command line, for use with VSCode
  30.  
  31.                 jvmArgs << '-Xmx=128m'             // Set more JVM Arguments. Optional.
  32.                 arguments << 'myCustomArgs'        // The command-line arguments to launch your jar with. Optional.
  33.                 debug = getDebugOrDefault(true)    // Enable to enable java debugging on the RoboRIO. Default: false
  34.                 debugPort = 8348                   // Set the debugging port. Default: 8348
  35.                 robotCommand = './myOtherProgram'
  36.                 // Set the contents of robotCommand. Optional, usually created depending on above values.
  37.             }
  38.         }
  39.     }
  40.  
  41. // Defining my dependencies. In this case, WPILib (+ friends), CTRE Toolsuite (Talon SRX)
  42. // and NavX.
  43.     dependencies {
  44.         compile wpilib()
  45.         compile ctre()
  46.         compile navx()
  47.         compile pathfinder()
  48.     }
  49.  
  50. // Setting up my Jar File. In this case, adding all libraries into the main jar ('fat jar')
  51. // in order to make them all available at runtime. Also adding the manifest so WPILib
  52. // knows where to look for our Robot Class.
  53.     jar {
  54.         from configurations.compile.collect { it.isDirectory() ? it : zipTree(it) }
  55.         manifest edu.wpi.first.gradlerio.GradleRIOPlugin.javaManifest(ROBOT_CLASS)
  56.     }
  57.  
  58.     task wrapper(type: Wrapper) {
  59.         gradleVersion = '4.7'
  60.     }
  61. }
Add Comment
Please, Sign In to add comment