Skip to content

Commit ec18704

Browse files
committed
Update gradle and cloud upstream
1 parent a9ab1f3 commit ec18704

File tree

7 files changed

+52
-32
lines changed

7 files changed

+52
-32
lines changed

cloud

Submodule cloud updated 25 files

gradle/wrapper/gradle-wrapper.jar

3.81 KB
Binary file not shown.
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip
4+
networkTimeout=10000
5+
validateDistributionUrl=true
46
zipStoreBase=GRADLE_USER_HOME
57
zipStorePath=wrapper/dists

gradlew

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
# Darwin, MinGW, and NonStop.
5656
#
5757
# (3) This script is generated from the Groovy template
58-
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
58+
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
5959
# within the Gradle project.
6060
#
6161
# You can find Gradle at https://github.com/gradle/gradle/.
@@ -80,13 +80,11 @@ do
8080
esac
8181
done
8282

83-
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
84-
85-
APP_NAME="Gradle"
83+
# This is normally unused
84+
# shellcheck disable=SC2034
8685
APP_BASE_NAME=${0##*/}
87-
88-
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
89-
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
86+
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
87+
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
9088

9189
# Use the maximum available, or set MAX_FD != -1 to use that value.
9290
MAX_FD=maximum
@@ -133,22 +131,29 @@ location of your Java installation."
133131
fi
134132
else
135133
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.
137137
138138
Please set the JAVA_HOME variable in your environment to match the
139139
location of your Java installation."
140+
fi
140141
fi
141142

142143
# Increase the maximum file descriptors if we can.
143144
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
144145
case $MAX_FD in #(
145146
max*)
147+
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
148+
# shellcheck disable=SC3045
146149
MAX_FD=$( ulimit -H -n ) ||
147150
warn "Could not query maximum file descriptor limit"
148151
esac
149152
case $MAX_FD in #(
150153
'' | soft) :;; #(
151154
*)
155+
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
156+
# shellcheck disable=SC3045
152157
ulimit -n "$MAX_FD" ||
153158
warn "Could not set maximum file descriptor limit to $MAX_FD"
154159
esac
@@ -193,6 +198,10 @@ if "$cygwin" || "$msys" ; then
193198
done
194199
fi
195200

201+
202+
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
203+
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
204+
196205
# Collect all arguments for the java command;
197206
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
198207
# shell script including quotes and variable substitutions, so put them in
@@ -205,6 +214,12 @@ set -- \
205214
org.gradle.wrapper.GradleWrapperMain \
206215
"$@"
207216

217+
# Stop when "xargs" is not available.
218+
if ! command -v xargs >/dev/null 2>&1
219+
then
220+
die "xargs is not available"
221+
fi
222+
208223
# Use "xargs" to parse quoted args.
209224
#
210225
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.

gradlew.bat

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
@rem limitations under the License.
1515
@rem
1616

17-
@if "%DEBUG%" == "" @echo off
17+
@if "%DEBUG%"=="" @echo off
1818
@rem ##########################################################################
1919
@rem
2020
@rem Gradle startup script for Windows
@@ -25,7 +25,8 @@
2525
if "%OS%"=="Windows_NT" setlocal
2626

2727
set DIRNAME=%~dp0
28-
if "%DIRNAME%" == "" set DIRNAME=.
28+
if "%DIRNAME%"=="" set DIRNAME=.
29+
@rem This is normally unused
2930
set APP_BASE_NAME=%~n0
3031
set APP_HOME=%DIRNAME%
3132

@@ -40,7 +41,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome
4041

4142
set JAVA_EXE=java.exe
4243
%JAVA_EXE% -version >NUL 2>&1
43-
if "%ERRORLEVEL%" == "0" goto execute
44+
if %ERRORLEVEL% equ 0 goto execute
4445

4546
echo.
4647
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
@@ -75,13 +76,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
7576

7677
:end
7778
@rem End local scope for the variables with windows NT shell
78-
if "%ERRORLEVEL%"=="0" goto mainEnd
79+
if %ERRORLEVEL% equ 0 goto mainEnd
7980

8081
:fail
8182
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
8283
rem the _cmd.exe /c_ return code!
83-
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
84-
exit /b 1
84+
set EXIT_CODE=%ERRORLEVEL%
85+
if %EXIT_CODE% equ 0 set EXIT_CODE=1
86+
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
87+
exit /b %EXIT_CODE%
8588

8689
:mainEnd
8790
if "%OS%"=="Windows_NT" endlocal

patches/0001-improve-caption-replacement-system.patch

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Subject: [PATCH] improve caption replacement system
55

66

77
diff --git a/cloud-core/src/main/java/cloud/commandframework/CommandTree.java b/cloud-core/src/main/java/cloud/commandframework/CommandTree.java
8-
index 615c6d3c5c0bb959c43cfd6a87b1db5a778d7aae..c054e55f276840413593b6c9df5522fe9932dc45 100644
8+
index 8caa710b43ee8f4233d0afd37580e7077bb302f8..239cff7294d53d7abd713c6d6b3d3a2a0ca2fddd 100644
99
--- a/cloud-core/src/main/java/cloud/commandframework/CommandTree.java
1010
+++ b/cloud-core/src/main/java/cloud/commandframework/CommandTree.java
1111
@@ -142,7 +142,11 @@ public final class CommandTree<C> {
@@ -69,7 +69,7 @@ index 615c6d3c5c0bb959c43cfd6a87b1db5a778d7aae..c054e55f276840413593b6c9df5522fe
6969
));
7070
}
7171
} else {
72-
@@ -255,7 +271,11 @@ public final class CommandTree<C> {
72+
@@ -263,7 +279,11 @@ public final class CommandTree<C> {
7373
return Pair.of(null, new NoSuchCommandException(
7474
commandContext.getSender(),
7575
this.getChain(root).stream().map(Node::getValue).collect(Collectors.toList()),
@@ -82,7 +82,7 @@ index 615c6d3c5c0bb959c43cfd6a87b1db5a778d7aae..c054e55f276840413593b6c9df5522fe
8282
));
8383
}
8484
/* If we couldn't match a child, check if there's a command attached and execute it */
85-
@@ -272,7 +292,10 @@ public final class CommandTree<C> {
85+
@@ -280,7 +300,10 @@ public final class CommandTree<C> {
8686
.stream()
8787
.filter(node -> node.getValue() != null)
8888
.map(Node::getValue)
@@ -94,7 +94,7 @@ index 615c6d3c5c0bb959c43cfd6a87b1db5a778d7aae..c054e55f276840413593b6c9df5522fe
9494
));
9595
}
9696
return Pair.of(root.getValue().getOwningCommand(), null);
97-
@@ -285,7 +308,10 @@ public final class CommandTree<C> {
97+
@@ -293,7 +316,10 @@ public final class CommandTree<C> {
9898
.stream()
9999
.filter(node -> node.getValue() != null)
100100
.map(Node::getValue)
@@ -106,7 +106,7 @@ index 615c6d3c5c0bb959c43cfd6a87b1db5a778d7aae..c054e55f276840413593b6c9df5522fe
106106
));
107107
}
108108
}
109-
@@ -336,7 +362,10 @@ public final class CommandTree<C> {
109+
@@ -344,7 +370,10 @@ public final class CommandTree<C> {
110110
.stream()
111111
.filter(node -> node.getValue() != null)
112112
.map(Node::getValue)
@@ -118,7 +118,7 @@ index 615c6d3c5c0bb959c43cfd6a87b1db5a778d7aae..c054e55f276840413593b6c9df5522fe
118118
));
119119
}
120120
if (child.getValue() != null) {
121-
@@ -373,7 +402,10 @@ public final class CommandTree<C> {
121+
@@ -381,7 +410,10 @@ public final class CommandTree<C> {
122122
.stream()
123123
.filter(node -> node.getValue() != null)
124124
.map(Node::getValue)
@@ -130,7 +130,7 @@ index 615c6d3c5c0bb959c43cfd6a87b1db5a778d7aae..c054e55f276840413593b6c9df5522fe
130130
));
131131
}
132132
return Pair.of(command, null);
133-
@@ -389,7 +421,10 @@ public final class CommandTree<C> {
133+
@@ -397,7 +429,10 @@ public final class CommandTree<C> {
134134
.stream()
135135
.filter(node -> node.getValue() != null)
136136
.map(Node::getValue)
@@ -142,7 +142,7 @@ index 615c6d3c5c0bb959c43cfd6a87b1db5a778d7aae..c054e55f276840413593b6c9df5522fe
142142
));
143143
} else {
144144
/* The child is not a leaf, but may have an intermediary executor, attempt to use it */
145-
@@ -406,7 +441,10 @@ public final class CommandTree<C> {
145+
@@ -414,7 +449,10 @@ public final class CommandTree<C> {
146146
.stream()
147147
.filter(node -> node.getValue() != null)
148148
.map(Node::getValue)
@@ -154,7 +154,7 @@ index 615c6d3c5c0bb959c43cfd6a87b1db5a778d7aae..c054e55f276840413593b6c9df5522fe
154154
));
155155
}
156156
return Pair.of(command, null);
157-
@@ -419,7 +457,10 @@ public final class CommandTree<C> {
157+
@@ -427,7 +465,10 @@ public final class CommandTree<C> {
158158
.stream()
159159
.filter(node -> node.getValue() != null)
160160
.map(Node::getValue)
@@ -166,7 +166,7 @@ index 615c6d3c5c0bb959c43cfd6a87b1db5a778d7aae..c054e55f276840413593b6c9df5522fe
166166
));
167167
}
168168
}
169-
@@ -457,7 +498,10 @@ public final class CommandTree<C> {
169+
@@ -474,7 +515,10 @@ public final class CommandTree<C> {
170170
.stream()
171171
.filter(node -> node.getValue() != null)
172172
.map(Node::getValue)
@@ -397,18 +397,18 @@ index 25a91167c153063afb41ea28c078be9f5f86a8eb..641196d69ddcb510939497c57a0c65a1
397397
}
398398

399399
diff --git a/cloud-core/src/main/java/cloud/commandframework/context/CommandContext.java b/cloud-core/src/main/java/cloud/commandframework/context/CommandContext.java
400-
index 9109b472e0234b479c1d7fe1d7268d5e040ad08c..63c9f03b6ccf477b3dba519a6dd7a11af80652e3 100644
400+
index ef714cd88030a1af5bb3d1f1096c3630b617afb7..3b8b39555a4915839bee1476b6dd056f05a31065 100644
401401
--- a/cloud-core/src/main/java/cloud/commandframework/context/CommandContext.java
402402
+++ b/cloud-core/src/main/java/cloud/commandframework/context/CommandContext.java
403-
@@ -53,6 +53,7 @@ import org.checkerframework.checker.nullness.qual.Nullable;
403+
@@ -57,6 +57,7 @@ import org.checkerframework.checker.nullness.qual.Nullable;
404404
* @param <C> Command sender type
405405
*/
406406
@API(status = API.Status.STABLE)
407407
+@SuppressWarnings("unused") // cloudnet
408408
public class CommandContext<C> {
409409

410410
private final CaptionVariableReplacementHandler captionVariableReplacementHandler;
411-
@@ -145,6 +146,13 @@ public class CommandContext<C> {
411+
@@ -149,6 +150,13 @@ public class CommandContext<C> {
412412
final @NonNull Caption caption,
413413
final @NonNull CaptionVariable... variables
414414
) {
@@ -422,7 +422,7 @@ index 9109b472e0234b479c1d7fe1d7268d5e040ad08c..63c9f03b6ccf477b3dba519a6dd7a11a
422422
return this.captionVariableReplacementHandler.replaceVariables(
423423
this.captionRegistry.getCaption(caption, this.commandSender),
424424
variables
425-
@@ -673,6 +681,11 @@ public class CommandContext<C> {
425+
@@ -760,6 +768,11 @@ public class CommandContext<C> {
426426
return this.commandManager.parameterInjectorRegistry().getInjectable(clazz, this, AnnotationAccessor.empty());
427427
}
428428

patches/0002-disable-static-argument-suggestion-validation.patch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ Subject: [PATCH] disable static argument suggestion validation
55

66

77
diff --git a/cloud-core/src/main/java/cloud/commandframework/CommandTree.java b/cloud-core/src/main/java/cloud/commandframework/CommandTree.java
8-
index c054e55f276840413593b6c9df5522fe9932dc45..e971e6bb4b3065d7276101cffbeda17267f1f564 100644
8+
index 239cff7294d53d7abd713c6d6b3d3a2a0ca2fddd..2e341b8b4b271671c1c85dfb842afc053adcf8c1 100644
99
--- a/cloud-core/src/main/java/cloud/commandframework/CommandTree.java
1010
+++ b/cloud-core/src/main/java/cloud/commandframework/CommandTree.java
11-
@@ -602,7 +602,7 @@ public final class CommandTree<C> {
11+
@@ -619,7 +619,7 @@ public final class CommandTree<C> {
1212
.apply(commandContext, literalValue);
1313
for (String suggestion : suggestionsToAdd) {
1414
if (suggestion.equals(literalValue) || !suggestion.startsWith(literalValue)) {

0 commit comments

Comments
 (0)