Skip to content

Commit b4cc4a7

Browse files
committed
chore: be explicit for each class file, and preserve transitive JBA dependency
1 parent 81a7065 commit b4cc4a7

16 files changed

+37
-19
lines changed

build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ indraSonatype {
1717
}
1818

1919
dependencies {
20+
compileOnlyApi libs.jetbrainsAnnotations // keep to avoid breaking builds, will be removed for 2.0
2021
compileOnlyApi libs.jspecify
2122
implementation gradleApi()
2223

gradle/libs.versions.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[metadata]
2-
version = "1.0"
2+
format = { version = "1.1" }
33

44
[versions]
55
checkstyle = "10.18.2"
@@ -9,6 +9,7 @@ stylecheck = "0.2.1"
99
errorprone = "2.30.0"
1010

1111
[libraries]
12+
jetbrainsAnnotations = { module = "org.jetbrains:annotations", version = "25.0.0" }
1213
jspecify = { module = "org.jspecify:jspecify", version = "1.0.0" }
1314

1415
# test

mammoth-test/src/main/java/net/kyori/mammoth/test/GradleFunctionalTestExtension.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* This file is part of mammoth, licensed under the MIT License.
33
*
4-
* Copyright (c) 2021-2024 KyoriPowered
4+
* Copyright (c) 2021-2025 KyoriPowered
55
*
66
* Permission is hereby granted, free of charge, to any person obtaining a copy
77
* of this software and associated documentation files (the "Software"), to deal
@@ -37,6 +37,7 @@
3737
import java.util.Optional;
3838
import java.util.stream.Stream;
3939
import org.gradle.util.GradleVersion;
40+
import org.jspecify.annotations.NullMarked;
4041
import org.jspecify.annotations.Nullable;
4142
import org.junit.jupiter.api.extension.Extension;
4243
import org.junit.jupiter.api.extension.ExtensionContext;
@@ -47,6 +48,7 @@
4748
/**
4849
* An extension that can be applied to test methods to provide test template invocation context.
4950
*/
51+
@NullMarked
5052
class GradleFunctionalTestExtension implements TestTemplateInvocationContextProvider {
5153
private static final int CURRENT_JVM;
5254

mammoth-test/src/main/java/net/kyori/mammoth/test/TemplateInvocationExtensions.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* This file is part of mammoth, licensed under the MIT License.
33
*
4-
* Copyright (c) 2021-2022 KyoriPowered
4+
* Copyright (c) 2021-2025 KyoriPowered
55
*
66
* Permission is hereby granted, free of charge, to any person obtaining a copy
77
* of this software and associated documentation files (the "Software"), to deal
@@ -29,13 +29,15 @@
2929
import java.nio.file.Path;
3030
import java.nio.file.SimpleFileVisitor;
3131
import java.nio.file.attribute.BasicFileAttributes;
32+
import org.jspecify.annotations.NullMarked;
3233
import org.junit.jupiter.api.extension.AfterEachCallback;
3334
import org.junit.jupiter.api.extension.ExtensionContext;
3435
import org.junit.jupiter.api.extension.ParameterContext;
3536
import org.junit.jupiter.api.extension.ParameterResolutionException;
3637
import org.junit.jupiter.api.extension.ParameterResolver;
3738

3839
// Template-specific context information
40+
@NullMarked
3941
class TemplateInvocationExtensions implements AfterEachCallback, ParameterResolver {
4042
private final TestContext context;
4143

mammoth-test/src/main/java/net/kyori/mammoth/test/TestContext.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* This file is part of mammoth, licensed under the MIT License.
33
*
4-
* Copyright (c) 2021-2024 KyoriPowered
4+
* Copyright (c) 2021-2025 KyoriPowered
55
*
66
* Permission is hereby granted, free of charge, to any person obtaining a copy
77
* of this software and associated documentation files (the "Software"), to deal
@@ -37,6 +37,7 @@
3737
import java.util.regex.Pattern;
3838
import org.gradle.testkit.runner.BuildResult;
3939
import org.gradle.testkit.runner.GradleRunner;
40+
import org.jspecify.annotations.NullMarked;
4041
import org.junit.jupiter.api.Assertions;
4142

4243
import static java.util.Objects.requireNonNull;
@@ -48,6 +49,7 @@
4849
*
4950
* @since 1.1.0
5051
*/
52+
@NullMarked
5153
public final class TestContext {
5254
private static final Pattern LINE_ENDING = Pattern.compile("\r\n");
5355

mammoth-test/src/main/java/net/kyori/mammoth/test/package-info.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,4 @@
2828
* annotating methods that have a parameter of either type {@link net.kyori.mammoth.test.TestContext}
2929
* or {@link org.gradle.testkit.runner.GradleRunner}.</p>
3030
*/
31-
@NullMarked
3231
package net.kyori.mammoth.test;
33-
34-
import org.jspecify.annotations.NullMarked;

src/main/java/net/kyori/mammoth/Configurable.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* This file is part of mammoth, licensed under the MIT License.
33
*
4-
* Copyright (c) 2021-2024 KyoriPowered
4+
* Copyright (c) 2021-2025 KyoriPowered
55
*
66
* Permission is hereby granted, free of charge, to any person obtaining a copy
77
* of this software and associated documentation files (the "Software"), to deal
@@ -24,6 +24,7 @@
2424
package net.kyori.mammoth;
2525

2626
import org.gradle.api.Action;
27+
import org.jspecify.annotations.NullMarked;
2728
import org.jspecify.annotations.Nullable;
2829

2930
import static java.util.Objects.requireNonNull;
@@ -33,6 +34,7 @@
3334
*
3435
* @since 1.0.0
3536
*/
37+
@NullMarked
3638
public final class Configurable {
3739
private Configurable() {
3840
}

src/main/java/net/kyori/mammoth/Extensions.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* This file is part of mammoth, licensed under the MIT License.
33
*
4-
* Copyright (c) 2021-2022 KyoriPowered
4+
* Copyright (c) 2021-2025 KyoriPowered
55
*
66
* Permission is hereby granted, free of charge, to any person obtaining a copy
77
* of this software and associated documentation files (the "Software"), to deal
@@ -24,12 +24,14 @@
2424
package net.kyori.mammoth;
2525

2626
import org.gradle.api.plugins.ExtensionContainer;
27+
import org.jspecify.annotations.NullMarked;
2728

2829
/**
2930
* Helpers for working with extensions.
3031
*
3132
* @since 1.0.0
3233
*/
34+
@NullMarked
3335
public final class Extensions {
3436
private Extensions() {
3537
}

src/main/java/net/kyori/mammoth/GradleCompat.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* This file is part of mammoth, licensed under the MIT License.
33
*
4-
* Copyright (c) 2021-2024 KyoriPowered
4+
* Copyright (c) 2021-2025 KyoriPowered
55
*
66
* Permission is hereby granted, free of charge, to any person obtaining a copy
77
* of this software and associated documentation files (the "Software"), to deal
@@ -28,8 +28,10 @@
2828
import org.gradle.api.Project;
2929
import org.gradle.api.provider.Provider;
3030
import org.gradle.util.GradleVersion;
31+
import org.jspecify.annotations.NullMarked;
3132
import org.jspecify.annotations.Nullable;
3233

34+
@NullMarked
3335
final class GradleCompat {
3436
static final boolean SHOULD_USE_CONVENTION = hasMethod(Project.class, "getConvention") && !hasMinGradleVersion("8.2");
3537
static final boolean HAS_FOR_USE_AT_CONFIGURATION_TIME = hasMethod(Provider.class, "forUseAtConfigurationTime") && !hasMinGradleVersion("7.6");

src/main/java/net/kyori/mammoth/IsolatingClassLoader.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* This file is part of mammoth, licensed under the MIT License.
33
*
4-
* Copyright (c) 2024 KyoriPowered
4+
* Copyright (c) 2024-2025 KyoriPowered
55
*
66
* Permission is hereby granted, free of charge, to any person obtaining a copy
77
* of this software and associated documentation files (the "Software"), to deal
@@ -30,6 +30,7 @@
3030
import java.util.Iterator;
3131
import java.util.Set;
3232
import org.gradle.api.file.FileCollection;
33+
import org.jspecify.annotations.NullMarked;
3334
import org.jspecify.annotations.Nullable;
3435

3536
/**
@@ -41,6 +42,7 @@
4142
*
4243
* @since 1.4.0
4344
*/
45+
@NullMarked
4446
public final class IsolatingClassLoader {
4547
private IsolatingClassLoader() {
4648
}

0 commit comments

Comments
 (0)