Squashed 'third_party/allwpilib_2019/' content from commit bd05dfa1c

Change-Id: I2b1c2250cdb9b055133780c33593292098c375b7
git-subtree-dir: third_party/allwpilib_2019
git-subtree-split: bd05dfa1c7cca74c4fac451e7b9d6a37e7b53447
diff --git a/myRobot/build.gradle b/myRobot/build.gradle
new file mode 100644
index 0000000..0c047e8
--- /dev/null
+++ b/myRobot/build.gradle
@@ -0,0 +1,145 @@
+plugins {
+    id 'java'
+    id 'application'
+    id 'cpp'
+    id 'visual-studio'
+}
+
+apply plugin: 'edu.wpi.first.NativeUtils'
+
+apply from: '../shared/config.gradle'
+
+ext {
+    sharedCvConfigs = [myRobotCpp: []]
+    staticCvConfigs = [myRobotCppStatic: []]
+    useJava = true
+    useCpp = true
+    skipDev = true
+}
+
+ext {
+    chipObjectComponents = ['myRobotCpp', 'myRobotCppStatic']
+    netCommComponents = ['myRobotCpp', 'myRobotCppStatic']
+    useNiJava = true
+}
+
+apply from: "${rootDir}/shared/nilibraries.gradle"
+
+apply from: "${rootDir}/shared/opencv.gradle"
+
+mainClassName = 'Main'
+
+apply plugin: 'com.github.johnrengelman.shadow'
+
+repositories {
+    mavenCentral()
+}
+
+dependencies {
+    compile project(':wpilibj')
+    compile project(':hal')
+    compile project(':wpiutil')
+    compile project(':ntcore')
+    compile project(':cscore')
+    compile project(':cameraserver')
+}
+
+jar {
+    manifest { attributes 'Robot-Class': 'MyRobot' }
+}
+
+model {
+    components {
+        myRobotCpp(NativeExecutableSpec) {
+            targetBuildTypes 'debug'
+            baseName = 'FRCUserProgram'
+            sources {
+                cpp {
+                    source {
+                        srcDirs = ['src/main/native/cpp']
+                        includes = ['**/*.cpp']
+                    }
+                    exportedHeaders {
+                        srcDirs = ['src/main/native/include']
+                        includes = ['**/*.h']
+                    }
+                }
+            }
+            binaries.all { binary ->
+                    lib project: ':wpilibc', library: 'wpilibc', linkage: 'shared'
+                    lib project: ':ntcore', library: 'ntcore', linkage: 'shared'
+                    lib project: ':cscore', library: 'cscore', linkage: 'shared'
+                    project(':hal').addHalDependency(binary, 'shared')
+                    lib project: ':wpiutil', library: 'wpiutil', linkage: 'shared'
+                    lib project: ':cameraserver', library: 'cameraserver', linkage: 'shared'
+            }
+        }
+        myRobotCppStatic(NativeExecutableSpec) {
+            targetBuildTypes 'debug'
+            baseName = 'FRCUserProgram'
+            sources {
+                cpp {
+                    source {
+                        srcDirs = ['src/main/native/cpp']
+                        includes = ['**/*.cpp']
+                    }
+                    exportedHeaders {
+                        srcDirs = ['src/main/native/include']
+                        includes = ['**/*.h']
+                    }
+                }
+            }
+            binaries.all { binary ->
+                    lib project: ':wpilibc', library: 'wpilibc', linkage: 'static'
+                    lib project: ':ntcore', library: 'ntcore', linkage: 'static'
+                    lib project: ':cscore', library: 'cscore', linkage: 'static'
+                    project(':hal').addHalDependency(binary, 'static')
+                    lib project: ':wpiutil', library: 'wpiutil', linkage: 'static'
+                    lib project: ':cameraserver', library: 'cameraserver', linkage: 'static'
+            }
+        }
+    }
+    tasks {
+        def c = $.components
+        project.tasks.create('runCpp', Exec) {
+            group = 'WPILib'
+            description = "Run the myRobotCpp executable"
+            def found = false
+            def systemArch = getCurrentArch()
+            c.each {
+                if (it in NativeExecutableSpec && it.name == "myRobotCpp") {
+                    it.binaries.each {
+                        if (!found) {
+                            def arch = it.targetPlatform.architecture.name
+                            if (arch == systemArch) {
+                                dependsOn it.tasks.install
+                                commandLine it.tasks.install.runScriptFile.get().asFile.toString()
+                                def filePath = it.tasks.install.installDirectory.get().toString() + File.separatorChar + 'lib'
+                                run.dependsOn it.tasks.install
+                                run.systemProperty 'java.library.path', filePath
+                                run.environment 'LD_LIBRARY_PATH', filePath
+                                run.workingDir filePath
+
+                                found = true
+                            }
+                        }
+                    }
+                }
+            }
+        }
+        installAthena(Task) {
+            $.binaries.each {
+                if (it in NativeExecutableBinarySpec && it.targetPlatform.architecture.name == 'athena' && it.component.name == 'myRobotCpp') {
+                    dependsOn it.tasks.install
+                }
+            }
+        }
+        installAthenaStatic(Task) {
+            $.binaries.each {
+                if (it in NativeExecutableBinarySpec && it.targetPlatform.architecture.name == 'athena' && it.component.name == 'myRobotCppStatic') {
+                    dependsOn it.tasks.install
+                }
+            }
+        }
+    }
+}
diff --git a/myRobot/src/main/java/Main.java b/myRobot/src/main/java/Main.java
new file mode 100644
index 0000000..aee472a
--- /dev/null
+++ b/myRobot/src/main/java/Main.java
@@ -0,0 +1,22 @@
+/*----------------------------------------------------------------------------*/
+/* Copyright (c) 2018 FIRST. All Rights Reserved.                             */
+/* Open Source Software - may be modified and shared by FRC teams. The code   */
+/* must be accompanied by the FIRST BSD license file in the root directory of */
+/* the project.                                                               */
+/*----------------------------------------------------------------------------*/
+
+import edu.wpi.first.wpilibj.RobotBase;
+
+public final class Main {
+  private Main() {
+  }
+
+  /**
+   * Main initialization function. Do not perform any initialization here.
+   *
+   * <p>If you change your main robot class, change the parameter type.
+   */
+  public static void main(String... args) {
+    RobotBase.startRobot(MyRobot::new);
+  }
+}
diff --git a/myRobot/src/main/java/MyRobot.java b/myRobot/src/main/java/MyRobot.java
new file mode 100644
index 0000000..fc69d42
--- /dev/null
+++ b/myRobot/src/main/java/MyRobot.java
@@ -0,0 +1,54 @@
+/*----------------------------------------------------------------------------*/
+/* Copyright (c) 2016-2018 FIRST. All Rights Reserved.                        */
+/* Open Source Software - may be modified and shared by FRC teams. The code   */
+/* must be accompanied by the FIRST BSD license file in the root directory of */
+/* the project.                                                               */
+/*----------------------------------------------------------------------------*/
+
+import edu.wpi.first.wpilibj.TimedRobot;
+
+@SuppressWarnings("all")
+public class MyRobot extends TimedRobot {
+  /**
+   * This function is run when the robot is first started up and should be
+   * used for any initialization code.
+   */
+  @Override
+  public void robotInit() {}
+
+  /**
+   * This function is run once each time the robot enters autonomous mode
+   */
+  @Override
+  public void autonomousInit() {}
+
+  /**
+   * This function is called periodically during autonomous
+   */
+  @Override
+  public void autonomousPeriodic() {}
+
+  /**
+   * This function is called once each time the robot enters tele-operated mode
+   */
+  @Override
+  public void teleopInit() {}
+
+  /**
+   * This function is called periodically during operator control
+   */
+  @Override
+  public void teleopPeriodic() {}
+
+  /**
+   * This function is called periodically during test mode
+   */
+  @Override
+  public void testPeriodic() {}
+
+  /**
+   * This function is called periodically during all modes
+   */
+  @Override
+  public void robotPeriodic() {}
+}
diff --git a/myRobot/src/main/native/cpp/MyRobot.cpp b/myRobot/src/main/native/cpp/MyRobot.cpp
new file mode 100644
index 0000000..ff066d8
--- /dev/null
+++ b/myRobot/src/main/native/cpp/MyRobot.cpp
@@ -0,0 +1,48 @@
+/*----------------------------------------------------------------------------*/
+/* Copyright (c) 2016-2018 FIRST. All Rights Reserved.                        */
+/* Open Source Software - may be modified and shared by FRC teams. The code   */
+/* must be accompanied by the FIRST BSD license file in the root directory of */
+/* the project.                                                               */
+/*----------------------------------------------------------------------------*/
+
+#include <frc/TimedRobot.h>
+
+class MyRobot : public frc::TimedRobot {
+  /**
+   * This function is run when the robot is first started up and should be
+   * used for any initialization code.
+   */
+  void RobotInit() override {}
+
+  /**
+   * This function is run once each time the robot enters autonomous mode
+   */
+  void AutonomousInit() override {}
+
+  /**
+   * This function is called periodically during autonomous
+   */
+  void AutonomousPeriodic() override {}
+
+  /**
+   * This function is called once each time the robot enters tele-operated mode
+   */
+  void TeleopInit() override {}
+
+  /**
+   * This function is called periodically during operator control
+   */
+  void TeleopPeriodic() override {}
+
+  /**
+   * This function is called periodically during test mode
+   */
+  void TestPeriodic() override {}
+
+  /**
+   * This function is called periodically during all modes
+   */
+  void RobotPeriodic() override {}
+};
+
+int main() { return frc::StartRobot<MyRobot>(); }