Skip to content

Commit a2d248e

Browse files
rebase
2 parents f6f3430 + a2ad834 commit a2d248e

File tree

5 files changed

+346
-1
lines changed

5 files changed

+346
-1
lines changed

.github/workflows/gradle.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Build and test
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- 4.5---Long-term-changes
8+
pull_request:
9+
branches:
10+
- main
11+
- 4.5---Long-term-changes
12+
13+
14+
jobs:
15+
build:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Checkout repo
19+
uses: actions/checkout@v2
20+
- name: Set up JDK 21
21+
uses: actions/setup-java@v1
22+
with:
23+
java-version: 21
24+
- name: Grant execute permission for gradlew
25+
run: chmod +x gradlew
26+
- name: Build with Gradle
27+
run: ./gradlew build
28+
- name: Upload artifacts
29+
uses: actions/upload-artifact@master
30+
with:
31+
path: build/libs/*.jar
32+
test:
33+
runs-on: ubuntu-latest
34+
needs: [build]
35+
steps:
36+
- name: Checkout repo
37+
uses: actions/checkout@v2
38+
- name: Download artifacts
39+
uses: actions/download-artifact@v4
40+
with:
41+
path: extra-plugins/
42+
merge-multiple: true
43+
- name: Run tests
44+
uses: SkriptLang/skript-test-action@feature/performance
45+
with:
46+
test_script_directory: src/test/scripts
47+
extra_plugins_directory: extra-plugins/

.github/workflows/skript-test.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Build and test
2+
3+
on:
4+
- push
5+
- pull_request
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout repo
12+
uses: actions/checkout@v2
13+
- name: Set up JDK 21
14+
uses: actions/setup-java@v1
15+
with:
16+
java-version: 21
17+
- name: Grant execute permission for gradlew
18+
run: chmod +x gradlew
19+
- name: Build with Gradle
20+
run: ./gradlew build
21+
- name: Upload artifacts
22+
uses: actions/upload-artifact@master
23+
with:
24+
path: build/libs/*.jar
25+
test:
26+
runs-on: ubuntu-latest
27+
needs: [build]
28+
steps:
29+
- name: Checkout repo
30+
uses: actions/checkout@v2
31+
- name: Download artifacts
32+
uses: actions/download-artifact@v4
33+
with:
34+
path: extra-plugins/
35+
merge-multiple: true
36+
- name: Run tests
37+
uses: SkriptLang/skript-test-action@feature/performance
38+
with:
39+
test_script_directory: src/test/scripts
40+
extra_plugins_directory: extra-plugins/

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
[![Discord](https://img.shields.io/discord/425192525091831808.svg?style=for-the-badge)](https://discord.gg/dsZq5Cs9fd)
88
![License](https://img.shields.io/github/license/SkJsonTeam/skJson?style=for-the-badge)
99
[![CodeFactor](https://www.codefactor.io/repository/github/cooffeerequired/skjson/badge)](https://www.codefactor.io/repository/github/cooffeerequired/skjson)
10-
[![Java CI with Maven](https://github.com/SkJsonTeam/skJson/actions/workflows/maven.yml/badge.svg?branch=main)](https://github.com/SkJsonTeam/skJson/actions/workflows/maven.yml)
1110

1211
<br />
1312

@@ -42,7 +41,11 @@
4241

4342
The new version of SkJson is currently a **Work in Progress (WIP)**. Our goal is to make JSON handling in Skript easier and more efficient than ever before. This release will feature major improvements in terms of performance, usability, and compatibility, providing you with a seamless experience for all your scripting needs.
4443

44+
<<<<<<< HEAD
4545
### Key Improvements:
46+
=======
47+
for the first time and recommend working with [SkJson Documentation](https://skjson.xyz/)
48+
>>>>>>> main
4649
4750
- **Java 21+ Compatibility**: SkJson now requires Java 21 or higher, ensuring that the addon takes full advantage of the latest performance improvements and language features.
4851
- **Skript 2.9.2+ Compatibility**: Updated compatibility to require Skript 2.9.2+, providing better support and additional features that enhance your scripting workflow.

gradlew

Lines changed: 161 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
1+
<<<<<<< HEAD
12
#!/bin/sh
23

34
#
45
# Copyright © 2015-2021 the original authors.
6+
=======
7+
#!/usr/bin/env sh
8+
9+
#
10+
# Copyright 2015 the original author or authors.
11+
>>>>>>> main
512
#
613
# Licensed under the Apache License, Version 2.0 (the "License");
714
# you may not use this file except in compliance with the License.
@@ -15,6 +22,7 @@
1522
# See the License for the specific language governing permissions and
1623
# limitations under the License.
1724
#
25+
<<<<<<< HEAD
1826
# SPDX-License-Identifier: Apache-2.0
1927
#
2028

@@ -95,24 +103,83 @@ MAX_FD=maximum
95103
warn () {
96104
echo "$*"
97105
} >&2
106+
=======
107+
108+
##############################################################################
109+
##
110+
## Gradle start up script for UN*X
111+
##
112+
##############################################################################
113+
114+
# Attempt to set APP_HOME
115+
# Resolve links: $0 may be a link
116+
PRG="$0"
117+
# Need this for relative symlinks.
118+
while [ -h "$PRG" ] ; do
119+
ls=`ls -ld "$PRG"`
120+
link=`expr "$ls" : '.*-> \(.*\)$'`
121+
if expr "$link" : '/.*' > /dev/null; then
122+
PRG="$link"
123+
else
124+
PRG=`dirname "$PRG"`"/$link"
125+
fi
126+
done
127+
SAVED="`pwd`"
128+
cd "`dirname \"$PRG\"`/" >/dev/null
129+
APP_HOME="`pwd -P`"
130+
cd "$SAVED" >/dev/null
131+
132+
APP_NAME="Gradle"
133+
APP_BASE_NAME=`basename "$0"`
134+
135+
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
136+
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
137+
138+
# Use the maximum available, or set MAX_FD != -1 to use that value.
139+
MAX_FD="maximum"
140+
141+
warn () {
142+
echo "$*"
143+
}
144+
>>>>>>> main
98145

99146
die () {
100147
echo
101148
echo "$*"
102149
echo
103150
exit 1
151+
<<<<<<< HEAD
104152
} >&2
153+
=======
154+
}
155+
>>>>>>> main
105156

106157
# OS specific support (must be 'true' or 'false').
107158
cygwin=false
108159
msys=false
109160
darwin=false
110161
nonstop=false
162+
<<<<<<< HEAD
111163
case "$( uname )" in #(
112164
CYGWIN* ) cygwin=true ;; #(
113165
Darwin* ) darwin=true ;; #(
114166
MSYS* | MINGW* ) msys=true ;; #(
115167
NONSTOP* ) nonstop=true ;;
168+
=======
169+
case "`uname`" in
170+
CYGWIN* )
171+
cygwin=true
172+
;;
173+
Darwin* )
174+
darwin=true
175+
;;
176+
MSYS* | MINGW* )
177+
msys=true
178+
;;
179+
NONSTOP* )
180+
nonstop=true
181+
;;
182+
>>>>>>> main
116183
esac
117184

118185
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
@@ -122,9 +189,15 @@ CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
122189
if [ -n "$JAVA_HOME" ] ; then
123190
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
124191
# IBM's JDK on AIX uses strange locations for the executables
192+
<<<<<<< HEAD
125193
JAVACMD=$JAVA_HOME/jre/sh/java
126194
else
127195
JAVACMD=$JAVA_HOME/bin/java
196+
=======
197+
JAVACMD="$JAVA_HOME/jre/sh/java"
198+
else
199+
JAVACMD="$JAVA_HOME/bin/java"
200+
>>>>>>> main
128201
fi
129202
if [ ! -x "$JAVACMD" ] ; then
130203
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
@@ -133,6 +206,7 @@ Please set the JAVA_HOME variable in your environment to match the
133206
location of your Java installation."
134207
fi
135208
else
209+
<<<<<<< HEAD
136210
JAVACMD=java
137211
if ! command -v java >/dev/null 2>&1
138212
then
@@ -250,3 +324,90 @@ eval "set -- $(
250324
)" '"$@"'
251325

252326
exec "$JAVACMD" "$@"
327+
=======
328+
JAVACMD="java"
329+
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
330+
331+
Please set the JAVA_HOME variable in your environment to match the
332+
location of your Java installation."
333+
fi
334+
335+
# Increase the maximum file descriptors if we can.
336+
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
337+
MAX_FD_LIMIT=`ulimit -H -n`
338+
if [ $? -eq 0 ] ; then
339+
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
340+
MAX_FD="$MAX_FD_LIMIT"
341+
fi
342+
ulimit -n $MAX_FD
343+
if [ $? -ne 0 ] ; then
344+
warn "Could not set maximum file descriptor limit: $MAX_FD"
345+
fi
346+
else
347+
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
348+
fi
349+
fi
350+
351+
# For Darwin, add options to specify how the application appears in the dock
352+
if $darwin; then
353+
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
354+
fi
355+
356+
# For Cygwin or MSYS, switch paths to Windows format before running java
357+
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
358+
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
359+
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
360+
361+
JAVACMD=`cygpath --unix "$JAVACMD"`
362+
363+
# We build the pattern for arguments to be converted via cygpath
364+
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
365+
SEP=""
366+
for dir in $ROOTDIRSRAW ; do
367+
ROOTDIRS="$ROOTDIRS$SEP$dir"
368+
SEP="|"
369+
done
370+
OURCYGPATTERN="(^($ROOTDIRS))"
371+
# Add a user-defined pattern to the cygpath arguments
372+
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
373+
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
374+
fi
375+
# Now convert the arguments - kludge to limit ourselves to /bin/sh
376+
i=0
377+
for arg in "$@" ; do
378+
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
379+
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
380+
381+
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
382+
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
383+
else
384+
eval `echo args$i`="\"$arg\""
385+
fi
386+
i=`expr $i + 1`
387+
done
388+
case $i in
389+
0) set -- ;;
390+
1) set -- "$args0" ;;
391+
2) set -- "$args0" "$args1" ;;
392+
3) set -- "$args0" "$args1" "$args2" ;;
393+
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
394+
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
395+
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
396+
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
397+
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
398+
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
399+
esac
400+
fi
401+
402+
# Escape application args
403+
save () {
404+
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
405+
echo " "
406+
}
407+
APP_ARGS=`save "$@"`
408+
409+
# Collect all arguments for the java command, following the shell quoting and substitution rules
410+
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
411+
412+
exec "$JAVACMD" "$@"
413+
>>>>>>> main

0 commit comments

Comments
 (0)