plugins {
id "java"
id "edu.wpi.first.GradleRIO" version "2019.4.1"
id "com.snobot.simulator.plugin.SnobotSimulatorPlugin" version "2019-3.0.0" apply false
}
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
def ROBOT_MAIN_CLASS = "frc.robot.Main"
// Define my targets (RoboRIO) and artifacts (deployable files)
// This is added by GradleRIO's backing project EmbeddedTools.
deploy {
targets {
roboRIO("roborio") {
// Team number is loaded either from the .wpilib/wpilib_preferences.json
// or from command line. If not found an exception will be thrown.
// You can use getTeamOrDefault(team) instead of getTeamNumber if you
// want to store a team number in this file.
team = frc.getTeamNumber()
}
}
artifacts {
frcJavaArtifact('frcJava') {
targets << "roborio"
// Debug can be overridden by command line, for use with VSCode
debug = frc.getDebugOrDefault(false)
}
// Built in artifact to deploy arbitrary files to the roboRIO.
fileTreeArtifact('frcStaticFileDeploy') {
// The directory below is the local directory to deploy
files = fileTree(dir: 'src/main/deploy')
// Deploy to RoboRIO target, into /home/lvuser/deploy
targets << "roborio"
directory = '/home/lvuser/deploy'
}
}
}
// Set this to true to enable desktop support.
def includeDesktopSupport = false
// Maven central needed for JUnit
repositories {
mavenCentral()
}
apply plugin: com.snobot.simulator.plugin.SnobotSimulatorPlugin
configurations {
snobotSimCompile
}
// Defining my dependencies. In this case, WPILib (+ friends), and vendor libraries.
// Also defines JUnit 4.
dependencies {
compile wpi.deps.wpilib()
compile wpi.deps.vendor.java()
nativeZip wpi.deps.vendor.jni(wpi.platforms.roborio)
nativeDesktopZip wpi.deps.vendor.jni(wpi.platforms.desktop)
testCompile 'junit:junit:4.12'
// SnobotSim
snobotSimCompile snobotSimJava()
}
// Setting up my Jar File. In this case, adding all libraries into the main jar ('fat jar')
// in order to make them all available at runtime. Also adding the manifest so WPILib
// knows where to look for our Robot Class.
jar {
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
manifest edu.wpi.first.gradlerio.GradleRIOPlugin.javaManifest(ROBOT_MAIN_CLASS)
}
19:07:19: Executing task 'runJavaSnobotSim'...
> Task :extractSnobotSimJavaJNI
> Task :compileJava UP-TO-DATE
> Task :processResources NO-SOURCE
> Task :classes UP-TO-DATE
> Task :downloadDepsPreemptively
> Task :jar UP-TO-DATE
> Task :runJavaSnobotSim
(@.
#. ,@@@@@@@@@@
@@@@& .@@@@@@@@@@@@%
./@@@@@@,&@@@@@@@@@@@@@@@@( ,@,
&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&/.&@@
/@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*
.@@@@@@@@@@@@@@@@@@@@@@&&&@@@@@@@@@@@@@@@@@@@@@@&(%/
@@@@@@@@@@@@@@@%, *@@@@@@@@@@@@@@@@@@@@@@&
@@@@@@@@@@@* ,@@@@@@@@@@@@@@@@@@@@@@%
,@@@@@@@@% %@@* ,@@@@@@@@@@@@@@@@@@@@@@@*
(@@@@@@@* @@@@@, ,@@@@@@@@@*.,#@@@@@@@@@@@#
/@@@@@@@# @@@@@. &@@@@@@@, /@@@@@@@@@&
.@@@@@@@@@@/ ./, (@@@@@@@@% /@@@@@@@@@
@@@@@@@@@@@@@@&/ *&@@@@@@@@@@/ @@@@/ &@@@@@@@&/@.
*@@@@@&/ .@@@@@@@@@@@@@@@&* .(&% %@@@@@ (@@@@@@@@@@#
.& @@@&(#%@&*,&. *#&, .@@@@# /@@@@@@@@@@&
@@@@@@@@& &@@@@@@@@@@,
#@@@@@&/ (@@@, @@@@@@@@@@&
#@@@@@ &@@@@@@@@@&
./((/. /@@@@@ &@@@@@@@@@&
&@@@@@@@@@@@@#. %@@& @@@@@@@@@@*
@@@@@@@@@@@@@@@@@@@@@#, *//%@@@@@@@@@@%
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&/. (#@@@@@@@@@@@@.
/&@@@@@@, ,#@@@@@@@@@@@@@@@@@@@@@#. /@@@@@#,&@@@#
,@@@@@@@@@@ .*%@@@@@@@@@@@@@@@@@@@&* ./.. .#
,@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@@@@@@@@@@@@@,
/@@@@@& (@&* @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&
.@@@@@@&. &@%. #@@@@@@@@@@@@@@/ @@@@@@@@@@@@@@@@#
.@@@@@@@& .@@@@/@@@@@@@, @@@@@@@@@@@@@@@/
(@@@@@@@@* ,@@@/ @@@@@@@@@@@@@@
@@@@@@@@@%. &@@@@@@@@@@@@/
#@@@@@@@@@@* /@&/ @@@@@@@%
#@@@@@@@@@@@* /@@@@@@@@
%@@@@@@@@@@@@@* *@@@@@@@@@@.
&@@@@@@@@@@@@@@@#. ,#@@@@@@@@@@@@,
/@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#
*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%
/&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#
.#@@@@@@@@@@@@@@@@@@@@@&,
.,*///*,.
2019-07-04 19:07:21 INFO com.snobot.simulator.config.v1.SimulatorConfigReaderV1:71 - Loading C:\Users\bauke\Documents\Coding\FRC\Projects\ArmstrongSimulationIJ\simulator_config\simulator_config.yml
__ _ _ __ _
/ _\_ __ ___ | |__ ___ | |_ / _(_)_ __ ___
\ \| '_ \ / _ \| '_ \ / _ \| __| \ \| | '_ ` _ \
_\ \ | | | (_) | |_) | (_) | |_ _\ \ | | | | | |
\__/_| |_|\___/|_.__/ \___/ \__| \__/_|_| |_| |_|
2019-07-04 19:07:22 INFO com.snobot.simulator.Simulator:216 - Starting Robot Code
java.io.IOException: ntcorejni could not be loaded from path or an embedded resource.
attempted to load for platform /windows/x86-64/
at edu.wpi.first.wpiutil.RuntimeLoader.loadLibrary(RuntimeLoader.java:79)
at edu.wpi.first.networktables.NetworkTablesJNI.<clinit>(NetworkTablesJNI.java:23)
at edu.wpi.first.networktables.NetworkTableInstance.getDefault(NetworkTableInstance.java:97)
at edu.wpi.first.wpilibj.RobotBase.<init>(RobotBase.java:87)
at edu.wpi.first.wpilibj.IterativeRobotBase.<init>(IterativeRobotBase.java:65)
at edu.wpi.first.wpilibj.TimedRobot.<init>(TimedRobot.java:45)
at edu.wpi.first.wpilibj.TimedRobot.<init>(TimedRobot.java:36)
at com.snobot.simulator.example_robot.ExampleRobot.<init>(ExampleRobot.java:26)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
at java.base/java.lang.Class.newInstance(Class.java:584)
at com.snobot.simulator.robot_container.JavaRobotContainer.constructRobot(JavaRobotContainer.java:24)
at com.snobot.simulator.Simulator.createRobot(Simulator.java:235)
at com.snobot.simulator.Simulator.startSimulation(Simulator.java:299)
at com.snobot.simulator.Main.main(Main.java:46)
> Task :runJavaSnobotSim FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':runJavaSnobotSim'.
> Process 'command 'java'' finished with non-zero exit value 1
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 3s
5 actionable tasks: 3 executed, 2 up-to-date
Process 'command 'java'' finished with non-zero exit value 1
19:07:22: Task execution finished 'runJavaSnobotSim'.