Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ jobs:
name: Maven
path: ${{ env.MAVEN_LOCAL_REPO }}/

- name: Setup SystemCore Toolchain
- name: Setup Systemcore Toolchain
if: ${{ (matrix.language == 'cpp') || (matrix.language == 'asm') }}
run: ../../gradlew -Dmaven.repo.local="$MAVEN_LOCAL_REPO" installSystemCoreToolchain
run: ../../gradlew -Dmaven.repo.local="$MAVEN_LOCAL_REPO" installSystemcoreToolchain
working-directory: testing/${{ matrix.language }}
- name: Test ${{ matrix.language }} Build
run: ../../gradlew -Dmaven.repo.local="$MAVEN_LOCAL_REPO" build
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Windows Users: It is recommended to use Powershell instead of CMD. You can switc
- `./gradlew build` will build your robot code (and run unit tests if present).
- `./gradlew deploy` will build and deploy your code.

- `./gradlew installSystemCoreToolchain` will install the C++ Toolchains for your system (required for C++).
- `./gradlew installSystemcoreToolchain` will install the C++ Toolchains for your system (required for C++).

### Tools

Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def gsonVersion = "2.13.1"
dependencies {
api "com.google.code.gson:gson:$gsonVersion"

api 'org.wpilib:native-utils:2027.14.3'
api 'org.wpilib:native-utils:2027.15.0'

api 'de.undercouch:gradle-download-task:5.6.0'

Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/wpilib/gradlerio/GradleRIOPlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
import org.wpilib.deployutils.log.ETLoggerFactory;
import org.wpilib.gradlerio.caching.WrapperInspector;
import org.wpilib.gradlerio.deploy.WPILibDeployPlugin;
import org.wpilib.gradlerio.deploy.systemcore.SystemCore;
import org.wpilib.gradlerio.deploy.systemcore.Systemcore;
import org.wpilib.gradlerio.wpi.WPIPlugin;

public abstract class GradleRIOPlugin implements Plugin<Project> {
Expand Down Expand Up @@ -240,7 +240,7 @@ private static void checkBuildFailed(Throwable result) {
RemoteTarget target = ((TargetDiscoveryTask) task).getTarget();
if (reasons.add(("Target" + target.getName()).hashCode())) {
logger.logErrorHead("Missing Target!");
if (target instanceof SystemCore) {
if (target instanceof Systemcore) {
logger.logErrorHead("=============================================");
logger.logErrorHead("Are you connected to the robot, and is it on?");
logger.logErrorHead("=============================================");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import org.wpilib.deployutils.deploy.sessions.IPSessionController;
import org.wpilib.toolchain.ToolchainDiscoverer;
import org.wpilib.toolchain.ToolchainExtension;
import org.wpilib.toolchain.systemcore.SystemCoreToolchainPlugin;
import org.wpilib.toolchain.systemcore.SystemcoreToolchainPlugin;
import org.wpilib.vscode.dependencies.SourceContainingNativeDependencySet;

public class DebuggableNativeArtifact extends NativeExecutableArtifact implements DebuggableArtifact {
Expand All @@ -42,7 +42,7 @@ public TargetDebugInfo getTargetDebugInfo() {
// TODO get all this from the VS Code plugin without needing to enumerate EVERYTHING

ToolchainDiscoverer toolchain = getTarget().getProject().getExtensions().getByType(ToolchainExtension.class)
.getToolchainDescriptors().getByName(SystemCoreToolchainPlugin.toolchainName).discover();
.getToolchainDescriptors().getByName(SystemcoreToolchainPlugin.toolchainName).discover();
String gdbpath = toolchain.gdbFile().get().getAbsolutePath();
String sysroot = toolchain.sysroot().get().getAbsolutePath();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import org.wpilib.gradlerio.deploy.systemcore.RobotCommandArtifact;
import org.wpilib.gradlerio.deploy.systemcore.RobotProgramKillArtifact;
import org.wpilib.gradlerio.deploy.systemcore.RobotProgramStartArtifact;
import org.wpilib.gradlerio.deploy.systemcore.SystemCore;
import org.wpilib.gradlerio.deploy.systemcore.Systemcore;
import org.wpilib.deployutils.deploy.NamedObjectFactory;

public class WPILibDeployPlugin implements Plugin<Project> {
Expand All @@ -27,7 +27,7 @@ public class WPILibDeployPlugin implements Plugin<Project> {

public static final String LIB_DEPLOY_DIR = "/home/systemcore/wpilib/third-party/lib";

private void configureSystemCoreTypes(SystemCore target) {
private void configureSystemcoreTypes(Systemcore target) {
ObjectFactory objects = target.getProject().getObjects();
ExtensiblePolymorphicDomainObjectContainer<DeployLocation> locations = target.getLocations();
ExtensiblePolymorphicDomainObjectContainer<Artifact> artifacts = target.getArtifacts();
Expand Down Expand Up @@ -55,10 +55,10 @@ public void apply(Project project) {

WPILibExtension firstExtension = project.getExtensions().create("wpilib", WPILibExtension.class, project, deployExtension);

// Register the SystemCore target
deployExtension.getTargets().registerFactory(SystemCore.class, name -> {
SystemCore target = project.getObjects().newInstance(SystemCore.class, name, project, deployExtension, firstExtension);
configureSystemCoreTypes(target);
// Register the Systemcore target
deployExtension.getTargets().registerFactory(Systemcore.class, name -> {
Systemcore target = project.getObjects().newInstance(Systemcore.class, name, project, deployExtension, firstExtension);
configureSystemcoreTypes(target);
return target;
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import org.wpilib.gradlerio.deploy.WPIRemoteTarget;
import org.wpilib.toolchain.NativePlatforms;

public class SystemCore extends WPIRemoteTarget {
public class Systemcore extends WPIRemoteTarget {

private int team;
private String username = "systemcore";
Expand All @@ -20,7 +20,7 @@ public class SystemCore extends WPIRemoteTarget {
private final RobotProgramStartArtifact programStartArtifact;

@Inject
public SystemCore(String name, Project project, DeployExtension de, WPILibExtension firstExtension) {
public Systemcore(String name, Project project, DeployExtension de, WPILibExtension firstExtension) {
super(name, project, de, firstExtension);

setDirectory("/home/systemcore");
Expand Down Expand Up @@ -110,6 +110,6 @@ public void addAddress(String address) {

@Override
public String toString() {
return "SystemCore[" + getName() + "]";
return "Systemcore[" + getName() + "]";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class WPILibJavaArtifact extends DebuggableJavaArtifact {
private final List<String> jvmArgs = new ArrayList<>();
private final List<String> arguments = new ArrayList<>();

private final SystemCore systemCore;
private final Systemcore systemCore;

private final Property<String> mainClass;

Expand All @@ -44,7 +44,7 @@ public Property<Boolean> getDebugJni() {
}

@Inject
public WPILibJavaArtifact(String name, SystemCore target) {
public WPILibJavaArtifact(String name, Systemcore target) {
super(name, target);
systemCore = target;
debugJni = target.getProject().getObjects().property(Boolean.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public class WPILibNativeArtifact extends DebuggableNativeArtifact {

private final RobotCommandArtifact robotCommandArtifact;
private final List<String> arguments = new ArrayList<>();
private final SystemCore systemCore;
private final Systemcore systemCore;

private final Property<NativeExecutableSpec> componentSpec;

Expand All @@ -30,7 +30,7 @@ public Property<NativeExecutableSpec> getComponent() {
}

@Inject
public WPILibNativeArtifact(String name, SystemCore target) {
public WPILibNativeArtifact(String name, Systemcore target) {
super(name, target);
systemCore = target;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import org.wpilib.toolchain.NativePlatforms;
import org.wpilib.toolchain.ToolchainExtension;
import org.wpilib.toolchain.ToolchainPlugin;
import org.wpilib.toolchain.systemcore.SystemCoreToolchainPlugin;
import org.wpilib.toolchain.systemcore.SystemcoreToolchainPlugin;

public class WPINativeExtension {
private final WPINativeDepsExtension deps;
Expand Down Expand Up @@ -94,15 +94,15 @@ public Property<Boolean> getDebugSimulation() {
@Inject
public WPINativeExtension(Project project, WPIExtension wpi, WPIVersionsExtension versions) {
project.getPluginManager().apply(ToolchainPlugin.class);
project.getPluginManager().apply(SystemCoreToolchainPlugin.class);
project.getPluginManager().apply(SystemcoreToolchainPlugin.class);
project.getPluginManager().apply(NativeUtils.class);
project.getPluginManager().apply(WPINativeCompileRules.class);

debugSimulation = project.getObjects().property(Boolean.class);
debugSimulation.set(false);

NativeUtilsExtension nte = project.getExtensions().getByType(NativeUtilsExtension.class);
nte.withCrossSystemCore();
nte.withCrossSystemcore();
nte.addWpiNativeUtils();

deps = project.getObjects().newInstance(WPINativeDepsExtension.class, nte);
Expand Down
4 changes: 2 additions & 2 deletions testing/asm/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ if (testingFolder.name != 'testing' || projectFolder.name != 'asm') {
throw new GradleException("These projects are not to be used for robot projects. See README.md in the GradleRIO testing folder for the correct templates to use.")
}

// Define my targets (SystemCore) and artifacts (deployable files)
// Define my targets (Systemcore) and artifacts (deployable files)
// This is added by GradleRIO's backing project DeployUtils.
deploy {
targets {
systemcore(getTargetTypeClass('SystemCore')) {
systemcore(getTargetTypeClass('Systemcore')) {
// 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
Expand Down
4 changes: 2 additions & 2 deletions testing/cpp/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ if (testingFolder.name != 'testing' || projectFolder.name != 'cpp') {
throw new GradleException("These projects are not to be used for robot projects. See README.md in the GradleRIO testing folder for the correct templates to use.")
}

// Define my targets (SystemCore) and artifacts (deployable files)
// Define my targets (Systemcore) and artifacts (deployable files)
// This is added by GradleRIO's backing project DeployUtils.
deploy {
targets {
systemcore(getTargetTypeClass('SystemCore')) {
systemcore(getTargetTypeClass('Systemcore')) {
// 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
Expand Down
4 changes: 2 additions & 2 deletions testing/java/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ java {

def ROBOT_MAIN_CLASS = "first.team0000.robot.Main"

// Define my targets (SystemCore) and artifacts (deployable files)
// Define my targets (Systemcore) and artifacts (deployable files)
// This is added by GradleRIO's backing project DeployUtils.
deploy {
targets {
systemcore(getTargetTypeClass('SystemCore')) {
systemcore(getTargetTypeClass('Systemcore')) {
// 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
Expand Down
4 changes: 2 additions & 2 deletions testing/kotlin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ kotlin {

def ROBOT_MAIN_CLASS = "first.team0000.robot.Main"

// Define my targets (SystemCore) and artifacts (deployable files)
// Define my targets (Systemcore) and artifacts (deployable files)
// This is added by GradleRIO's backing project DeployUtils.
deploy {
targets {
systemcore(getTargetTypeClass('SystemCore')) {
systemcore(getTargetTypeClass('Systemcore')) {
// 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
Expand Down
Loading