Skip to content

Commit 529bee9

Browse files
Update Gradle configuration and add Gradle wrapper
1 parent e4a4c85 commit 529bee9

File tree

4 files changed

+306
-3
lines changed

4 files changed

+306
-3
lines changed

build.gradle

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ buildscript {
1010
maven { url 'https://jitpack.io' }
1111
}
1212
dependencies {
13-
classpath 'com.android.tools.build:gradle:8.6.1'
13+
classpath 'com.android.tools.build:gradle:7.4.2'
1414
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.20'
1515
}
1616
}
17-
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#Mon Dec 16 19:22:14 IST 2024
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
4-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
4+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip
55
zipStoreBase=GRADLE_USER_HOME
66
zipStorePath=wrapper/dists

gradlew

Lines changed: 212 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,212 @@
1+
#!/bin/sh
2+
3+
#
4+
# Copyright © 2015-2021 the original authors.
5+
#
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.
17+
#
18+
19+
##############################################################################
20+
#
21+
# Gradle start up script for POSIX generated by Gradle.
22+
#
23+
# Important for running:
24+
#
25+
# (1) You need a POSIX-compliant shell to run this script. If you're on
26+
# Windows, you can use Cygwin or WSL.
27+
#
28+
# (2) Ensure this file has LF line endings, not CRLF!
29+
#
30+
##############################################################################
31+
32+
# Attempt to set APP_HOME
33+
34+
# Resolve links: $0 may be a link
35+
app_path=$0
36+
37+
# Need this for daisy-chained symlinks.
38+
while
39+
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
40+
[ -h "$app_path" ]
41+
do
42+
ls=$( ls -ld "$app_path" )
43+
link=${ls#*' -> '}
44+
case $link in #(
45+
/*) app_path=$link ;; #(
46+
*) app_path=$APP_HOME$link ;;
47+
esac
48+
done
49+
50+
# This is normally unused
51+
# shellcheck disable=SC2034
52+
APP_BASE_NAME=${0##*/}
53+
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
54+
55+
# Use the maximum available, or set MAX_FD != -1 to use that value.
56+
MAX_FD=maximum
57+
58+
warn () {
59+
echo "$*"
60+
} >&2
61+
62+
die () {
63+
echo
64+
echo "$*"
65+
echo
66+
exit 1
67+
} >&2
68+
69+
# OS specific support (must be 'true' or 'false').
70+
cygwin=false
71+
msys=false
72+
darwin=false
73+
nonstop=false
74+
case "$( uname )" in #(
75+
CYGWIN* ) cygwin=true ;; #(
76+
Darwin* ) darwin=true ;; #(
77+
MSYS* | MINGW* ) msys=true ;; #(
78+
NONSTOP* ) nonstop=true ;;
79+
esac
80+
81+
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
82+
83+
84+
# Determine the Java command to use to start the JVM.
85+
if [ -n "$JAVA_HOME" ] ; then
86+
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
87+
# IBM's JDK on AIX uses strange locations for the executables
88+
JAVACMD=$JAVA_HOME/jre/sh/java
89+
else
90+
JAVACMD=$JAVA_HOME/bin/java
91+
fi
92+
if [ ! -x "$JAVACMD" ] ; then
93+
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
94+
95+
Please set the JAVA_HOME variable in your environment to match the
96+
location of your Java installation."
97+
fi
98+
else
99+
JAVACMD=java
100+
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
101+
102+
Please set the JAVA_HOME variable in your environment to match the
103+
location of your Java installation."
104+
fi
105+
106+
# Increase the maximum file descriptors if we can.
107+
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
108+
case $MAX_FD in #(
109+
max*)
110+
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
111+
# shellcheck disable=SC3045
112+
MAX_FD=$( ulimit -H -n ) ||
113+
warn "Could not query maximum file descriptor limit"
114+
esac
115+
case $MAX_FD in #(
116+
'' | soft) :;; #(
117+
*)
118+
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
119+
# shellcheck disable=SC3045
120+
ulimit -n "$MAX_FD" ||
121+
warn "Could not set maximum file descriptor limit to $MAX_FD"
122+
esac
123+
fi
124+
125+
# Collect all arguments for the java command, stacking in reverse order:
126+
# * args from the command line
127+
# * the main class name
128+
# * -classpath
129+
# * -D...appname settings
130+
# * --module-path (only if needed)
131+
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
132+
133+
# For Cygwin or MSYS, switch paths to Windows format before running java
134+
if "$cygwin" || "$msys" ; then
135+
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
136+
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
137+
138+
JAVACMD=$( cygpath --unix "$JAVACMD" )
139+
140+
# Now convert the arguments - kludge to limit ourselves to /bin/sh
141+
for arg do
142+
if
143+
case $arg in #(
144+
-*) false ;; # don't mess with options #(
145+
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
146+
[ -e "$t" ] ;; #(
147+
*) false ;;
148+
esac
149+
then
150+
arg=$( cygpath --path --ignore --mixed "$arg" )
151+
fi
152+
# Roll the args list around exactly as many times as the number of
153+
# args, so each arg winds up back in the position where it started, but
154+
# possibly modified.
155+
#
156+
# NB: a `for` loop captures its iteration list before it begins, so
157+
# changing the positional parameters here affects neither the number of
158+
# iterations, nor the values presented in `arg`.
159+
shift # remove old arg
160+
set -- "$@" "$arg" # push replacement arg
161+
done
162+
fi
163+
164+
165+
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
166+
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
167+
168+
# Collect all arguments for the java command;
169+
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
170+
# shell script including quotes and variable substitutions, so put them in
171+
# double quotes to make sure that they get re-expanded; and
172+
# * put everything else in single quotes, so that it's not re-expanded.
173+
174+
set -- \
175+
"-Dorg.gradle.appname=$APP_BASE_NAME" \
176+
-classpath "$CLASSPATH" \
177+
org.gradle.wrapper.GradleWrapperMain \
178+
"$@"
179+
180+
# Stop when "xargs" is not available.
181+
if ! command -v xargs >/dev/null 2>&1
182+
then
183+
die "xargs is not available"
184+
fi
185+
186+
# Use "xargs" to parse quoted args.
187+
#
188+
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
189+
#
190+
# In Bash we could simply go:
191+
#
192+
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
193+
# set -- "${ARGS[@]}" "$@"
194+
#
195+
# but POSIX shell has neither arrays nor command substitution, so instead we
196+
# post-process each arg (as a line of input to sed) to backslash-escape any
197+
# character that might be a shell metacharacter, then use eval to reverse
198+
# that process (while maintaining the separation between arguments), and wrap
199+
# the whole thing up as a single "set" statement.
200+
#
201+
# This will of course break if any of these variables contains a newline or
202+
# an unmatched quote.
203+
#
204+
205+
eval "set -- $(
206+
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
207+
xargs -n1 |
208+
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
209+
tr '\n' ' '
210+
)" '"$@"'
211+
212+
exec "$JAVACMD" "$@"

gradlew.bat

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
@rem
2+
@rem Copyright 2015 the original author or authors.
3+
@rem
4+
@rem Licensed under the Apache License, Version 2.0 (the "License");
5+
@rem you may not use this file except in compliance with the License.
6+
@rem You may obtain a copy of the License at
7+
@rem
8+
@rem https://www.apache.org/licenses/LICENSE-2.0
9+
@rem
10+
@rem Unless required by applicable law or agreed to in writing, software
11+
@rem distributed under the License is distributed on an "AS IS" BASIS,
12+
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
@rem See the License for the specific language governing permissions and
14+
@rem limitations under the License.
15+
@rem
16+
17+
@if "%DEBUG%"=="" @echo off
18+
@rem ##########################################################################
19+
@rem
20+
@rem Gradle startup script for Windows
21+
@rem
22+
@rem ##########################################################################
23+
24+
@rem Set local scope for the variables with windows NT shell
25+
if "%OS%"=="Windows_NT" setlocal
26+
27+
set DIRNAME=%~dp0
28+
if "%DIRNAME%"=="" set DIRNAME=.
29+
@rem This is normally unused
30+
set APP_BASE_NAME=%~n0
31+
set APP_HOME=%DIRNAME%
32+
33+
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
34+
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
35+
36+
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
37+
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
38+
39+
@rem Find java.exe
40+
if defined JAVA_HOME goto findJavaFromJavaHome
41+
42+
set JAVA_EXE=java.exe
43+
%JAVA_EXE% -version >NUL 2>&1
44+
if %ERRORLEVEL% equ 0 goto execute
45+
46+
echo.
47+
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
48+
echo.
49+
echo Please set the JAVA_HOME variable in your environment to match the
50+
echo location of your Java installation.
51+
52+
goto fail
53+
54+
:findJavaFromJavaHome
55+
set JAVA_HOME=%JAVA_HOME:"=%
56+
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
57+
58+
if exist "%JAVA_EXE%" goto execute
59+
60+
echo.
61+
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
62+
echo.
63+
echo Please set the JAVA_HOME variable in your environment to match the
64+
echo location of your Java installation.
65+
66+
goto fail
67+
68+
:execute
69+
@rem Setup the command line
70+
71+
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
72+
73+
74+
@rem Execute Gradle
75+
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
76+
77+
:end
78+
@rem End local scope for the variables with windows NT shell
79+
if %ERRORLEVEL% equ 0 goto mainEnd
80+
81+
:fail
82+
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83+
rem the _cmd.exe /c_ return code!
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%
88+
89+
:mainEnd
90+
if "%OS%"=="Windows_NT" endlocal
91+
92+
:omega

0 commit comments

Comments
 (0)