summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar modmuss2023-11-19 14:43:06 +0000
committerGravatar GitHub2023-11-19 14:43:06 +0000
commitc675acfff352e37bf7dec102437b47d3c8c5a52d (patch)
tree300a39d8a861f831bde2732161cb5b0b54d5ba0a
parentBump version (diff)
downloadenigma-c675acfff352e37bf7dec102437b47d3c8c5a52d.tar.gz
enigma-c675acfff352e37bf7dec102437b47d3c8c5a52d.tar.xz
enigma-c675acfff352e37bf7dec102437b47d3c8c5a52d.zip
Update deps (#535)
-rw-r--r--.github/workflows/build.yml6
-rw-r--r--.github/workflows/release.yml4
-rw-r--r--build.gradle17
-rw-r--r--enigma-cli/build.gradle8
-rw-r--r--enigma-server/build.gradle6
-rw-r--r--enigma-swing/build.gradle23
-rw-r--r--enigma/build.gradle10
-rw-r--r--gradle/wrapper/gradle-wrapper.jarbin61574 -> 63721 bytes
-rw-r--r--gradle/wrapper/gradle-wrapper.properties3
-rwxr-xr-xgradlew29
-rw-r--r--gradlew.bat184
11 files changed, 154 insertions, 136 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index f2fbb3a6..64108e6c 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -4,13 +4,13 @@ jobs:
4 build: 4 build:
5 strategy: 5 strategy:
6 matrix: 6 matrix:
7 java: [ 17-jdk, 19-jdk ] 7 java: [ 17-ubuntu, 21-ubuntu ]
8 runs-on: ubuntu-22.04 8 runs-on: ubuntu-22.04
9 container: 9 container:
10 image: eclipse-temurin:${{ matrix.java }} 10 image: mcr.microsoft.com/openjdk/jdk:${{ matrix.java }}
11 options: --user root 11 options: --user root
12 steps: 12 steps:
13 - uses: actions/checkout@v3 13 - uses: actions/checkout@v4
14 - run: ./gradlew build --stacktrace --warning-mode fail 14 - run: ./gradlew build --stacktrace --warning-mode fail
15 - uses: Juuxel/publish-checkstyle-report@v1 15 - uses: Juuxel/publish-checkstyle-report@v1
16 if: ${{ failure() }} 16 if: ${{ failure() }}
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 87fd901a..5a5d0b4b 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -4,10 +4,10 @@ jobs:
4 build: 4 build:
5 runs-on: ubuntu-22.04 5 runs-on: ubuntu-22.04
6 container: 6 container:
7 image: eclipse-temurin:19-jdk 7 image: mcr.microsoft.com/openjdk/jdk:21-ubuntu
8 options: --user root 8 options: --user root
9 steps: 9 steps:
10 - uses: actions/checkout@v3 10 - uses: actions/checkout@v4
11 - run: ./gradlew checkVersion build publish --stacktrace 11 - run: ./gradlew checkVersion build publish --stacktrace
12 env: 12 env:
13 MAVEN_URL: ${{ secrets.MAVEN_URL }} 13 MAVEN_URL: ${{ secrets.MAVEN_URL }}
diff --git a/build.gradle b/build.gradle
index 08ccffe8..58cb0bad 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,5 +1,6 @@
1plugins { 1plugins {
2 id 'maven-publish' 2 id 'maven-publish'
3 id 'com.github.johnrengelman.shadow' version '8.1.1' apply false
3} 4}
4 5
5subprojects { 6subprojects {
@@ -7,9 +8,6 @@ subprojects {
7 apply plugin: 'maven-publish' 8 apply plugin: 'maven-publish'
8 apply plugin: 'checkstyle' 9 apply plugin: 'checkstyle'
9 10
10 sourceCompatibility = JavaVersion.VERSION_17
11 targetCompatibility = JavaVersion.VERSION_17
12
13 repositories { 11 repositories {
14 mavenLocal() 12 mavenLocal()
15 mavenCentral() 13 mavenCentral()
@@ -17,8 +15,8 @@ subprojects {
17 } 15 }
18 16
19 dependencies { 17 dependencies {
20 implementation 'com.google.guava:guava:30.1.1-jre' 18 implementation 'com.google.guava:guava:32.1.2-jre'
21 implementation 'com.google.code.gson:gson:2.8.7' 19 implementation 'com.google.code.gson:gson:2.10.1'
22 20
23 testImplementation 'junit:junit:4.13.2' 21 testImplementation 'junit:junit:4.13.2'
24 testImplementation 'org.hamcrest:hamcrest:2.2' 22 testImplementation 'org.hamcrest:hamcrest:2.2'
@@ -29,13 +27,10 @@ subprojects {
29 27
30 version = version + (System.getenv("GITHUB_ACTIONS") ? "" : "+local") 28 version = version + (System.getenv("GITHUB_ACTIONS") ? "" : "+local")
31 29
32 task sourcesJar(type: Jar, dependsOn: classes) {
33 classifier = 'sources'
34 from sourceSets.main.allSource
35 }
36
37 java { 30 java {
38 withSourcesJar() 31 withSourcesJar()
32 sourceCompatibility = JavaVersion.VERSION_17
33 targetCompatibility = JavaVersion.VERSION_17
39 } 34 }
40 35
41 tasks.withType(JavaCompile).configureEach { 36 tasks.withType(JavaCompile).configureEach {
@@ -46,7 +41,7 @@ subprojects {
46 41
47 checkstyle { 42 checkstyle {
48 configFile = rootProject.file('checkstyle.xml') 43 configFile = rootProject.file('checkstyle.xml')
49 toolVersion = '10.3.3' 44 toolVersion = '10.12.4'
50 } 45 }
51 46
52 publishing { 47 publishing {
diff --git a/enigma-cli/build.gradle b/enigma-cli/build.gradle
index 5281e9e6..05e644e1 100644
--- a/enigma-cli/build.gradle
+++ b/enigma-cli/build.gradle
@@ -1,15 +1,17 @@
1plugins { 1plugins {
2 id 'application' 2 id 'application'
3 id 'com.github.johnrengelman.shadow' version '7.0.0' 3 id 'com.github.johnrengelman.shadow'
4} 4}
5 5
6dependencies { 6dependencies {
7 implementation project(':enigma') 7 implementation project(':enigma')
8} 8}
9 9
10mainClassName = 'cuchaz.enigma.command.Main' 10application {
11 mainClass = 'cuchaz.enigma.command.Main'
12}
11 13
12jar.manifest.attributes 'Main-Class': mainClassName 14jar.manifest.attributes 'Main-Class': application.mainClass.get()
13 15
14publishing { 16publishing {
15 publications { 17 publications {
diff --git a/enigma-server/build.gradle b/enigma-server/build.gradle
index 873adb90..0daa490e 100644
--- a/enigma-server/build.gradle
+++ b/enigma-server/build.gradle
@@ -7,6 +7,8 @@ dependencies {
7 implementation 'net.sf.jopt-simple:jopt-simple:6.0-alpha-3' 7 implementation 'net.sf.jopt-simple:jopt-simple:6.0-alpha-3'
8} 8}
9 9
10mainClassName = 'cuchaz.enigma.network.DedicatedEnigmaServer' 10application {
11 mainClass = 'cuchaz.enigma.network.DedicatedEnigmaServer'
12}
11 13
12jar.manifest.attributes 'Main-Class': mainClassName 14jar.manifest.attributes 'Main-Class': application.mainClass.get()
diff --git a/enigma-swing/build.gradle b/enigma-swing/build.gradle
index fff4dafe..452df5e7 100644
--- a/enigma-swing/build.gradle
+++ b/enigma-swing/build.gradle
@@ -1,23 +1,36 @@
1plugins { 1plugins {
2 id 'application' 2 id 'application'
3 id 'com.github.johnrengelman.shadow' version '7.0.0' 3 id 'com.github.johnrengelman.shadow'
4} 4}
5 5
6def flatLafNatives = [
7 "windows-arm64@dll",
8 "windows-x86@dll",
9 "windows-x86_64@dll",
10 "linux-x86_64@so",
11]
12
6dependencies { 13dependencies {
7 implementation project(':enigma') 14 implementation project(':enigma')
8 implementation project(':enigma-server') 15 implementation project(':enigma-server')
9 16
10 implementation 'net.sf.jopt-simple:jopt-simple:6.0-alpha-3' 17 implementation 'net.sf.jopt-simple:jopt-simple:6.0-alpha-3'
11 implementation 'com.formdev:flatlaf:2.6' 18 implementation 'com.formdev:flatlaf:3.2.5'
12 implementation 'com.formdev:flatlaf-extras:2.6' // for SVG icons 19 implementation 'com.formdev:flatlaf-extras:3.2.5' // for SVG icons
13 implementation 'de.sciss:syntaxpane:1.2.1' 20 implementation 'de.sciss:syntaxpane:1.2.1'
14 implementation 'com.github.lukeu:swing-dpi:0.10' 21 implementation 'com.github.lukeu:swing-dpi:0.10'
15 implementation 'org.drjekyll:fontchooser:2.5.2' 22 implementation 'org.drjekyll:fontchooser:2.5.2'
23
24 flatLafNatives.forEach {
25 implementation 'com.formdev:flatlaf:3.2.5:' + it
26 }
16} 27}
17 28
18mainClassName = 'cuchaz.enigma.gui.Main' 29application {
30 mainClass = 'cuchaz.enigma.gui.Main'
31}
19 32
20jar.manifest.attributes 'Main-Class': mainClassName 33jar.manifest.attributes 'Main-Class': application.mainClass.get()
21 34
22publishing { 35publishing {
23 publications { 36 publications {
diff --git a/enigma/build.gradle b/enigma/build.gradle
index 8cbfec28..cabea135 100644
--- a/enigma/build.gradle
+++ b/enigma/build.gradle
@@ -3,15 +3,15 @@ configurations {
3} 3}
4 4
5dependencies { 5dependencies {
6 implementation 'org.ow2.asm:asm:9.4' 6 implementation 'org.ow2.asm:asm:9.6'
7 implementation 'org.ow2.asm:asm-commons:9.4' 7 implementation 'org.ow2.asm:asm-commons:9.6'
8 implementation 'org.ow2.asm:asm-tree:9.4' 8 implementation 'org.ow2.asm:asm-tree:9.6'
9 implementation 'org.ow2.asm:asm-util:9.4' 9 implementation 'org.ow2.asm:asm-util:9.6'
10 10
11 implementation 'org.bitbucket.mstrobel:procyon-compilertools:0.6.0' 11 implementation 'org.bitbucket.mstrobel:procyon-compilertools:0.6.0'
12 implementation 'net.fabricmc:cfr:0.2.1' 12 implementation 'net.fabricmc:cfr:0.2.1'
13 13
14 proGuard 'com.guardsquare:proguard-base:7.3.0' 14 proGuard 'com.guardsquare:proguard-base:7.4.0-beta02'
15 15
16 testImplementation 'com.google.jimfs:jimfs:1.2' 16 testImplementation 'com.google.jimfs:jimfs:1.2'
17} 17}
diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar
index 943f0cbf..7f93135c 100644
--- a/gradle/wrapper/gradle-wrapper.jar
+++ b/gradle/wrapper/gradle-wrapper.jar
Binary files differ
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index f398c33c..3fa8f862 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,7 @@
1distributionBase=GRADLE_USER_HOME 1distributionBase=GRADLE_USER_HOME
2distributionPath=wrapper/dists 2distributionPath=wrapper/dists
3distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip 3distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
4networkTimeout=10000 4networkTimeout=10000
5validateDistributionUrl=true
5zipStoreBase=GRADLE_USER_HOME 6zipStoreBase=GRADLE_USER_HOME
6zipStorePath=wrapper/dists 7zipStorePath=wrapper/dists
diff --git a/gradlew b/gradlew
index 65dcd68d..1aa94a42 100755
--- a/gradlew
+++ b/gradlew
@@ -83,10 +83,8 @@ done
83# This is normally unused 83# This is normally unused
84# shellcheck disable=SC2034 84# shellcheck disable=SC2034
85APP_BASE_NAME=${0##*/} 85APP_BASE_NAME=${0##*/}
86APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit 86# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
87 87APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
88# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
89DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
90 88
91# Use the maximum available, or set MAX_FD != -1 to use that value. 89# Use the maximum available, or set MAX_FD != -1 to use that value.
92MAX_FD=maximum 90MAX_FD=maximum
@@ -133,10 +131,13 @@ location of your Java installation."
133 fi 131 fi
134else 132else
135 JAVACMD=java 133 JAVACMD=java
136 which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 134 if ! command -v java >/dev/null 2>&1
135 then
136 die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
137 137
138Please set the JAVA_HOME variable in your environment to match the 138Please set the JAVA_HOME variable in your environment to match the
139location of your Java installation." 139location of your Java installation."
140 fi
140fi 141fi
141 142
142# Increase the maximum file descriptors if we can. 143# Increase the maximum file descriptors if we can.
@@ -144,7 +145,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
144 case $MAX_FD in #( 145 case $MAX_FD in #(
145 max*) 146 max*)
146 # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. 147 # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
147 # shellcheck disable=SC3045 148 # shellcheck disable=SC2039,SC3045
148 MAX_FD=$( ulimit -H -n ) || 149 MAX_FD=$( ulimit -H -n ) ||
149 warn "Could not query maximum file descriptor limit" 150 warn "Could not query maximum file descriptor limit"
150 esac 151 esac
@@ -152,7 +153,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
152 '' | soft) :;; #( 153 '' | soft) :;; #(
153 *) 154 *)
154 # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. 155 # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
155 # shellcheck disable=SC3045 156 # shellcheck disable=SC2039,SC3045
156 ulimit -n "$MAX_FD" || 157 ulimit -n "$MAX_FD" ||
157 warn "Could not set maximum file descriptor limit to $MAX_FD" 158 warn "Could not set maximum file descriptor limit to $MAX_FD"
158 esac 159 esac
@@ -197,11 +198,15 @@ if "$cygwin" || "$msys" ; then
197 done 198 done
198fi 199fi
199 200
200# Collect all arguments for the java command; 201
201# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of 202# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
202# shell script including quotes and variable substitutions, so put them in 203DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
203# double quotes to make sure that they get re-expanded; and 204
204# * put everything else in single quotes, so that it's not re-expanded. 205# Collect all arguments for the java command:
206# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
207# and any embedded shellness will be escaped.
208# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
209# treated as '${Hostname}' itself on the command line.
205 210
206set -- \ 211set -- \
207 "-Dorg.gradle.appname=$APP_BASE_NAME" \ 212 "-Dorg.gradle.appname=$APP_BASE_NAME" \
diff --git a/gradlew.bat b/gradlew.bat
index 6689b85b..93e3f59f 100644
--- a/gradlew.bat
+++ b/gradlew.bat
@@ -1,92 +1,92 @@
1@rem 1@rem
2@rem Copyright 2015 the original author or authors. 2@rem Copyright 2015 the original author or authors.
3@rem 3@rem
4@rem Licensed under the Apache License, Version 2.0 (the "License"); 4@rem Licensed under the Apache License, Version 2.0 (the "License");
5@rem you may not use this file except in compliance with the License. 5@rem you may not use this file except in compliance with the License.
6@rem You may obtain a copy of the License at 6@rem You may obtain a copy of the License at
7@rem 7@rem
8@rem https://www.apache.org/licenses/LICENSE-2.0 8@rem https://www.apache.org/licenses/LICENSE-2.0
9@rem 9@rem
10@rem Unless required by applicable law or agreed to in writing, software 10@rem Unless required by applicable law or agreed to in writing, software
11@rem distributed under the License is distributed on an "AS IS" BASIS, 11@rem distributed under the License is distributed on an "AS IS" BASIS,
12@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13@rem See the License for the specific language governing permissions and 13@rem See the License for the specific language governing permissions and
14@rem limitations under the License. 14@rem limitations under the License.
15@rem 15@rem
16 16
17@if "%DEBUG%"=="" @echo off 17@if "%DEBUG%"=="" @echo off
18@rem ########################################################################## 18@rem ##########################################################################
19@rem 19@rem
20@rem Gradle startup script for Windows 20@rem Gradle startup script for Windows
21@rem 21@rem
22@rem ########################################################################## 22@rem ##########################################################################
23 23
24@rem Set local scope for the variables with windows NT shell 24@rem Set local scope for the variables with windows NT shell
25if "%OS%"=="Windows_NT" setlocal 25if "%OS%"=="Windows_NT" setlocal
26 26
27set DIRNAME=%~dp0 27set DIRNAME=%~dp0
28if "%DIRNAME%"=="" set DIRNAME=. 28if "%DIRNAME%"=="" set DIRNAME=.
29@rem This is normally unused 29@rem This is normally unused
30set APP_BASE_NAME=%~n0 30set APP_BASE_NAME=%~n0
31set APP_HOME=%DIRNAME% 31set APP_HOME=%DIRNAME%
32 32
33@rem Resolve any "." and ".." in APP_HOME to make it shorter. 33@rem Resolve any "." and ".." in APP_HOME to make it shorter.
34for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi 34for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
35 35
36@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 36@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
37set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" 37set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
38 38
39@rem Find java.exe 39@rem Find java.exe
40if defined JAVA_HOME goto findJavaFromJavaHome 40if defined JAVA_HOME goto findJavaFromJavaHome
41 41
42set JAVA_EXE=java.exe 42set JAVA_EXE=java.exe
43%JAVA_EXE% -version >NUL 2>&1 43%JAVA_EXE% -version >NUL 2>&1
44if %ERRORLEVEL% equ 0 goto execute 44if %ERRORLEVEL% equ 0 goto execute
45 45
46echo. 46echo.
47echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 47echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
48echo. 48echo.
49echo Please set the JAVA_HOME variable in your environment to match the 49echo Please set the JAVA_HOME variable in your environment to match the
50echo location of your Java installation. 50echo location of your Java installation.
51 51
52goto fail 52goto fail
53 53
54:findJavaFromJavaHome 54:findJavaFromJavaHome
55set JAVA_HOME=%JAVA_HOME:"=% 55set JAVA_HOME=%JAVA_HOME:"=%
56set JAVA_EXE=%JAVA_HOME%/bin/java.exe 56set JAVA_EXE=%JAVA_HOME%/bin/java.exe
57 57
58if exist "%JAVA_EXE%" goto execute 58if exist "%JAVA_EXE%" goto execute
59 59
60echo. 60echo.
61echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 61echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
62echo. 62echo.
63echo Please set the JAVA_HOME variable in your environment to match the 63echo Please set the JAVA_HOME variable in your environment to match the
64echo location of your Java installation. 64echo location of your Java installation.
65 65
66goto fail 66goto fail
67 67
68:execute 68:execute
69@rem Setup the command line 69@rem Setup the command line
70 70
71set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 71set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
72 72
73 73
74@rem Execute Gradle 74@rem Execute Gradle
75"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* 75"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
76 76
77:end 77:end
78@rem End local scope for the variables with windows NT shell 78@rem End local scope for the variables with windows NT shell
79if %ERRORLEVEL% equ 0 goto mainEnd 79if %ERRORLEVEL% equ 0 goto mainEnd
80 80
81:fail 81:fail
82rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 82rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83rem the _cmd.exe /c_ return code! 83rem the _cmd.exe /c_ return code!
84set EXIT_CODE=%ERRORLEVEL% 84set EXIT_CODE=%ERRORLEVEL%
85if %EXIT_CODE% equ 0 set EXIT_CODE=1 85if %EXIT_CODE% equ 0 set EXIT_CODE=1
86if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% 86if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
87exit /b %EXIT_CODE% 87exit /b %EXIT_CODE%
88 88
89:mainEnd 89:mainEnd
90if "%OS%"=="Windows_NT" endlocal 90if "%OS%"=="Windows_NT" endlocal
91 91
92:omega 92:omega