Skip to content

Commit 9794972

Browse files
xyang16frankfliu
authored andcommitted
Upgrade DJL version to 0.18.0
1 parent fec5e19 commit 9794972

File tree

4 files changed

+66
-50
lines changed

4 files changed

+66
-50
lines changed

gradlew

+49-31
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,5 @@
11
#!/usr/bin/env sh
22

3-
#
4-
# Copyright 2015 the original author or 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-
193
##############################################################################
204
##
215
## Gradle start up script for UN*X
@@ -44,7 +28,7 @@ APP_NAME="Gradle"
4428
APP_BASE_NAME=`basename "$0"`
4529

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

4933
# Use the maximum available, or set MAX_FD != -1 to use that value.
5034
MAX_FD="maximum"
@@ -120,13 +104,42 @@ if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
120104
fi
121105
fi
122106

107+
##########################################################################################
108+
# Extension to allow automatically downloading the gradle-wrapper.jar
109+
# This allows using the maven wrapper in projects that prohibit checking in binary data.
110+
##########################################################################################
111+
WRAPPER_JAR_PATH="$APP_HOME/gradle/wrapper/gradle-wrapper.jar"
112+
if [ ! -r "${WRAPPER_JAR_PATH}" ]; then
113+
jarUrl="https://raw.githubusercontent.com/gradle/gradle/master/gradle/wrapper/gradle-wrapper.jar"
114+
if command -v wget > /dev/null; then
115+
wget -q "${jarUrl}" -O "${WRAPPER_JAR_PATH}"
116+
elif command -v curl > /dev/null; then
117+
curl -s -o "${WRAPPER_JAR_PATH}" "$jarUrl"
118+
else
119+
javaClass="$APP_HOME/gradle/wrapper/GradleWrapperDownloader.java"
120+
if [ -e "$javaClass" ]; then
121+
if [ ! -e "$APP_HOME/gradle/wrapper/GradleWrapperDownloader.class" ]; then
122+
# Compiling the Java class
123+
("${JAVACMD}c" "$javaClass")
124+
fi
125+
if [ -e "$APP_HOME/gradle/wrapper/GradleWrapperDownloader.class" ]; then
126+
("$JAVACMD" -cp gradle/wrapper GradleWrapperDownloader "$APP_HOME")
127+
fi
128+
fi
129+
fi
130+
fi
131+
##########################################################################################
132+
# End of extension
133+
##########################################################################################
134+
135+
123136
# For Darwin, add options to specify how the application appears in the dock
124137
if $darwin; then
125138
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
126139
fi
127140

128-
# For Cygwin or MSYS, switch paths to Windows format before running java
129-
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
141+
# For Cygwin, switch paths to Windows format before running java
142+
if $cygwin ; then
130143
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
131144
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
132145
JAVACMD=`cygpath --unix "$JAVACMD"`
@@ -154,19 +167,19 @@ if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
154167
else
155168
eval `echo args$i`="\"$arg\""
156169
fi
157-
i=`expr $i + 1`
170+
i=$((i+1))
158171
done
159172
case $i in
160-
0) set -- ;;
161-
1) set -- "$args0" ;;
162-
2) set -- "$args0" "$args1" ;;
163-
3) set -- "$args0" "$args1" "$args2" ;;
164-
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
165-
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
166-
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
167-
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
168-
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
169-
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
173+
(0) set -- ;;
174+
(1) set -- "$args0" ;;
175+
(2) set -- "$args0" "$args1" ;;
176+
(3) set -- "$args0" "$args1" "$args2" ;;
177+
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
178+
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
179+
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
180+
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
181+
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
182+
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
170183
esac
171184
fi
172185

@@ -175,9 +188,14 @@ save () {
175188
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
176189
echo " "
177190
}
178-
APP_ARGS=`save "$@"`
191+
APP_ARGS=$(save "$@")
179192

180193
# Collect all arguments for the java command, following the shell quoting and substitution rules
181194
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
182195

196+
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
197+
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
198+
cd "$(dirname "$0")"
199+
fi
200+
183201
exec "$JAVACMD" "$@"

gradlew.bat

+15-17
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,3 @@
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-
171
@if "%DEBUG%" == "" @echo off
182
@rem ##########################################################################
193
@rem
@@ -30,7 +14,7 @@ set APP_BASE_NAME=%~n0
3014
set APP_HOME=%DIRNAME%
3115

3216
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
33-
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
17+
set DEFAULT_JVM_OPTS=
3418

3519
@rem Find java.exe
3620
if defined JAVA_HOME goto findJavaFromJavaHome
@@ -80,6 +64,20 @@ set CMD_LINE_ARGS=%*
8064
@rem Setup the command line
8165

8266
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
67+
set DOWNLOAD_URL="https://raw.githubusercontent.com/gradle/gradle/master/gradle/wrapper/gradle-wrapper.jar"
68+
69+
@rem Extension to allow automatically downloading the gradle-wrapper.jar
70+
@rem This allows using the gradle wrapper in projects that prohibit checking in binary data.
71+
if exist %CLASSPATH% (
72+
echo Found %CLASSPATH%
73+
) else (
74+
echo Couldn't find %CLASSPATH%, downloading it ...
75+
echo Downloading from: %DOWNLOAD_URL%
76+
powershell -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; (New-Object Net.WebClient).DownloadFile('%DOWNLOAD_URL%', '%CLASSPATH%')"
77+
78+
echo Finished downloading %CLASSPATH%
79+
)
80+
@rem End of extension
8381

8482
@rem Execute Gradle
8583
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%

jsr381/build.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ version = "0.8.0" + (isRelease ? "" : "-SNAPSHOT")
1414

1515
dependencies {
1616
api 'javax.visrec:visrec-api:1.0.5'
17-
api platform("ai.djl:bom:0.17.0")
17+
api platform("ai.djl:bom:0.18.0")
1818
api "ai.djl:api"
1919
api "ai.djl:basicdataset"
2020
api "ai.djl:model-zoo"
2121
api "ai.djl.mxnet:mxnet-model-zoo"
2222
api 'ai.djl.mxnet:mxnet-engine'
2323

2424
testImplementation 'org.slf4j:slf4j-simple:1.7.36'
25-
testImplementation('org.testng:testng:7.6.0') {
25+
testImplementation('org.testng:testng:7.6.1') {
2626
exclude group: "junit", module: "junit"
2727
}
2828
}
428 KB
Binary file not shown.

0 commit comments

Comments
 (0)