Skip to content

Commit c96d3b0

Browse files
build: generate gradle wrapper
1 parent 78907f2 commit c96d3b0

File tree

3 files changed

+37
-23
lines changed

3 files changed

+37
-23
lines changed
Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,6 @@
1-
#
2-
# Copyright (c) 2023. Smart Operating Block
3-
#
4-
# Use of this source code is governed by an MIT-style
5-
# license that can be found in the LICENSE file or at
6-
# https://opensource.org/licenses/MIT.
7-
#
8-
91
distributionBase=GRADLE_USER_HOME
102
distributionPath=wrapper/dists
11-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip
4+
networkTimeout=10000
125
zipStoreBase=GRADLE_USER_HOME
136
zipStorePath=wrapper/dists

gradlew

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,19 @@
11
#!/bin/sh
22

33
#
4-
# Copyright (c) 2023. Smart Operating Block
4+
# Copyright © 2015-2021 the original authors.
55
#
6-
# Use of this source code is governed by an MIT-style
7-
# license that can be found in the LICENSE file or at
8-
# https://opensource.org/licenses/MIT.
6+
# Licensed under the Apache License, Version 2.0 (the "License");
7+
# you may not use this file except in compliance with the License.
8+
# You may obtain a copy of the License at
9+
#
10+
# https://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing, software
13+
# distributed under the License is distributed on an "AS IS" BASIS,
14+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
# See the License for the specific language governing permissions and
16+
# limitations under the License.
917
#
1018

1119
##############################################################################
@@ -47,7 +55,7 @@
4755
# Darwin, MinGW, and NonStop.
4856
#
4957
# (3) This script is generated from the Groovy template
50-
# 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
5159
# within the Gradle project.
5260
#
5361
# You can find Gradle at https://github.com/gradle/gradle/.
@@ -72,10 +80,10 @@ do
7280
esac
7381
done
7482

75-
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
76-
77-
APP_NAME="Gradle"
83+
# This is normally unused
84+
# shellcheck disable=SC2034
7885
APP_BASE_NAME=${0##*/}
86+
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
7987

8088
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
8189
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
@@ -135,12 +143,16 @@ fi
135143
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
136144
case $MAX_FD in #(
137145
max*)
146+
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
147+
# shellcheck disable=SC3045
138148
MAX_FD=$( ulimit -H -n ) ||
139149
warn "Could not query maximum file descriptor limit"
140150
esac
141151
case $MAX_FD in #(
142152
'' | soft) :;; #(
143153
*)
154+
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
155+
# shellcheck disable=SC3045
144156
ulimit -n "$MAX_FD" ||
145157
warn "Could not set maximum file descriptor limit to $MAX_FD"
146158
esac
@@ -197,6 +209,12 @@ set -- \
197209
org.gradle.wrapper.GradleWrapperMain \
198210
"$@"
199211

212+
# Stop when "xargs" is not available.
213+
if ! command -v xargs >/dev/null 2>&1
214+
then
215+
die "xargs is not available"
216+
fi
217+
200218
# Use "xargs" to parse quoted args.
201219
#
202220
# 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

0 commit comments

Comments
 (0)