Skip to content

Commit 7178dc4

Browse files
authored
Merge pull request #6167 from SkriptLang/dev/patch
Merge `dev/patch` into `master`
2 parents 8c7fec0 + 0e6be2d commit 7178dc4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+1004
-506
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,3 +223,6 @@ gradle-app.setting
223223
# TODO remove this in the future after some time since https://github.com/SkriptLang/Skript/pull/4979
224224
# This ensures developers don't upload their old existing test_runners/ folder.
225225
test_runners/
226+
227+
## Mac MetaData
228+
**/.DS_Store

build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ allprojects {
2727
dependencies {
2828
shadow group: 'io.papermc', name: 'paperlib', version: '1.0.8'
2929
shadow group: 'org.bstats', name: 'bstats-bukkit', version: '3.0.2'
30-
shadow group: 'net.kyori', name: 'adventure-text-serializer-bungeecord', version: '4.3.0'
30+
shadow group: 'net.kyori', name: 'adventure-text-serializer-bungeecord', version: '4.3.1'
3131

3232
implementation group: 'io.papermc.paper', name: 'paper-api', version: '1.20.2-R0.1-SNAPSHOT'
3333
implementation group: 'org.eclipse.jdt', name: 'org.eclipse.jdt.annotation', version: '2.2.700'
@@ -150,7 +150,7 @@ license {
150150
}
151151

152152
task releaseJavadoc(type: Javadoc) {
153-
title = project.property('version')
153+
title = project.name + ' ' + project.property('version')
154154
source = sourceSets.main.allJava
155155
classpath = configurations.compileClasspath
156156
options.encoding = 'UTF-8'
@@ -223,7 +223,7 @@ void createTestTask(String name, String desc, String environments, int javaVersi
223223
main = 'ch.njol.skript.test.platform.PlatformMain'
224224
args = [
225225
'build/test_runners',
226-
junit ? 'src/test/skript/tests/junit' : 'src/test/skript/tests',
226+
junit ? 'src/test/skript/junit' : 'src/test/skript/tests',
227227
'src/test/resources/runner_data',
228228
environments,
229229
modifiers.contains(Modifiers.DEV_MODE),

gradle.properties

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1+
# Ensure encoding is consistent across systems
2+
org.gradle.jvmargs=-Dfile.encoding=UTF-8
3+
14
groupid=ch.njol
25
name=skript
3-
version=2.7.1
6+
version=2.7.2
47
jarName=Skript.jar
58
testEnv=java17/paper-1.20.2
69
testEnvJavaVersion=17

skript-aliases

src/main/java/ch/njol/skript/Skript.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -591,6 +591,8 @@ public void run() {
591591
tainted = true;
592592
try {
593593
getAddonInstance().loadClasses("ch.njol.skript.test.runner");
594+
if (TestMode.JUNIT)
595+
getAddonInstance().loadClasses("org.skriptlang.skript.test.junit.registration");
594596
} catch (IOException e) {
595597
Skript.exception("Failed to load testing environment.");
596598
Bukkit.getServer().shutdown();
@@ -684,7 +686,6 @@ protected void afterErrors() {
684686
TestTracker.testFailed("exception was thrown during execution");
685687
}
686688
if (TestMode.JUNIT) {
687-
SkriptLogger.setVerbosity(Verbosity.DEBUG);
688689
info("Running all JUnit tests...");
689690
long milliseconds = 0, tests = 0, fails = 0, ignored = 0, size = 0;
690691
try {
@@ -712,7 +713,7 @@ protected void afterErrors() {
712713
// If JUnit failures are present, add them to the TestTracker.
713714
junit.getFailures().forEach(failure -> {
714715
String message = failure.getMessage() == null ? "" : " " + failure.getMessage();
715-
TestTracker.testFailed("'" + test + "': " + message);
716+
TestTracker.JUnitTestFailed(test, message);
716717
Skript.exception(failure.getException(), "JUnit test '" + failure.getTestHeader() + " failed.");
717718
});
718719
SkriptJUnitTest.clearJUnitTest();
@@ -734,7 +735,7 @@ protected void afterErrors() {
734735
// Delay server shutdown to stop the server from crashing because the current tick takes a long time due to all the tests
735736
Bukkit.getScheduler().runTaskLater(Skript.this, () -> {
736737
if (TestMode.JUNIT && !EffObjectives.isJUnitComplete())
737-
TestTracker.testFailed(EffObjectives.getFailedObjectivesString());
738+
EffObjectives.fail();
738739

739740
info("Collecting results to " + TestMode.RESULTS_FILE);
740741
String results = new Gson().toJson(TestTracker.collectResults());
@@ -1261,7 +1262,7 @@ public static boolean isAcceptRegistrations() {
12611262
}
12621263

12631264
public static void checkAcceptRegistrations() {
1264-
if (!isAcceptRegistrations())
1265+
if (!isAcceptRegistrations() && !Skript.testing())
12651266
throw new SkriptAPIException("Registration can only be done during plugin initialization");
12661267
}
12671268

0 commit comments

Comments
 (0)