Hello since my last post seems to have not posted i’m going to ask again. I am trying to build networktables on my laptop to just send a simple value over to the roborio, just for testing purposes, however when i run gradle build i get this error
:compileJava
C:\Users\Desktop\GradleTest\src\main\com\djsprinkles\gradle\Main.java:3: error: package edu.wpi.first.wpilibj.networktables does not exist
import edu.wpi.first.wpilibj.networktables.NetworkTable;
^
C:\Users\Desktop\GradleTest\src\main\com\djsprinkles\gradle\Main.java:8: error: cannot find symbol
NetworkTable.setClientMode();
^
symbol: variable NetworkTable
location: class Main
C:\Users\Desktop\GradleTest\src\main\com\djsprinkles\gradle\Main.java:9: error: cannot find symbol
NetworkTable.setTeam(####);
^
symbol: variable NetworkTable
location: class Main
C:\Users\Desktop\GradleTest\src\main\com\djsprinkles\gradle\Main.java:10: error: cannot find symbol
NetworkTable.initialize();
^
symbol: variable NetworkTable
location: class Main
C:\Users\Desktop\GradleTest\src\main\com\djsprinkles\gradle\Main.java:11: error: cannot find symbol
NetworkTable table = NetworkTable.getTable("Test");
^
symbol: class NetworkTable
location: class Main
C:\Users\Desktop\GradleTest\src\main\com\djsprinkles\gradle\Main.java:11: error: cannot find symbol
NetworkTable table = NetworkTable.getTable("Test");
^
symbol: variable NetworkTable
location: class Main
6 errors
:compileJava FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileJava'.
> Compilation failed; see the compiler error output for details.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
and here is my build.gradle file keep in mind I’m very new to gradle and might be missing something very obvious
repositories{
maven {
url "http://first.wpi.edu/FRC/roborio/maven/release"
}
}
apply plugin: 'java'
dependencies{
compile "edu.wpi.first.wpilib.networktables.java:NetworkTables:3.1.7"
}
sourceSets{
main.java.srcDir "src/main"
test.java.srcDir "src/test"
}
jar{
manifest.attributes "Main-Class": "main.net.djsprinkles.gradle.Main"
}
and lastly i think my code might help too
package main.com.djsprinkles.gradle;
import edu.wpi.first.wpilibj.networktables.NetworkTable;
public class Main {
public static void main(String] args) {
NetworkTable.setClientMode();
NetworkTable.setTeam(####);
NetworkTable.initialize();
NetworkTable table = NetworkTable.getTable("Test");
table.putNumber("X", 5);
}
}
and lastly any help is appreciated so if i am missing something obvious please tell me. also i do know about this (https://github.com/wpilibsuite/VisionBuildSamples) i would just like to know how to do it myself.