From 246968c2a3ffc1c3d3b0a222b9027cebe5346e76 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Mon, 19 Oct 2026 02:54:46 +0000 Subject: [PATCH] Install OpenJDK 17 during cloud agent setup Cloud install now provisions the Java 17 toolchain WPILib expects and compiles robot code. Test and full jar builds stay verification steps. Co-authored-by: ernestgwilsoniii --- .cursor/cloud-install.sh | 16 +++++++++++++--- AGENTS.md | 4 ++-- 2 files changed, 15 insertions(+), 5 deletions(-) mode change 100644 => 100755 .cursor/cloud-install.sh diff --git a/.cursor/cloud-install.sh b/.cursor/cloud-install.sh old mode 100644 new mode 100755 index 5cc31db..a7c397b --- a/.cursor/cloud-install.sh +++ b/.cursor/cloud-install.sh @@ -1,7 +1,17 @@ #!/usr/bin/env bash -# Cloud agent Build: prepare Demonator15 (idempotent — safe on every Build). +# Cloud agent install for Demonator15. Idempotent — safe on every build. +# Prepares the WPILib Java 17 toolchain and compiles robot code. +# Unit tests and the full jar stay verification steps (`./gradlew test`, `./gradlew build`). set -euo pipefail cd "$(dirname "$0")/.." + +if [[ ! -x /usr/lib/jvm/java-17-openjdk-amd64/bin/java ]]; then + sudo apt-get update + sudo DEBIAN_FRONTEND=noninteractive apt-get install -y openjdk-17-jdk +fi + +export JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64 +export PATH="${JAVA_HOME}/bin:${PATH}" + chmod +x gradlew -# Unit tests use Java 17 via Gradle toolchain (build.gradle). Full roboRIO cross-build runs in GitHub Actions CI. -./gradlew test --no-daemon +./gradlew classes --no-daemon diff --git a/AGENTS.md b/AGENTS.md index c64fbd6..434820c 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -4,11 +4,11 @@ ```bash chmod +x gradlew -./gradlew test # local / Cursor Cloud install script +./gradlew test # local verification ./gradlew build # full compile + tests (matches GitHub Actions CI) ``` -Cloud environment config: `.cursor/environment.json` (runs `cloud-install.sh` → `./gradlew test`). +Cloud install (`.cursor/environment.json` → `cloud-install.sh`) installs OpenJDK 17 at `/usr/lib/jvm/java-17-openjdk-amd64` and compiles with `./gradlew classes`. There is no boot service; this is a Gradle robot project. Verify with `./gradlew test` and `./gradlew build`. ## Architecture