Skip to content

Commit

Permalink
Merge branch 'upstream' into mapping-io
Browse files Browse the repository at this point in the history
  • Loading branch information
NebelNidas committed Nov 28, 2023
2 parents 1d89bed + c675acf commit 5df82c3
Show file tree
Hide file tree
Showing 10 changed files with 62 additions and 44 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ jobs:
build:
strategy:
matrix:
java: [ 17-jdk, 19-jdk ]
java: [ 17-ubuntu, 21-ubuntu ]
runs-on: ubuntu-22.04
container:
image: eclipse-temurin:${{ matrix.java }}
image: mcr.microsoft.com/openjdk/jdk:${{ matrix.java }}
options: --user root
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- run: ./gradlew build --stacktrace --warning-mode fail
- uses: Juuxel/publish-checkstyle-report@v1
if: ${{ failure() }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ jobs:
build:
runs-on: ubuntu-22.04
container:
image: eclipse-temurin:19-jdk
image: mcr.microsoft.com/openjdk/jdk:21-ubuntu
options: --user root
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- run: ./gradlew checkVersion build publish --stacktrace
env:
MAVEN_URL: ${{ secrets.MAVEN_URL }}
Expand Down
17 changes: 6 additions & 11 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,24 +1,22 @@
plugins {
id 'maven-publish'
id 'com.github.johnrengelman.shadow' version '8.1.1' apply false
}

subprojects {
apply plugin: 'java'
apply plugin: 'maven-publish'
apply plugin: 'checkstyle'

sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17

repositories {
mavenLocal()
mavenCentral()
maven { url 'https://maven.fabricmc.net/' }
}

dependencies {
implementation 'com.google.guava:guava:30.1.1-jre'
implementation 'com.google.code.gson:gson:2.8.7'
implementation 'com.google.guava:guava:32.1.2-jre'
implementation 'com.google.code.gson:gson:2.10.1'
implementation 'net.fabricmc:mapping-io:0.5.0'

compileOnly 'org.jetbrains:annotations:24.0.1'
Expand All @@ -32,13 +30,10 @@ subprojects {

version = version + (System.getenv("GITHUB_ACTIONS") ? "" : "+local")

task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}

java {
withSourcesJar()
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

tasks.withType(JavaCompile).configureEach {
Expand All @@ -49,7 +44,7 @@ subprojects {

checkstyle {
configFile = rootProject.file('checkstyle.xml')
toolVersion = '10.3.3'
toolVersion = '10.12.4'
}

publishing {
Expand Down
8 changes: 5 additions & 3 deletions enigma-cli/build.gradle
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
plugins {
id 'application'
id 'com.github.johnrengelman.shadow' version '7.0.0'
id 'com.github.johnrengelman.shadow'
}

dependencies {
implementation project(':enigma')
}

mainClassName = 'cuchaz.enigma.command.Main'
application {
mainClass = 'cuchaz.enigma.command.Main'
}

jar.manifest.attributes 'Main-Class': mainClassName
jar.manifest.attributes 'Main-Class': application.mainClass.get()

publishing {
publications {
Expand Down
6 changes: 4 additions & 2 deletions enigma-server/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ dependencies {
implementation 'net.sf.jopt-simple:jopt-simple:6.0-alpha-3'
}

mainClassName = 'cuchaz.enigma.network.DedicatedEnigmaServer'
application {
mainClass = 'cuchaz.enigma.network.DedicatedEnigmaServer'
}

jar.manifest.attributes 'Main-Class': mainClassName
jar.manifest.attributes 'Main-Class': application.mainClass.get()
23 changes: 18 additions & 5 deletions enigma-swing/build.gradle
Original file line number Diff line number Diff line change
@@ -1,23 +1,36 @@
plugins {
id 'application'
id 'com.github.johnrengelman.shadow' version '7.0.0'
id 'com.github.johnrengelman.shadow'
}

def flatLafNatives = [
"windows-arm64@dll",
"windows-x86@dll",
"windows-x86_64@dll",
"linux-x86_64@so",
]

dependencies {
implementation project(':enigma')
implementation project(':enigma-server')

implementation 'net.sf.jopt-simple:jopt-simple:6.0-alpha-3'
implementation 'com.formdev:flatlaf:2.6'
implementation 'com.formdev:flatlaf-extras:2.6' // for SVG icons
implementation 'com.formdev:flatlaf:3.2.5'
implementation 'com.formdev:flatlaf-extras:3.2.5' // for SVG icons
implementation 'de.sciss:syntaxpane:1.2.1'
implementation 'com.github.lukeu:swing-dpi:0.10'
implementation 'org.drjekyll:fontchooser:2.5.2'

flatLafNatives.forEach {
implementation 'com.formdev:flatlaf:3.2.5:' + it
}
}

mainClassName = 'cuchaz.enigma.gui.Main'
application {
mainClass = 'cuchaz.enigma.gui.Main'
}

jar.manifest.attributes 'Main-Class': mainClassName
jar.manifest.attributes 'Main-Class': application.mainClass.get()

publishing {
publications {
Expand Down
10 changes: 5 additions & 5 deletions enigma/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ configurations {
}

dependencies {
implementation 'org.ow2.asm:asm:9.4'
implementation 'org.ow2.asm:asm-commons:9.4'
implementation 'org.ow2.asm:asm-tree:9.4'
implementation 'org.ow2.asm:asm-util:9.4'
implementation 'org.ow2.asm:asm:9.6'
implementation 'org.ow2.asm:asm-commons:9.6'
implementation 'org.ow2.asm:asm-tree:9.6'
implementation 'org.ow2.asm:asm-util:9.6'

implementation 'org.bitbucket.mstrobel:procyon-compilertools:0.6.0'
implementation 'net.fabricmc:cfr:0.2.1'

proGuard 'com.guardsquare:proguard-base:7.3.0'
proGuard 'com.guardsquare:proguard-base:7.4.0-beta02'

testImplementation 'com.google.jimfs:jimfs:1.2'
}
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 2 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
29 changes: 17 additions & 12 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,8 @@ done
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down Expand Up @@ -133,26 +131,29 @@ location of your Java installation."
fi
else
JAVACMD=java
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
if ! command -v java >/dev/null 2>&1
then
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
fi

# Increase the maximum file descriptors if we can.
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC2039,SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC2039,SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
Expand Down Expand Up @@ -197,11 +198,15 @@ if "$cygwin" || "$msys" ; then
done
fi

# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
# double quotes to make sure that they get re-expanded; and
# * put everything else in single quotes, so that it's not re-expanded.

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Collect all arguments for the java command:
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# and any embedded shellness will be escaped.
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
# treated as '${Hostname}' itself on the command line.

set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
Expand Down

0 comments on commit 5df82c3

Please sign in to comment.