mirror of
https://github.com/PhotonVision/photonvision
synced 2026-07-06 03:31:41 +00:00
Upgrade all maven dependencies for 2022 (#377)
This also fixes compilation with JDK 17.
This commit is contained in:
16
build.gradle
16
build.gradle
@@ -1,10 +1,10 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id "com.diffplug.gradle.spotless" version "3.28.0"
|
id "com.diffplug.spotless" version "6.0.5"
|
||||||
id "com.github.johnrengelman.shadow" version "5.2.0"
|
id "com.github.johnrengelman.shadow" version "7.1.1"
|
||||||
id "com.github.node-gradle.node" version "2.2.4" apply false
|
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.GradleJni" version "1.0.0"
|
||||||
id "edu.wpi.first.GradleVsCode" version "1.0.0"
|
id "edu.wpi.first.GradleVsCode" version "1.1.0"
|
||||||
id "edu.wpi.first.NativeUtils" version "2022.4.4" apply false
|
id "edu.wpi.first.NativeUtils" version "2022.8.1" apply false
|
||||||
id "edu.wpi.first.wpilib.repositories.WPILibRepositoriesPlugin" version "2020.2"
|
id "edu.wpi.first.wpilib.repositories.WPILibRepositoriesPlugin" version "2020.2"
|
||||||
id "org.hidetake.ssh" version "2.10.1"
|
id "org.hidetake.ssh" version "2.10.1"
|
||||||
}
|
}
|
||||||
@@ -22,7 +22,7 @@ allprojects {
|
|||||||
apply from: "versioningHelper.gradle"
|
apply from: "versioningHelper.gradle"
|
||||||
|
|
||||||
ext {
|
ext {
|
||||||
wpilibVersion = "2022.1.1-rc-1"
|
wpilibVersion = "2022.1.1"
|
||||||
opencvVersion = "4.5.2-1"
|
opencvVersion = "4.5.2-1"
|
||||||
joglVersion = "2.4.0-rc-20200307"
|
joglVersion = "2.4.0-rc-20200307"
|
||||||
pubVersion = versionString
|
pubVersion = versionString
|
||||||
@@ -37,11 +37,13 @@ ext {
|
|||||||
|
|
||||||
spotless {
|
spotless {
|
||||||
java {
|
java {
|
||||||
|
toggleOffOn()
|
||||||
googleJavaFormat()
|
googleJavaFormat()
|
||||||
paddedCell()
|
|
||||||
indentWithTabs(2)
|
indentWithTabs(2)
|
||||||
indentWithSpaces(4)
|
indentWithSpaces(4)
|
||||||
removeUnusedImports()
|
removeUnusedImports()
|
||||||
|
trimTrailingWhitespace()
|
||||||
|
endWithNewline()
|
||||||
}
|
}
|
||||||
java {
|
java {
|
||||||
target "**/*.java"
|
target "**/*.java"
|
||||||
|
|||||||
8
gradle.properties
Normal file
8
gradle.properties
Normal 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
|
||||||
@@ -5,10 +5,10 @@ apply from: "${rootDir}/shared/common.gradle"
|
|||||||
dependencies {
|
dependencies {
|
||||||
implementation project(':photon-targeting')
|
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:msgpack-core:0.9.0'
|
||||||
implementation 'org.msgpack:jackson-dataformat-msgpack:0.8.20'
|
implementation 'org.msgpack:jackson-dataformat-msgpack:0.9.0'
|
||||||
|
|
||||||
// wpiutil
|
// wpiutil
|
||||||
jniPlatforms.each { implementation "edu.wpi.first.wpiutil:wpiutil-jni:$wpilibVersion:$it" }
|
jniPlatforms.each { implementation "edu.wpi.first.wpiutil:wpiutil-jni:$wpilibVersion:$it" }
|
||||||
|
|||||||
@@ -65,8 +65,7 @@ public class ScriptManager {
|
|||||||
|
|
||||||
private void handleEvent(ScriptEventType eventType) {
|
private void handleEvent(ScriptEventType eventType) {
|
||||||
var toRun =
|
var toRun =
|
||||||
events
|
events.parallelStream()
|
||||||
.parallelStream()
|
|
||||||
.filter(e -> e.config.eventType == eventType)
|
.filter(e -> e.config.eventType == eventType)
|
||||||
.findFirst()
|
.findFirst()
|
||||||
.orElse(null);
|
.orElse(null);
|
||||||
|
|||||||
@@ -33,9 +33,9 @@ dependencies {
|
|||||||
jniPlatforms.each { implementation "edu.wpi.first.hal:hal-jni:$wpilibVersion:$it"}
|
jniPlatforms.each { implementation "edu.wpi.first.hal:hal-jni:$wpilibVersion:$it"}
|
||||||
|
|
||||||
// Junit
|
// Junit
|
||||||
testImplementation("org.junit.jupiter:junit-jupiter-api:5.6.2")
|
testImplementation("org.junit.jupiter:junit-jupiter-api:5.8.2")
|
||||||
testImplementation("org.junit.jupiter:junit-jupiter-params:5.6.2")
|
testImplementation("org.junit.jupiter:junit-jupiter-params:5.8.2")
|
||||||
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.6.2")
|
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.8.2")
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set up exports properly
|
// Set up exports properly
|
||||||
|
|||||||
@@ -14,10 +14,10 @@ apply from: "${rootDir}/shared/common.gradle"
|
|||||||
dependencies {
|
dependencies {
|
||||||
implementation project(':photon-core')
|
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:msgpack-core:0.9.0"
|
||||||
implementation "org.msgpack:jackson-dataformat-msgpack:0.8.20"
|
implementation "org.msgpack:jackson-dataformat-msgpack:0.9.0"
|
||||||
|
|
||||||
implementation "org.slf4j:slf4j-simple:1.8.0-beta4"
|
implementation "org.slf4j:slf4j-simple:1.8.0-beta4"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
package org.photonvision.server;
|
package org.photonvision.server;
|
||||||
|
|
||||||
import io.javalin.Javalin;
|
import io.javalin.Javalin;
|
||||||
|
import io.javalin.http.staticfiles.Location;
|
||||||
import org.photonvision.common.logging.LogGroup;
|
import org.photonvision.common.logging.LogGroup;
|
||||||
import org.photonvision.common.logging.Logger;
|
import org.photonvision.common.logging.Logger;
|
||||||
|
|
||||||
@@ -28,7 +29,7 @@ public class Server {
|
|||||||
Javalin.create(
|
Javalin.create(
|
||||||
config -> {
|
config -> {
|
||||||
config.showJavalinBanner = false;
|
config.showJavalinBanner = false;
|
||||||
config.addStaticFiles("web");
|
config.addStaticFiles("web", Location.CLASSPATH);
|
||||||
config.enableCorsForAllOrigins();
|
config.enableCorsForAllOrigins();
|
||||||
|
|
||||||
config.requestLogger(
|
config.requestLogger(
|
||||||
|
|||||||
@@ -10,14 +10,14 @@ sourceCompatibility = 11
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
// Jackson
|
// Jackson
|
||||||
implementation "com.fasterxml.jackson.core:jackson-annotations:2.10.0"
|
implementation "com.fasterxml.jackson.core:jackson-annotations:2.12.4"
|
||||||
implementation "com.fasterxml.jackson.core:jackson-core:2.10.0"
|
implementation "com.fasterxml.jackson.core:jackson-core:2.12.4"
|
||||||
implementation "com.fasterxml.jackson.core:jackson-databind:2.10.0"
|
implementation "com.fasterxml.jackson.core:jackson-databind:2.12.4"
|
||||||
|
|
||||||
// Apache commons
|
// Apache commons
|
||||||
implementation group: "org.apache.commons", name: "commons-lang3", version: "3.9"
|
implementation group: "org.apache.commons", name: "commons-lang3", version: "3.12.0"
|
||||||
implementation group: "commons-io", name: "commons-io", version: "2.6"
|
implementation group: "commons-io", name: "commons-io", version: "2.11.0"
|
||||||
implementation group: "commons-cli", name: "commons-cli", version: "1.4"
|
implementation group: "commons-cli", name: "commons-cli", version: "1.5.0"
|
||||||
implementation "org.apache.commons:commons-collections4:4.4"
|
implementation "org.apache.commons:commons-collections4:4.4"
|
||||||
implementation "org.apache.commons:commons-exec:1.3"
|
implementation "org.apache.commons:commons-exec:1.3"
|
||||||
|
|
||||||
@@ -34,11 +34,11 @@ dependencies {
|
|||||||
implementation "edu.wpi.first.thirdparty.frc2022.opencv:opencv-java:$opencvVersion"
|
implementation "edu.wpi.first.thirdparty.frc2022.opencv:opencv-java:$opencvVersion"
|
||||||
jniPlatforms.each { implementation "edu.wpi.first.thirdparty.frc2022.opencv:opencv-jni:$opencvVersion:$it" }
|
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"
|
implementation "org.ejml:ejml-simple:0.41"
|
||||||
|
|
||||||
// test stuff
|
// test stuff
|
||||||
testImplementation("org.junit.jupiter:junit-jupiter:5.6.0")
|
testImplementation("org.junit.jupiter:junit-jupiter:5.8.2")
|
||||||
}
|
}
|
||||||
|
|
||||||
test {
|
test {
|
||||||
|
|||||||
@@ -8,10 +8,10 @@ nativeUtils.withBionic()
|
|||||||
nativeUtils.wpi.configureDependencies {
|
nativeUtils.wpi.configureDependencies {
|
||||||
wpiVersion = wpilibVersion
|
wpiVersion = wpilibVersion
|
||||||
wpimathVersion = wpilibVersion
|
wpimathVersion = wpilibVersion
|
||||||
niLibVersion = "2022.2.2"
|
niLibVersion = "2022.2.3"
|
||||||
opencvVersion = "4.5.2-1"
|
opencvVersion = "4.5.2-1"
|
||||||
googleTestVersion = "1.9.0-5-437e100-1"
|
googleTestVersion = "1.9.0-5-437e100-1"
|
||||||
imguiVersion = "1.82-1"
|
imguiVersion = "1.86-1"
|
||||||
}
|
}
|
||||||
|
|
||||||
// Configure warnings and errors
|
// Configure warnings and errors
|
||||||
|
|||||||
Reference in New Issue
Block a user