summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar NebelNidas2023-11-28 09:38:33 +0100
committerGravatar NebelNidas2023-11-28 09:38:33 +0100
commit5df82c380955b452e5096ab9a4f1e66afc9bd18a (patch)
treee3a5a6d2006787f2668e47bca34fb46beb40250c
parentFix checkstyle (diff)
parentUpdate deps (#535) (diff)
downloadenigma-5df82c380955b452e5096ab9a4f1e66afc9bd18a.tar.gz
enigma-5df82c380955b452e5096ab9a4f1e66afc9bd18a.tar.xz
enigma-5df82c380955b452e5096ab9a4f1e66afc9bd18a.zip
Merge branch 'upstream' into mapping-io
-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
10 files changed, 62 insertions, 44 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 8cbe0cd6..b89f1b59 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 implementation 'net.fabricmc:mapping-io:0.5.0' 20 implementation 'net.fabricmc:mapping-io:0.5.0'
23 21
24 compileOnly 'org.jetbrains:annotations:24.0.1' 22 compileOnly 'org.jetbrains:annotations:24.0.1'
@@ -32,13 +30,10 @@ subprojects {
32 30
33 version = version + (System.getenv("GITHUB_ACTIONS") ? "" : "+local") 31 version = version + (System.getenv("GITHUB_ACTIONS") ? "" : "+local")
34 32
35 task sourcesJar(type: Jar, dependsOn: classes) {
36 classifier = 'sources'
37 from sourceSets.main.allSource
38 }
39
40 java { 33 java {
41 withSourcesJar() 34 withSourcesJar()
35 sourceCompatibility = JavaVersion.VERSION_17
36 targetCompatibility = JavaVersion.VERSION_17
42 } 37 }
43 38
44 tasks.withType(JavaCompile).configureEach { 39 tasks.withType(JavaCompile).configureEach {
@@ -49,7 +44,7 @@ subprojects {
49 44
50 checkstyle { 45 checkstyle {
51 configFile = rootProject.file('checkstyle.xml') 46 configFile = rootProject.file('checkstyle.xml')
52 toolVersion = '10.3.3' 47 toolVersion = '10.12.4'
53 } 48 }
54 49
55 publishing { 50 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" \