Upgrade all maven dependencies for 2022 (#377)

This also fixes compilation with JDK 17.
This commit is contained in:
Tyler Veness
2022-01-08 10:17:28 -08:00
committed by GitHub
parent 0f730fc28d
commit a161bd5be9
9 changed files with 39 additions and 29 deletions

View File

@@ -1,10 +1,10 @@
plugins {
id "com.diffplug.gradle.spotless" version "3.28.0"
id "com.github.johnrengelman.shadow" version "5.2.0"
id "com.github.node-gradle.node" version "2.2.4" apply false
id "com.diffplug.spotless" version "6.0.5"
id "com.github.johnrengelman.shadow" version "7.1.1"
id "com.github.node-gradle.node" version "3.1.1" apply false
id "edu.wpi.first.GradleJni" version "1.0.0"
id "edu.wpi.first.GradleVsCode" version "1.0.0"
id "edu.wpi.first.NativeUtils" version "2022.4.4" apply false
id "edu.wpi.first.GradleVsCode" version "1.1.0"
id "edu.wpi.first.NativeUtils" version "2022.8.1" apply false
id "edu.wpi.first.wpilib.repositories.WPILibRepositoriesPlugin" version "2020.2"
id "org.hidetake.ssh" version "2.10.1"
}
@@ -22,7 +22,7 @@ allprojects {
apply from: "versioningHelper.gradle"
ext {
wpilibVersion = "2022.1.1-rc-1"
wpilibVersion = "2022.1.1"
opencvVersion = "4.5.2-1"
joglVersion = "2.4.0-rc-20200307"
pubVersion = versionString
@@ -37,11 +37,13 @@ ext {
spotless {
java {
toggleOffOn()
googleJavaFormat()
paddedCell()
indentWithTabs(2)
indentWithSpaces(4)
removeUnusedImports()
trimTrailingWhitespace()
endWithNewline()
}
java {
target "**/*.java"

8
gradle.properties Normal file
View File

@@ -0,0 +1,8 @@
# The --add-exports flags work around a bug with spotless and JDK 17
# https://github.com/diffplug/spotless/issues/834
org.gradle.jvmargs= \
--add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED \
--add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED \
--add-exports jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED \
--add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED \
--add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED

View File

@@ -5,10 +5,10 @@ apply from: "${rootDir}/shared/common.gradle"
dependencies {
implementation project(':photon-targeting')
implementation 'io.javalin:javalin:3.7.0'
implementation 'io.javalin:javalin:4.2.0'
implementation 'org.msgpack:msgpack-core:0.8.20'
implementation 'org.msgpack:jackson-dataformat-msgpack:0.8.20'
implementation 'org.msgpack:msgpack-core:0.9.0'
implementation 'org.msgpack:jackson-dataformat-msgpack:0.9.0'
// wpiutil
jniPlatforms.each { implementation "edu.wpi.first.wpiutil:wpiutil-jni:$wpilibVersion:$it" }

View File

@@ -65,8 +65,7 @@ public class ScriptManager {
private void handleEvent(ScriptEventType eventType) {
var toRun =
events
.parallelStream()
events.parallelStream()
.filter(e -> e.config.eventType == eventType)
.findFirst()
.orElse(null);

View File

@@ -33,9 +33,9 @@ dependencies {
jniPlatforms.each { implementation "edu.wpi.first.hal:hal-jni:$wpilibVersion:$it"}
// Junit
testImplementation("org.junit.jupiter:junit-jupiter-api:5.6.2")
testImplementation("org.junit.jupiter:junit-jupiter-params:5.6.2")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.6.2")
testImplementation("org.junit.jupiter:junit-jupiter-api:5.8.2")
testImplementation("org.junit.jupiter:junit-jupiter-params:5.8.2")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.8.2")
}
// Set up exports properly

View File

@@ -14,10 +14,10 @@ apply from: "${rootDir}/shared/common.gradle"
dependencies {
implementation project(':photon-core')
implementation "io.javalin:javalin:3.7.0"
implementation "io.javalin:javalin:4.2.0"
implementation "org.msgpack:msgpack-core:0.8.20"
implementation "org.msgpack:jackson-dataformat-msgpack:0.8.20"
implementation "org.msgpack:msgpack-core:0.9.0"
implementation "org.msgpack:jackson-dataformat-msgpack:0.9.0"
implementation "org.slf4j:slf4j-simple:1.8.0-beta4"
}

View File

@@ -17,6 +17,7 @@
package org.photonvision.server;
import io.javalin.Javalin;
import io.javalin.http.staticfiles.Location;
import org.photonvision.common.logging.LogGroup;
import org.photonvision.common.logging.Logger;
@@ -28,7 +29,7 @@ public class Server {
Javalin.create(
config -> {
config.showJavalinBanner = false;
config.addStaticFiles("web");
config.addStaticFiles("web", Location.CLASSPATH);
config.enableCorsForAllOrigins();
config.requestLogger(

View File

@@ -10,14 +10,14 @@ sourceCompatibility = 11
dependencies {
// Jackson
implementation "com.fasterxml.jackson.core:jackson-annotations:2.10.0"
implementation "com.fasterxml.jackson.core:jackson-core:2.10.0"
implementation "com.fasterxml.jackson.core:jackson-databind:2.10.0"
implementation "com.fasterxml.jackson.core:jackson-annotations:2.12.4"
implementation "com.fasterxml.jackson.core:jackson-core:2.12.4"
implementation "com.fasterxml.jackson.core:jackson-databind:2.12.4"
// Apache commons
implementation group: "org.apache.commons", name: "commons-lang3", version: "3.9"
implementation group: "commons-io", name: "commons-io", version: "2.6"
implementation group: "commons-cli", name: "commons-cli", version: "1.4"
implementation group: "org.apache.commons", name: "commons-lang3", version: "3.12.0"
implementation group: "commons-io", name: "commons-io", version: "2.11.0"
implementation group: "commons-cli", name: "commons-cli", version: "1.5.0"
implementation "org.apache.commons:commons-collections4:4.4"
implementation "org.apache.commons:commons-exec:1.3"
@@ -34,11 +34,11 @@ dependencies {
implementation "edu.wpi.first.thirdparty.frc2022.opencv:opencv-java:$opencvVersion"
jniPlatforms.each { implementation "edu.wpi.first.thirdparty.frc2022.opencv:opencv-jni:$opencvVersion:$it" }
implementation "edu.wpi.first.wpimath:wpimath-java:2022.1.1-beta-2"
implementation "edu.wpi.first.wpimath:wpimath-java:2022.1.1"
implementation "org.ejml:ejml-simple:0.41"
// test stuff
testImplementation("org.junit.jupiter:junit-jupiter:5.6.0")
testImplementation("org.junit.jupiter:junit-jupiter:5.8.2")
}
test {

View File

@@ -8,10 +8,10 @@ nativeUtils.withBionic()
nativeUtils.wpi.configureDependencies {
wpiVersion = wpilibVersion
wpimathVersion = wpilibVersion
niLibVersion = "2022.2.2"
niLibVersion = "2022.2.3"
opencvVersion = "4.5.2-1"
googleTestVersion = "1.9.0-5-437e100-1"
imguiVersion = "1.82-1"
imguiVersion = "1.86-1"
}
// Configure warnings and errors