From 935f84699a94f4b5299d0c9517e63a36de922d9a Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Tue, 1 Feb 2022 08:48:53 +0000 Subject: [PATCH 1/7] Update gradle and github actions --- build-logic/build.gradle.kts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build-logic/build.gradle.kts b/build-logic/build.gradle.kts index 8c54bde8f..011eeebd6 100644 --- a/build-logic/build.gradle.kts +++ b/build-logic/build.gradle.kts @@ -14,10 +14,10 @@ repositories { } dependencies { - val indraVersion = "2.0.6" + val indraVersion = "2.1.0" implementation("net.kyori", "indra-common", indraVersion) implementation("net.kyori", "indra-publishing-sonatype", indraVersion) implementation("com.adarshr", "gradle-test-logger-plugin", "3.1.0") implementation("me.champeau.jmh", "jmh-gradle-plugin", "0.6.6") - implementation("com.diffplug.gradle", "goomph", "3.34.0") + implementation("com.diffplug.gradle", "goomph", "3.35.0") } From 4fb2dad6d36a3d5b69f0087f1cc67ef6e2952c60 Mon Sep 17 00:00:00 2001 From: zml Date: Tue, 4 Jan 2022 22:47:09 -0800 Subject: [PATCH 2/7] build: update indra to 2.1.0 --- .checkstyle/checkstyle.xml | 3 - build-logic/build.gradle.kts | 1 + build-logic/src/main/kotlin/CopyJavadoc.kt | 82 ---------------- .../src/main/kotlin/JavadocPackaging.kt | 34 ------- .../adventure.common-conventions.gradle.kts | 98 ++----------------- .../adventure.parent-build-logic.gradle.kts | 1 - build-logic/src/main/kotlin/extensions.kt | 2 +- 7 files changed, 8 insertions(+), 213 deletions(-) delete mode 100644 build-logic/src/main/kotlin/CopyJavadoc.kt delete mode 100644 build-logic/src/main/kotlin/JavadocPackaging.kt diff --git a/.checkstyle/checkstyle.xml b/.checkstyle/checkstyle.xml index 80d519f63..958b0b4a9 100644 --- a/.checkstyle/checkstyle.xml +++ b/.checkstyle/checkstyle.xml @@ -245,9 +245,6 @@ - - - diff --git a/build-logic/build.gradle.kts b/build-logic/build.gradle.kts index 011eeebd6..fab37d0af 100644 --- a/build-logic/build.gradle.kts +++ b/build-logic/build.gradle.kts @@ -17,6 +17,7 @@ dependencies { val indraVersion = "2.1.0" implementation("net.kyori", "indra-common", indraVersion) implementation("net.kyori", "indra-publishing-sonatype", indraVersion) + implementation("net.kyori", "indra-crossdoc", indraVersion) implementation("com.adarshr", "gradle-test-logger-plugin", "3.1.0") implementation("me.champeau.jmh", "jmh-gradle-plugin", "0.6.6") implementation("com.diffplug.gradle", "goomph", "3.35.0") diff --git a/build-logic/src/main/kotlin/CopyJavadoc.kt b/build-logic/src/main/kotlin/CopyJavadoc.kt deleted file mode 100644 index 5bde5f90d..000000000 --- a/build-logic/src/main/kotlin/CopyJavadoc.kt +++ /dev/null @@ -1,82 +0,0 @@ -/* - * This file is part of adventure, licensed under the MIT License. - * - * Copyright (c) 2017-2021 KyoriPowered - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -import org.gradle.api.DefaultTask -import org.gradle.api.file.ConfigurableFileCollection -import org.gradle.api.file.DirectoryProperty -import org.gradle.api.file.FileSystemOperations -import org.gradle.api.provider.Property -import org.gradle.api.tasks.Input -import org.gradle.api.tasks.InputFiles -import org.gradle.api.tasks.Internal -import org.gradle.api.tasks.OutputDirectory -import org.gradle.api.tasks.TaskAction -import org.gradle.api.tasks.options.Option -import javax.inject.Inject - -internal const val ADVENTURE_PREFIX = "adventure-" - -/** - * Copy project javadoc into the `adventure-javadoc` directory tree - */ -abstract class CopyJavadoc : DefaultTask() { - @get:Input - abstract val projectName: Property - - @get:Input - abstract val projectVersion: Property - - @get:InputFiles - abstract val javadocFiles: ConfigurableFileCollection - - @get:Internal - abstract val rootDir: DirectoryProperty - - @get:Internal - @get:Option(option="output", description="The root of the adventure-javadocs repository") - abstract val output: Property - - @get:OutputDirectory - abstract val outputDir: DirectoryProperty - - @get:Inject - protected abstract val fsOps: FileSystemOperations - - init { - // relative to project root, // - outputDir.set(rootDir.dir(output).flatMap { it.dir(this.projectName).flatMap { it.dir(this.projectVersion) } }) - } - - @TaskAction - fun doTransfer() { - val dest = outputDir.get().asFile - - dest.deleteRecursively() - dest.mkdirs() - - fsOps.copy { - from(javadocFiles) - into(dest) - } - } -} diff --git a/build-logic/src/main/kotlin/JavadocPackaging.kt b/build-logic/src/main/kotlin/JavadocPackaging.kt deleted file mode 100644 index 2cbf6c591..000000000 --- a/build-logic/src/main/kotlin/JavadocPackaging.kt +++ /dev/null @@ -1,34 +0,0 @@ -/* - * This file is part of adventure, licensed under the MIT License. - * - * Copyright (c) 2017-2021 KyoriPowered - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -import org.gradle.api.Named -import org.gradle.api.attributes.Attribute - -interface JavadocPackaging : Named { - companion object { - val ATTRIBUTE: Attribute = Attribute.of("net.kyori.javadoc.packaging", JavadocPackaging::class.java) - - const val ARCHIVE = "archive" - const val DIRECTORY = "directory" - } -} diff --git a/build-logic/src/main/kotlin/adventure.common-conventions.gradle.kts b/build-logic/src/main/kotlin/adventure.common-conventions.gradle.kts index 545e33a8a..17e89171d 100644 --- a/build-logic/src/main/kotlin/adventure.common-conventions.gradle.kts +++ b/build-logic/src/main/kotlin/adventure.common-conventions.gradle.kts @@ -5,6 +5,7 @@ import org.gradle.api.artifacts.type.ArtifactTypeDefinition plugins { id("adventure.base-conventions") + id("net.kyori.indra.crossdoc") id("net.kyori.indra") id("net.kyori.indra.checkstyle") id("net.kyori.indra.license-header") @@ -35,50 +36,13 @@ configurations { testCompileClasspath { exclude(group = "junit") // brought in by google's libs } - - // Register unpacked Javadoc as an artifact for cross-linking - javadocElements { - outgoing { - variants { - create("files") { - artifact(tasks.javadoc.map { it.destinationDir!! }) { - builtBy(tasks.javadoc) - type = ArtifactTypeDefinition.DIRECTORY_TYPE // JavaBasePlugin has a hardcoded list of artifact types that can't be published. this is one of them - } - attributes { - attribute(JavadocPackaging.ATTRIBUTE, objects.named(JavadocPackaging.DIRECTORY)) - } - } - } - } - } -} - -// Resolve JD for cross-linking between modules -val offlineLinkedJavadoc = configurations.register("offlineLinkedJavadoc") { - isCanBeResolved = true - isCanBeConsumed = false - - attributes { - attribute(Category.CATEGORY_ATTRIBUTE, objects.named(Category.DOCUMENTATION)) - attribute(Bundling.BUNDLING_ATTRIBUTE, objects.named(Bundling.EXTERNAL)) - attribute(DocsType.DOCS_TYPE_ATTRIBUTE, objects.named(DocsType.JAVADOC)) - attribute(Usage.USAGE_ATTRIBUTE, objects.named(Usage.JAVA_RUNTIME)) - attribute(JavadocPackaging.ATTRIBUTE, objects.named(JavadocPackaging.DIRECTORY)) - } - extendsFrom(configurations.runtimeElements.get()) } repositories { - mavenLocal() mavenCentral() } dependencies { - attributesSchema { - attribute(JavadocPackaging.ATTRIBUTE) - } - annotationProcessor("ca.stellardrift:contract-validator:1.0.1") // https://github.com/zml2008/contract-validator api(platform(project(":adventure-bom"))) checkstyle("ca.stellardrift:stylecheck:0.1") @@ -91,71 +55,21 @@ dependencies { testImplementation("org.junit.jupiter:junit-jupiter-params") } -fun filterProjectName(name: String): String { - if (name.startsWith(ADVENTURE_PREFIX)) { - return name.substring(ADVENTURE_PREFIX.length, name.length) - } else { - return name +val ADVENTURE_PREFIX = "adventure-" +indraCrossdoc { + baseUrl().set(providers.gradleProperty("javadocPublishRoot")) + nameBasedDocumentationUrlProvider { + projectNamePrefix.set(ADVENTURE_PREFIX) } } tasks { - // link to modules in project - val submoduleLinkRoot = providers.gradleProperty("javadocPublishRoot") - val jdLinks = offlineLinkedJavadoc.get().incoming - .artifactView { - componentFilter { it is ProjectComponentIdentifier } // only in-project - isLenient = true // ignore artifacts with no javadoc elements variant - } - val version = project.version javadoc { - inputs.property("jdLinks.root", submoduleLinkRoot) - inputs.property("project.version", version) - inputs.files(jdLinks.files) - .ignoreEmptyDirectories() - .withPropertyName("jdLinks.directories") - val options = options as? StandardJavadocDocletOptions ?: return@javadoc options.tags("sinceMinecraft:a:Since Minecraft:") - - doFirst { - jdLinks.artifacts.forEach el@{ - val file = it.file - val projectName = (it.id.componentIdentifier as ProjectComponentIdentifier).projectName - if (!file.isDirectory) { - logger.info("Failed to link to Javadoc in $file (for $projectName) because it was not a directory") - return@el - } - - // This matches the file structure in adventure-javadocs - var linkRoot = submoduleLinkRoot.get() - if (!linkRoot.endsWith("/")) { - linkRoot += "/" - } - - options.linksOffline("${linkRoot}${filterProjectName(projectName)}/$version", file.absolutePath) - } - } - } - - register("copyJavadoc", CopyJavadoc::class) { - projectName.set(provider { filterProjectName(project.name) }) - projectVersion.set(provider { project.version.toString() }) - javadocFiles.from(javadoc) - rootDir.set(project.rootDir) } jacocoTestReport { dependsOn(test) } - - // Non-incremental - named("eclipseFactorypath", com.diffplug.gradle.eclipse.apt.GenerateEclipseFactorypath::class) { - doFirst { - val inFile = inputFile - if (inFile != null && inFile.exists()) { - inFile.delete() - } - } - } } diff --git a/build-logic/src/main/kotlin/adventure.parent-build-logic.gradle.kts b/build-logic/src/main/kotlin/adventure.parent-build-logic.gradle.kts index c974bce1e..b42c72a72 100644 --- a/build-logic/src/main/kotlin/adventure.parent-build-logic.gradle.kts +++ b/build-logic/src/main/kotlin/adventure.parent-build-logic.gradle.kts @@ -1,4 +1,3 @@ plugins { - id("net.kyori.indra.git") id("net.kyori.indra.publishing.sonatype") } diff --git a/build-logic/src/main/kotlin/extensions.kt b/build-logic/src/main/kotlin/extensions.kt index 0c0bf45bb..eeeb7a905 100644 --- a/build-logic/src/main/kotlin/extensions.kt +++ b/build-logic/src/main/kotlin/extensions.kt @@ -14,7 +14,7 @@ fun Project.applyJarMetadata(moduleName: String) { "Specification-Version" to project.version, "Specification-Vendor" to "KyoriPowered" ) - val indraGit = rootProject.extensions.findByType() + val indraGit = project.extensions.findByType() indraGit?.applyVcsInformationToManifest(manifest) } } From 5970ee4185a7e80e5e0651d786b905774389c5b1 Mon Sep 17 00:00:00 2001 From: zml Date: Fri, 28 Jan 2022 21:28:56 -0800 Subject: [PATCH 3/7] build: Run tests on Java 17, not 16 --- .../src/main/kotlin/adventure.base-conventions.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build-logic/src/main/kotlin/adventure.base-conventions.gradle.kts b/build-logic/src/main/kotlin/adventure.base-conventions.gradle.kts index ae84cdc7c..ec77862d8 100644 --- a/build-logic/src/main/kotlin/adventure.base-conventions.gradle.kts +++ b/build-logic/src/main/kotlin/adventure.base-conventions.gradle.kts @@ -4,7 +4,7 @@ plugins { indra { javaVersions { - testWith(8, 11, 16) + testWith(8, 11, 17) } github("KyoriPowered", "adventure") { From 502147d537b18c5821e2abd3c0a5d61c1417f4d5 Mon Sep 17 00:00:00 2001 From: zml Date: Fri, 28 Jan 2022 22:37:47 -0800 Subject: [PATCH 4/7] build: Update checkstyle version --- .checkstyle/checkstyle.xml | 2 +- .../net/kyori/adventure/bossbar/BossBar.java | 10 +++++----- .../net/kyori/adventure/text/Component.java | 2 +- .../net/kyori/adventure/util/ShadyPines.java | 2 +- .../adventure.base-conventions.gradle.kts | 1 + .../net/kyori/adventure/nbt/BinaryTagIO.java | 20 +++++++++---------- .../plain/PlainComponentSerializer.java | 12 +++++------ 7 files changed, 25 insertions(+), 24 deletions(-) diff --git a/.checkstyle/checkstyle.xml b/.checkstyle/checkstyle.xml index 958b0b4a9..0f337f5fe 100644 --- a/.checkstyle/checkstyle.xml +++ b/.checkstyle/checkstyle.xml @@ -42,7 +42,7 @@ - + diff --git a/api/src/main/java/net/kyori/adventure/bossbar/BossBar.java b/api/src/main/java/net/kyori/adventure/bossbar/BossBar.java index f574fbe3a..f0e93b3eb 100644 --- a/api/src/main/java/net/kyori/adventure/bossbar/BossBar.java +++ b/api/src/main/java/net/kyori/adventure/bossbar/BossBar.java @@ -68,8 +68,8 @@ public interface BossBar extends Examinable { /** * The minimum value the progress can be. * - * @deprecated for removal since 4.2.0, use {@link #MIN_PROGRESS} * @since 4.0.0 + * @deprecated for removal since 4.2.0, use {@link #MIN_PROGRESS} */ @ApiStatus.ScheduledForRemoval(inVersion = "5.0.0") @Deprecated @@ -77,8 +77,8 @@ public interface BossBar extends Examinable { /** * The maximum value the progress can be. * - * @deprecated for removal since 4.2.0, use {@link #MAX_PROGRESS} * @since 4.0.0 + * @deprecated for removal since 4.2.0, use {@link #MAX_PROGRESS} */ @ApiStatus.ScheduledForRemoval(inVersion = "5.0.0") @Deprecated @@ -209,8 +209,8 @@ public interface BossBar extends Examinable { *

The progress is a value between 0 and 1.

* * @return the progress - * @deprecated for removal since 4.2.0, use {@link #progress()} * @since 4.0.0 + * @deprecated for removal since 4.2.0, use {@link #progress()} */ @ApiStatus.ScheduledForRemoval(inVersion = "5.0.0") @Deprecated @@ -226,8 +226,8 @@ default float percent() { * @param progress the progress * @return the bossbar * @throws IllegalArgumentException if progress is less than 0 or greater than 1 - * @deprecated for removal since 4.2.0, use {@link #progress(float)} * @since 4.0.0 + * @deprecated for removal since 4.2.0, use {@link #progress(float)} */ @ApiStatus.ScheduledForRemoval(inVersion = "5.0.0") @Contract("_ -> this") @@ -415,8 +415,8 @@ default void bossBarProgressChanged(final @NotNull BossBar bar, final float oldP * @param bar the bossbar * @param oldProgress the old progress * @param newProgress the new progress - * @deprecated for removal since 4.2.0, use {@link #bossBarProgressChanged(BossBar, float, float)} * @since 4.0.0 + * @deprecated for removal since 4.2.0, use {@link #bossBarProgressChanged(BossBar, float, float)} */ @ApiStatus.ScheduledForRemoval(inVersion = "5.0.0") @Deprecated diff --git a/api/src/main/java/net/kyori/adventure/text/Component.java b/api/src/main/java/net/kyori/adventure/text/Component.java index 72dd19917..4d4c777c1 100644 --- a/api/src/main/java/net/kyori/adventure/text/Component.java +++ b/api/src/main/java/net/kyori/adventure/text/Component.java @@ -1681,8 +1681,8 @@ default boolean contains(final @NotNull Component that, final @NotNull BiPredica * Prevents a cycle between this component and the provided component. * * @param that the other component - * @deprecated for removal since 4.7.0, with no replacement - this method is not necessary due to the fact {@code Component}s are immutable * @since 4.0.0 + * @deprecated for removal since 4.7.0, with no replacement - this method is not necessary due to the fact {@code Component}s are immutable */ @ApiStatus.ScheduledForRemoval(inVersion = "5.0.0") @Deprecated diff --git a/api/src/main/java/net/kyori/adventure/util/ShadyPines.java b/api/src/main/java/net/kyori/adventure/util/ShadyPines.java index 16b8a9c7b..a2030a2f5 100644 --- a/api/src/main/java/net/kyori/adventure/util/ShadyPines.java +++ b/api/src/main/java/net/kyori/adventure/util/ShadyPines.java @@ -43,8 +43,8 @@ private ShadyPines() { * @param constants the enum constants * @param the enum type * @return the set - * @deprecated for removal since 4.8.0, use {@link MonkeyBars#enumSet(Class, Enum[])} * @since 4.0.0 + * @deprecated for removal since 4.8.0, use {@link MonkeyBars#enumSet(Class, Enum[])} */ @ApiStatus.ScheduledForRemoval(inVersion = "5.0.0") @Deprecated diff --git a/build-logic/src/main/kotlin/adventure.base-conventions.gradle.kts b/build-logic/src/main/kotlin/adventure.base-conventions.gradle.kts index ec77862d8..96ec9ca9b 100644 --- a/build-logic/src/main/kotlin/adventure.base-conventions.gradle.kts +++ b/build-logic/src/main/kotlin/adventure.base-conventions.gradle.kts @@ -6,6 +6,7 @@ indra { javaVersions { testWith(8, 11, 17) } + checkstyle("9.2.1") github("KyoriPowered", "adventure") { ci(true) diff --git a/nbt/src/main/java/net/kyori/adventure/nbt/BinaryTagIO.java b/nbt/src/main/java/net/kyori/adventure/nbt/BinaryTagIO.java index 72b93c66b..9b3d1f9ec 100644 --- a/nbt/src/main/java/net/kyori/adventure/nbt/BinaryTagIO.java +++ b/nbt/src/main/java/net/kyori/adventure/nbt/BinaryTagIO.java @@ -104,8 +104,8 @@ private BinaryTagIO() { * @param path the path * @return the compound tag * @throws IOException if an exception was encountered while reading a compound tag - * @deprecated since 4.4.0, use {@link #reader()} * @since 4.0.0 + * @deprecated since 4.4.0, use {@link #reader()} */ @Deprecated public static @NotNull CompoundBinaryTag readPath(final @NotNull Path path) throws IOException { @@ -118,8 +118,8 @@ private BinaryTagIO() { * @param input the input stream * @return the compound tag * @throws IOException if an exception was encountered while reading a compound tag - * @deprecated since 4.4.0, use {@link #reader()} * @since 4.0.0 + * @deprecated since 4.4.0, use {@link #reader()} */ @Deprecated public static @NotNull CompoundBinaryTag readInputStream(final @NotNull InputStream input) throws IOException { @@ -132,8 +132,8 @@ private BinaryTagIO() { * @param path the path * @return the compound tag * @throws IOException if an exception was encountered while reading a compound tag - * @deprecated since 4.4.0, use {@link #reader()} * @since 4.0.0 + * @deprecated since 4.4.0, use {@link #reader()} */ @Deprecated public static @NotNull CompoundBinaryTag readCompressedPath(final @NotNull Path path) throws IOException { @@ -146,8 +146,8 @@ private BinaryTagIO() { * @param input the input stream * @return the compound tag * @throws IOException if an exception was encountered while reading a compound tag - * @deprecated since 4.4.0, use {@link #reader()} * @since 4.0.0 + * @deprecated since 4.4.0, use {@link #reader()} */ @Deprecated public static @NotNull CompoundBinaryTag readCompressedInputStream(final @NotNull InputStream input) throws IOException { @@ -160,8 +160,8 @@ private BinaryTagIO() { * @param input the input * @return the compound tag * @throws IOException if an exception was encountered while reading a compound tag - * @deprecated since 4.4.0, use {@link #reader()} * @since 4.0.0 + * @deprecated since 4.4.0, use {@link #reader()} */ @Deprecated public static @NotNull CompoundBinaryTag readDataInput(final @NotNull DataInput input) throws IOException { @@ -174,8 +174,8 @@ private BinaryTagIO() { * @param tag the compound tag * @param path the path * @throws IOException if an exception was encountered while writing the compound tag - * @deprecated since 4.4.0, use {@link #writer()} * @since 4.0.0 + * @deprecated since 4.4.0, use {@link #writer()} */ @Deprecated public static void writePath(final @NotNull CompoundBinaryTag tag, final @NotNull Path path) throws IOException { @@ -188,8 +188,8 @@ public static void writePath(final @NotNull CompoundBinaryTag tag, final @NotNul * @param tag the compound tag * @param output the output stream * @throws IOException if an exception was encountered while writing the compound tag - * @deprecated since 4.4.0, use {@link #writer()} * @since 4.0.0 + * @deprecated since 4.4.0, use {@link #writer()} */ @Deprecated public static void writeOutputStream(final @NotNull CompoundBinaryTag tag, final @NotNull OutputStream output) throws IOException { @@ -202,8 +202,8 @@ public static void writeOutputStream(final @NotNull CompoundBinaryTag tag, final * @param tag the compound tag * @param path the path * @throws IOException if an exception was encountered while writing the compound tag - * @deprecated since 4.4.0, use {@link #writer()} * @since 4.0.0 + * @deprecated since 4.4.0, use {@link #writer()} */ @Deprecated public static void writeCompressedPath(final @NotNull CompoundBinaryTag tag, final @NotNull Path path) throws IOException { @@ -216,8 +216,8 @@ public static void writeCompressedPath(final @NotNull CompoundBinaryTag tag, fin * @param tag the compound tag * @param output the output stream * @throws IOException if an exception was encountered while writing the compound tag - * @deprecated since 4.4.0, use {@link #writer()} * @since 4.0.0 + * @deprecated since 4.4.0, use {@link #writer()} */ @Deprecated public static void writeCompressedOutputStream(final @NotNull CompoundBinaryTag tag, final @NotNull OutputStream output) throws IOException { @@ -230,8 +230,8 @@ public static void writeCompressedOutputStream(final @NotNull CompoundBinaryTag * @param tag the compound tag * @param output the output * @throws IOException if an exception was encountered while writing the compound tag - * @deprecated since 4.4.0, use {@link #writer()} * @since 4.0.0 + * @deprecated since 4.4.0, use {@link #writer()} */ @Deprecated public static void writeDataOutput(final @NotNull CompoundBinaryTag tag, final @NotNull DataOutput output) throws IOException { diff --git a/text-serializer-plain/src/main/java/net/kyori/adventure/text/serializer/plain/PlainComponentSerializer.java b/text-serializer-plain/src/main/java/net/kyori/adventure/text/serializer/plain/PlainComponentSerializer.java index 318cbef2e..373a0654f 100644 --- a/text-serializer-plain/src/main/java/net/kyori/adventure/text/serializer/plain/PlainComponentSerializer.java +++ b/text-serializer-plain/src/main/java/net/kyori/adventure/text/serializer/plain/PlainComponentSerializer.java @@ -43,8 +43,8 @@ *

Plain does not support more complex features such as, but not limited * to, colours, decorations, {@link ClickEvent}, and {@link HoverEvent}.

* - * @deprecated for removal since 4.8.0, use {@link PlainTextComponentSerializer} instead * @since 4.0.0 + * @deprecated for removal since 4.8.0, use {@link PlainTextComponentSerializer} instead */ @ApiStatus.ScheduledForRemoval(inVersion = "5.0.0") @Deprecated @@ -53,8 +53,8 @@ public class PlainComponentSerializer implements ComponentSerializer { * * @param flattener the new flattener * @return this builder - * @deprecated for removal since 4.8.0, use {@link PlainTextComponentSerializer.Builder#flattener(ComponentFlattener)} instead * @since 4.7.0 + * @deprecated for removal since 4.8.0, use {@link PlainTextComponentSerializer.Builder#flattener(ComponentFlattener)} instead */ @ApiStatus.ScheduledForRemoval(inVersion = "5.0.0") @Deprecated From 6ee5b636bf9b48ccd6f8fb61eb1764e9e553373c Mon Sep 17 00:00:00 2001 From: zml Date: Thu, 3 Feb 2022 18:42:16 -0800 Subject: [PATCH 5/7] build: Modernize GH Actions workflow --- .github/workflows/build.yml | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1d1c36c3f..5c2cad4d8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,6 +1,17 @@ name: "build" -on: ["pull_request", "push"] +on: + push: + branches: "**" + tags-ignore: ["**"] + pull_request: + +concurrency: + group: "${{ github.workflow }}-${{ github.event.number || github.ref }}" + cancel-in-progress: true + +env: + RUNTIME_VERSION: 11 jobs: build: @@ -13,17 +24,21 @@ jobs: steps: - name: "checkout repository" uses: "actions/checkout@v2" - - name: "setup jdk 11" - uses: "actions/setup-java@v1" + - name: "setup jdk ${{ env.RUNTIME_VERSION }}" + uses: "actions/setup-java@v2" + with: + distribution: "temurin" + java-version: "${{ env.RUNTIME_VERSION }}" + - name: "run gradle build" + uses: "gradle/gradle-build-action@v2" with: - java-version: "11" - - name: "build" - run: "./gradlew build" + cache-read-only: "${{ !startsWith(github.ref, 'refs/heads/master') || github.event_name == 'pull_request' }}" + arguments: "build" - name: "Archive test results" if: "${{ always() }}" uses: "actions/upload-artifact@v2" with: - name: "test-results" + name: "${{ runner.os }}-test-results" path: | build/reports/ */build/reports/ From d728136503ec78f21c6002c431f69b10fda4b186 Mon Sep 17 00:00:00 2001 From: zml Date: Thu, 3 Feb 2022 19:00:12 -0800 Subject: [PATCH 6/7] build: Use checkstyle 9.3 --- .../src/main/kotlin/adventure.base-conventions.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build-logic/src/main/kotlin/adventure.base-conventions.gradle.kts b/build-logic/src/main/kotlin/adventure.base-conventions.gradle.kts index 96ec9ca9b..94347afcd 100644 --- a/build-logic/src/main/kotlin/adventure.base-conventions.gradle.kts +++ b/build-logic/src/main/kotlin/adventure.base-conventions.gradle.kts @@ -6,7 +6,7 @@ indra { javaVersions { testWith(8, 11, 17) } - checkstyle("9.2.1") + checkstyle("9.3") github("KyoriPowered", "adventure") { ci(true) From 52f6cd55cd545d426d158354d89bc757be2e12e1 Mon Sep 17 00:00:00 2001 From: zml Date: Thu, 3 Feb 2022 19:02:24 -0800 Subject: [PATCH 7/7] build: Suppress target version mismatch in build-logic --- build-logic/build.gradle.kts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/build-logic/build.gradle.kts b/build-logic/build.gradle.kts index fab37d0af..acdd5abb1 100644 --- a/build-logic/build.gradle.kts +++ b/build-logic/build.gradle.kts @@ -22,3 +22,8 @@ dependencies { implementation("me.champeau.jmh", "jmh-gradle-plugin", "0.6.6") implementation("com.diffplug.gradle", "goomph", "3.35.0") } + +java { + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 +}