diff --git a/.gitattributes b/.gitattributes index f1eb6c140..cd7ada984 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,3 +1,7 @@ src/main/java/com/neuronrobotics/bowlerstudio/NameGetter.java filter=unchanged * text=auto eol=lf -*.java eol=lf \ No newline at end of file +*.java eol=lf + +# Gradle dependency lockfiles are generated with LF and are hash-sensitive: +# a CRLF checkout would change every line and invalidate the lock. +gradle.lockfile text eol=lf diff --git a/.github/workflows/verify.yml b/.github/workflows/verify.yml index 2bb7e5f16..76fe18cb3 100644 --- a/.github/workflows/verify.yml +++ b/.github/workflows/verify.yml @@ -46,4 +46,32 @@ jobs: run: bash makeJar.sh - name: Run Unit Tests - run: xvfb-run -s '-screen 0 1024x768x24' ./gradlew test \ No newline at end of file + run: xvfb-run -s '-screen 0 1024x768x24' ./gradlew test + + # Catch dependency changes that would make the lockfile inconsistent. + # Regenerate after a dependency change and commit the result: + # ./gradlew --write-locks lockClasspaths + lockfile-drift: + runs-on: ubuntu-latest + steps: + - name: Checkout repository and submodules + uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Set up JDK 25 + uses: actions/setup-java@v4 + with: + distribution: zulu + java-version: '25' + + - name: Regenerate lockfiles + run: ./gradlew --no-daemon --write-locks lockClasspaths + + - name: Fail if lockfiles changed + run: | + if ! git diff --exit-code -- '**/gradle.lockfile' 'gradle.lockfile'; then + echo "::error::gradle.lockfile is out of date. Regenerate it and commit the result:" + echo " ./gradlew --write-locks lockClasspaths" + exit 1 + fi diff --git a/build.gradle b/build.gradle index 6e58c780a..d345d6e1d 100644 --- a/build.gradle +++ b/build.gradle @@ -507,3 +507,29 @@ if (project == rootProject) { mergeServiceFiles() } } + +// Regenerate after any dependency change: +// ./gradlew --write-locks lockClasspaths +dependencyLocking { + lockAllConfigurations() +} + +// The submodule projects register their own task of this name; a root-only +// registration avoids the duplicate task failure in those projects. +tasks.register('lockClasspaths') { + group = 'build' + description = 'Resolve the locked configurations so --write-locks records them' + doLast { + ['compileClasspath', 'annotationProcessor'].each { n -> + def c = configurations.findByName(n) + if (c != null && c.canBeResolved) { + try { + c.resolve() + } catch (Throwable ignored) { + // A configuration that cannot resolve is still recorded by + // --write-locks; failure here must not abort the task. + } + } + } + } +} diff --git a/gitattributes b/gitattributes deleted file mode 100644 index ad548a7c6..000000000 --- a/gitattributes +++ /dev/null @@ -1,16 +0,0 @@ -# Force LF line endings for all text files, regardless of OS or local git config. -* text=auto eol=lf - -# Be explicit for source files Spotless touches -*.java text eol=lf -*.gradle text eol=lf -*.gradle.kts text eol=lf -*.xml text eol=lf -*.properties text eol=lf -*.yml text eol=lf -*.yaml text eol=lf - -# Don't touch binaries -*.jar binary -*.png binary -*.jpg binary diff --git a/gradle.lockfile b/gradle.lockfile new file mode 100644 index 000000000..981480482 --- /dev/null +++ b/gradle.lockfile @@ -0,0 +1,128 @@ +# This is a Gradle generated file for dependency locking. +# Manual edits can break the build and are not advised. +# This file is expected to be part of source control. +com.fasterxml.jackson.core:jackson-annotations:2.10.1=compileClasspath +com.fasterxml.jackson.core:jackson-core:2.10.1=compileClasspath +com.fasterxml.jackson.core:jackson-databind:2.10.1=compileClasspath +com.fifesoft:rsyntaxtextarea:3.6.0=compileClasspath +com.github.kurbatov:firmata4j:2.3.4.1=compileClasspath +com.github.spotbugs:spotbugs-annotations:3.1.12=compileClasspath +com.github.stephengold:jbullet:1.0.3=compileClasspath +com.google.code.findbugs:jsr305:2.0.1=compileClasspath +com.google.code.gson:gson:2.5=compileClasspath +com.google.crypto.tink:tink:1.3.0-rc1=compileClasspath +com.google.guava:guava:19.0=compileClasspath +com.google.protobuf:protobuf-java:3.8.0=compileClasspath +com.googlecode.javaewah:JavaEWAH:1.1.13=compileClasspath +com.infradna.tool:bridge-method-annotation:1.14=compileClasspath +com.infradna.tool:bridge-method-injector:1.14=compileClasspath +com.jcraft:jzlib:1.1.3=compileClasspath +com.miglayout:miglayout-core:4.2=compileClasspath +com.miglayout:miglayout-swing:4.2=compileClasspath +com.neuronrobotics:WalnutiQ:2.3.3=compileClasspath +com.neuronrobotics:mujoco-java:3.1.3-pre.11=compileClasspath +com.neuronrobotics:nrjavaserial:5.1.1=compileClasspath +com.squareup.okhttp:okhttp-urlconnection:2.0.0=compileClasspath +com.squareup.okhttp:okhttp:2.0.0=compileClasspath +com.squareup.okio:okio:1.0.0=compileClasspath +commons-beanutils:commons-beanutils:1.9.4=compileClasspath +commons-codec:commons-codec:1.17.0=compileClasspath +commons-collections:commons-collections:3.2.2=compileClasspath +commons-discovery:commons-discovery:0.4=compileClasspath +commons-fileupload:commons-fileupload:1.4=compileClasspath +commons-io:commons-io:2.16.1=compileClasspath +commons-lang:commons-lang:2.6=compileClasspath +commons-logging:commons-logging:1.2=compileClasspath +commons-net:commons-net:3.3=compileClasspath +de.huxhorn.sulky:de.huxhorn.sulky.3rdparty.jlayer:1.0=compileClasspath +eu.hansolo:Medusa:7.1=compileClasspath +gov.nist.math:jama:1.0.2=compileClasspath +io.ultreia:bluecove:2.1.1=compileClasspath +jakarta.activation:jakarta.activation-api:1.2.1=compileClasspath +jakarta.xml.bind:jakarta.xml.bind-api:2.3.2=compileClasspath +java3d:vecmath:1.3.1=compileClasspath +javax.annotation:javax.annotation-api:1.2=compileClasspath +javax.media:jmf:2.1.1e=compileClasspath +javax.servlet:javax.servlet-api:3.1.0=compileClasspath +javax.usb:usb-api:1.0.2=compileClasspath +jexcelapi:jxl:2.4.2=compileClasspath +jfree:jcommon:1.0.15=compileClasspath +jfree:jfreechart:1.0.12=compileClasspath +junit:junit:3.8.1=compileClasspath +net.i2p.crypto:eddsa:0.3.0=compileClasspath +net.java.jinput:jinput-platform:2.0.6=compileClasspath +net.java.jutils:jutils:1.0.0=compileClasspath +net.sf.bluecove:bluecove-gpl:2.1.0=compileClasspath +net.sf.ezmorph:ezmorph:1.0.6=compileClasspath +org.apache.commons:commons-compress:1.26.2=compileClasspath +org.apache.commons:commons-lang3:3.14.0=compileClasspath +org.apache.commons:commons-math3:3.6.1=compileClasspath +org.apache.groovy:groovy-bom:5.0.5=compileClasspath +org.apache.groovy:groovy:5.0.5=compileClasspath +org.apache.httpcomponents.client5:httpclient5:5.2.1=compileClasspath +org.apache.httpcomponents.core5:httpcore5-h2:5.2=compileClasspath +org.apache.httpcomponents.core5:httpcore5:5.2=compileClasspath +org.apache.httpcomponents:httpclient:4.5.1=compileClasspath +org.apache.httpcomponents:httpcore:4.4.3=compileClasspath +org.apache.ivy:ivy:2.5.2=compileClasspath +org.apache.maven:maven-plugin-api:2.0.1=compileClasspath +org.apache.sshd:sshd-common:2.7.0=compileClasspath +org.apache.sshd:sshd-core:2.7.0=compileClasspath +org.apache.sshd:sshd-osgi:2.7.0=compileClasspath +org.apache.sshd:sshd-sftp:2.7.0=compileClasspath +org.apache.ws.commons.util:ws-commons-util:1.0.2=compileClasspath +org.apache.xmlgraphics:batik-all:1.17=compileClasspath +org.apache.xmlgraphics:xmlgraphics-commons:2.9=compileClasspath +org.apache.xmlrpc:xmlrpc-client:3.1.3=compileClasspath +org.apache.xmlrpc:xmlrpc-common:3.1.3=compileClasspath +org.axsl.org.w3c.dom.smil:smil-boston-dom-java:2000-02-25=compileClasspath +org.axsl.org.w3c.dom.svg:svg-dom-java:1.1=compileClasspath +org.bytedeco:javacpp:1.5.7=compileClasspath +org.clojure:clojure:1.12.0=compileClasspath +org.clojure:core.specs.alpha:0.4.74=compileClasspath +org.clojure:spec.alpha:0.5.238=compileClasspath +org.controlsfx:controlsfx:8.0.6=compileClasspath +org.eclipse.jetty:jetty-continuation:9.4.36.v20210114=compileClasspath +org.eclipse.jetty:jetty-http:9.4.36.v20210114=compileClasspath +org.eclipse.jetty:jetty-io:9.4.36.v20210114=compileClasspath +org.eclipse.jetty:jetty-security:9.4.36.v20210114=compileClasspath +org.eclipse.jetty:jetty-server:9.4.36.v20210114=compileClasspath +org.eclipse.jetty:jetty-servlet:9.4.36.v20210114=compileClasspath +org.eclipse.jetty:jetty-servlets:9.4.36.v20210114=compileClasspath +org.eclipse.jetty:jetty-util-ajax:9.4.36.v20210114=compileClasspath +org.eclipse.jetty:jetty-util:9.4.36.v20210114=compileClasspath +org.eclipse.jetty:jetty-webapp:9.4.36.v20210114=compileClasspath +org.eclipse.jetty:jetty-xml:9.4.36.v20210114=compileClasspath +org.eclipse.jgit:org.eclipse.jgit.ssh.apache:5.13.1.202206130422-r=compileClasspath +org.eclipse.jgit:org.eclipse.jgit:5.13.1.202206130422-r=compileClasspath +org.fxmisc.flowless:flowless:0.7.4=compileClasspath +org.fxmisc.richtext:richtextfx:0.11.7=compileClasspath +org.fxmisc.undo:undofx:2.1.1=compileClasspath +org.fxmisc.wellbehaved:wellbehavedfx:0.3.3=compileClasspath +org.jenkins-ci:annotation-indexer:1.4=compileClasspath +org.json:json:20180813=compileClasspath +org.jsoup:jsoup:1.8.3=compileClasspath +org.jvnet.localizer:localizer:1.7=compileClasspath +org.jvnet:tiger-types:2.2=compileClasspath +org.kohsuke.stapler:json-lib:2.4-jenkins-2=compileClasspath +org.kohsuke.stapler:stapler:1.263=compileClasspath +org.kohsuke:asm5:5.0.1=compileClasspath +org.kohsuke:github-api:1.101=compileClasspath +org.kohsuke:wordnet-random-name:1.2=compileClasspath +org.mockito:mockito-all:1.9.5=compileClasspath +org.ow2.asm:asm-debug-all:4.2=compileClasspath +org.python:jython-standalone:2.5.2=compileClasspath +org.python:jython:2.5.3=compileClasspath +org.reactfx:reactfx:2.0-M5=compileClasspath +org.scream3r:jssc:2.8.0=compileClasspath +org.slf4j:jcl-over-slf4j:1.7.30=compileClasspath +org.slf4j:slf4j-api:1.7.36=compileClasspath +org.slf4j:slf4j-simple:1.6.1=compileClasspath +org.usb4java:libusb4java:1.2.0=compileClasspath +org.usb4java:usb4java-javax:1.2.0=compileClasspath +org.usb4java:usb4java:1.2.0=compileClasspath +us.ihmc:ihmc-native-library-loader:1.3.1=compileClasspath +us.ihmc:jinput:2.0.6-ihmc2=compileClasspath +xml-apis:xml-apis-ext:1.3.04=compileClasspath +xml-apis:xml-apis:1.4.01=compileClasspath +empty=annotationProcessor