Fixed gradle bug

This commit is contained in:
Auxilor
2022-09-20 13:36:15 +01:00
parent 59daf0694a
commit 2ba1178210
3 changed files with 187 additions and 236 deletions
+1 -1
View File
@@ -2,7 +2,7 @@ group 'com.willfp'
version rootProject.version version rootProject.version
dependencies { dependencies {
compileOnly 'org.spigotmc:spigot-api:1.16.5-R0.1-SNAPSHOT' compileOnly 'org.spigotmc:spigot-api:1.17.1-R0.1-SNAPSHOT'
} }
publishing { publishing {
+1 -1
View File
@@ -1,4 +1,4 @@
#libreforge-updater #libreforge-updater
#Tue Sep 20 10:57:50 BST 2022 #Tue Sep 20 13:35:58 BST 2022
version=4.65.1 version=4.65.1
plugin-name=Boosters plugin-name=Boosters
Vendored
+185 -234
View File
@@ -1,234 +1,185 @@
#!/bin/sh #!/usr/bin/env sh
# #
# Copyright © 2015-2021 the original authors. # Copyright 2015 the original author or authors.
# #
# Licensed under the Apache License, Version 2.0 (the "License"); # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License. # you may not use this file except in compliance with the License.
# You may obtain a copy of the License at # You may obtain a copy of the License at
# #
# https://www.apache.org/licenses/LICENSE-2.0 # https://www.apache.org/licenses/LICENSE-2.0
# #
# Unless required by applicable law or agreed to in writing, software # Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, # distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
# #
############################################################################## ##############################################################################
# ##
# Gradle start up script for POSIX generated by Gradle. ## Gradle start up script for UN*X
# ##
# Important for running: ##############################################################################
#
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is # Attempt to set APP_HOME
# noncompliant, but you have some other compliant shell such as ksh or # Resolve links: $0 may be a link
# bash, then to run this script, type that shell name before the whole PRG="$0"
# command line, like: # Need this for relative symlinks.
# while [ -h "$PRG" ] ; do
# ksh Gradle ls=`ls -ld "$PRG"`
# link=`expr "$ls" : '.*-> \(.*\)$'`
# Busybox and similar reduced shells will NOT work, because this script if expr "$link" : '/.*' > /dev/null; then
# requires all of these POSIX shell features: PRG="$link"
# * functions; else
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», PRG=`dirname "$PRG"`"/$link"
# «${var#prefix}», «${var%suffix}», and «$( cmd )»; fi
# * compound commands having a testable exit status, especially «case»; done
# * various built-in commands including «command», «set», and «ulimit». SAVED="`pwd`"
# cd "`dirname \"$PRG\"`/" >/dev/null
# Important for patching: APP_HOME="`pwd -P`"
# cd "$SAVED" >/dev/null
# (2) This script targets any POSIX shell, so it avoids extensions provided
# by Bash, Ksh, etc; in particular arrays are avoided. APP_NAME="Gradle"
# APP_BASE_NAME=`basename "$0"`
# The "traditional" practice of packing multiple parameters into a
# space-separated string is a well documented source of bugs and security # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
# problems, so this is (mostly) avoided, by progressively accumulating DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# options in "$@", and eventually passing that to Java.
# # Use the maximum available, or set MAX_FD != -1 to use that value.
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, MAX_FD="maximum"
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
# see the in-line comments for details. warn () {
# echo "$*"
# There are tweaks for specific operating systems such as AIX, CygWin, }
# Darwin, MinGW, and NonStop.
# die () {
# (3) This script is generated from the Groovy template echo
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt echo "$*"
# within the Gradle project. echo
# exit 1
# You can find Gradle at https://github.com/gradle/gradle/. }
#
############################################################################## # OS specific support (must be 'true' or 'false').
cygwin=false
# Attempt to set APP_HOME msys=false
darwin=false
# Resolve links: $0 may be a link nonstop=false
app_path=$0 case "`uname`" in
CYGWIN* )
# Need this for daisy-chained symlinks. cygwin=true
while ;;
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path Darwin* )
[ -h "$app_path" ] darwin=true
do ;;
ls=$( ls -ld "$app_path" ) MINGW* )
link=${ls#*' -> '} msys=true
case $link in #( ;;
/*) app_path=$link ;; #( NONSTOP* )
*) app_path=$APP_HOME$link ;; nonstop=true
esac ;;
done esac
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
APP_NAME="Gradle"
APP_BASE_NAME=${0##*/} # Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' # IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
# Use the maximum available, or set MAX_FD != -1 to use that value. else
MAX_FD=maximum JAVACMD="$JAVA_HOME/bin/java"
fi
warn () { if [ ! -x "$JAVACMD" ] ; then
echo "$*" die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
} >&2
Please set the JAVA_HOME variable in your environment to match the
die () { location of your Java installation."
echo fi
echo "$*" else
echo JAVACMD="java"
exit 1 which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
} >&2
Please set the JAVA_HOME variable in your environment to match the
# OS specific support (must be 'true' or 'false'). location of your Java installation."
cygwin=false fi
msys=false
darwin=false # Increase the maximum file descriptors if we can.
nonstop=false if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
case "$( uname )" in #( MAX_FD_LIMIT=`ulimit -H -n`
CYGWIN* ) cygwin=true ;; #( if [ $? -eq 0 ] ; then
Darwin* ) darwin=true ;; #( if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
MSYS* | MINGW* ) msys=true ;; #( MAX_FD="$MAX_FD_LIMIT"
NONSTOP* ) nonstop=true ;; fi
esac ulimit -n $MAX_FD
if [ $? -ne 0 ] ; then
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
else
# Determine the Java command to use to start the JVM. warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
if [ -n "$JAVA_HOME" ] ; then fi
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then fi
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD=$JAVA_HOME/jre/sh/java # For Darwin, add options to specify how the application appears in the dock
else if $darwin; then
JAVACMD=$JAVA_HOME/bin/java GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME # For Cygwin or MSYS, switch paths to Windows format before running java
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
Please set the JAVA_HOME variable in your environment to match the APP_HOME=`cygpath --path --mixed "$APP_HOME"`
location of your Java installation." CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
fi
else JAVACMD=`cygpath --unix "$JAVACMD"`
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. # We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
Please set the JAVA_HOME variable in your environment to match the SEP=""
location of your Java installation." for dir in $ROOTDIRSRAW ; do
fi ROOTDIRS="$ROOTDIRS$SEP$dir"
SEP="|"
# Increase the maximum file descriptors if we can. done
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then OURCYGPATTERN="(^($ROOTDIRS))"
case $MAX_FD in #( # Add a user-defined pattern to the cygpath arguments
max*) if [ "$GRADLE_CYGPATTERN" != "" ] ; then
MAX_FD=$( ulimit -H -n ) || OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
warn "Could not query maximum file descriptor limit" fi
esac # Now convert the arguments - kludge to limit ourselves to /bin/sh
case $MAX_FD in #( i=0
'' | soft) :;; #( for arg in "$@" ; do
*) CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
ulimit -n "$MAX_FD" || CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
fi eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
else
# Collect all arguments for the java command, stacking in reverse order: eval `echo args$i`="\"$arg\""
# * args from the command line fi
# * the main class name i=`expr $i + 1`
# * -classpath done
# * -D...appname settings case $i in
# * --module-path (only if needed) 0) set -- ;;
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. 1) set -- "$args0" ;;
2) set -- "$args0" "$args1" ;;
# For Cygwin or MSYS, switch paths to Windows format before running java 3) set -- "$args0" "$args1" "$args2" ;;
if "$cygwin" || "$msys" ; then 4) set -- "$args0" "$args1" "$args2" "$args3" ;;
APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
JAVACMD=$( cygpath --unix "$JAVACMD" ) 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
# Now convert the arguments - kludge to limit ourselves to /bin/sh esac
for arg do fi
if
case $arg in #( # Escape application args
-*) false ;; # don't mess with options #( save () {
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
[ -e "$t" ] ;; #( echo " "
*) false ;; }
esac APP_ARGS=`save "$@"`
then
arg=$( cygpath --path --ignore --mixed "$arg" ) # Collect all arguments for the java command, following the shell quoting and substitution rules
fi eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
# Roll the args list around exactly as many times as the number of
# args, so each arg winds up back in the position where it started, but exec "$JAVACMD" "$@"
# possibly modified.
#
# NB: a `for` loop captures its iteration list before it begins, so
# changing the positional parameters here affects neither the number of
# iterations, nor the values presented in `arg`.
shift # remove old arg
set -- "$@" "$arg" # push replacement arg
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.
set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
-classpath "$CLASSPATH" \
org.gradle.wrapper.GradleWrapperMain \
"$@"
# Use "xargs" to parse quoted args.
#
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
#
# In Bash we could simply go:
#
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
# set -- "${ARGS[@]}" "$@"
#
# but POSIX shell has neither arrays nor command substitution, so instead we
# post-process each arg (as a line of input to sed) to backslash-escape any
# character that might be a shell metacharacter, then use eval to reverse
# that process (while maintaining the separation between arguments), and wrap
# the whole thing up as a single "set" statement.
#
# This will of course break if any of these variables contains a newline or
# an unmatched quote.
#
eval "set -- $(
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
xargs -n1 |
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
tr '\n' ' '
)" '"$@"'
exec "$JAVACMD" "$@"