From b48ede50279a10b7f8dce0aef46ae2143cff11c0 Mon Sep 17 00:00:00 2001 From: "Ian N." <163360899+IanNpdx5@users.noreply.github.com> Date: Wed, 4 Nov 2026 17:01:41 -0800 Subject: [PATCH 1/2] upgrade build --- build.gradle | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/build.gradle b/build.gradle index b9efd92..2fc45ae 100755 --- a/build.gradle +++ b/build.gradle @@ -1,7 +1,7 @@ plugins { id "java" id "application" - id "org.wpilib.GradleRIO" version "2027.0.0-alpha-7" + id "org.wpilib.GradleRIO" version "2027.0.0-alpha-8" id "com.peterabeles.gversion" version "1.10" id "com.diffplug.spotless" version "8.6.0" } @@ -58,7 +58,7 @@ wpi.java.runSimWithDebugJni = false def includeDesktopSupport = true // Configuration for AdvantageKit -task(replayWatch, type: JavaExec) { +tasks.register("replayWatch", JavaExec) { mainClass = "org.littletonrobotics.junction.ReplayWatch" classpath = sourceSets.main.runtimeClasspath } @@ -133,22 +133,24 @@ gversion { indent = " " } +def projectDirectory = projectDir +def isDeployTaskIncluded = project.gradle.startParameter.taskNames.any({it.toLowerCase().contains("deploy")}) + // Create commit with working changes on event branches -task(eventDeploy) { +tasks.register("eventDeploy") { doLast { - if (project.gradle.startParameter.taskNames.any({ it.toLowerCase().contains("deploy") })) { + if (isDeployTaskIncluded) { def branchPrefix = "event" def branch = 'git branch --show-current'.execute().text.trim() def commitMessage = "Update at '${new Date().toString()}'" - if (branch.startsWith(branchPrefix)) { - exec { - workingDir(projectDir) + execOperations.exec { + workingDir(projectDirectory) executable 'git' args 'add', '-A' } - exec { - workingDir(projectDir) + execOperations.exec { + workingDir(projectDirectory) executable 'git' args 'commit', '-m', commitMessage ignoreExitValue = true From c3bb54b3eacd6c1ed82f3190631e1506ff2aa845 Mon Sep 17 00:00:00 2001 From: "Ian N." <163360899+IanNpdx5@users.noreply.github.com> Date: Thu, 5 Nov 2026 17:09:35 -0800 Subject: [PATCH 2/2] Add configuration cache and set verisons --- build.gradle | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 2fc45ae..5cab379 100755 --- a/build.gradle +++ b/build.gradle @@ -3,7 +3,7 @@ plugins { id "application" id "org.wpilib.GradleRIO" version "2027.0.0-alpha-8" id "com.peterabeles.gversion" version "1.10" - id "com.diffplug.spotless" version "8.6.0" + id "com.diffplug.spotless" version "8.10.4" } java { @@ -173,7 +173,21 @@ def onlyOurHeaders = '(?is)\\A(?:(?!(?:(?!package ).)*(?:copyright|license|\\u00 // Spotless formatting project.compileJava.dependsOn(spotlessApply) + +spotlessPredeclare { + groovyGradle { + greclipse('4.31') + } + java { + googleJavaFormat('1.36.1') + } + json { + gson().version('2.14.0') + } +} + spotless { + predeclareDepsFromBuildscript() java { target fileTree(".") { include "**/*.java" @@ -191,7 +205,7 @@ spotless { include "**/*.gradle" exclude "**/build/**", "**/build-*/**" } - greclipse() + greclipse('4.31') leadingTabsToSpaces(4) trimTrailingWhitespace() endWithNewline() @@ -213,3 +227,7 @@ spotless { endWithNewline() } } + +tasks.withType(com.diffplug.gradle.spotless.SpotlessTask).configureEach { + notCompatibleWithConfigurationCache("Spotless Equo engine relies on execution-time state unpacking") +}