From 8e74c6d151f774ee587168e152c2918981fcdf84 Mon Sep 17 00:00:00 2001 From: Jerry Lee Date: Wed, 3 Apr 2024 14:03:04 +0800 Subject: [PATCH] ! update after release `v0.5.3` --- README.md | 10 ++++---- pom.xml | 41 +++++++++++++++--------------- scripts/check-forbidden-classes.sh | 18 +++++++------ 3 files changed, 36 insertions(+), 33 deletions(-) diff --git a/README.md b/README.md index 45d78e1..71366dd 100644 --- a/README.md +++ b/README.md @@ -27,10 +27,10 @@ The purpose of **Inspectable Wrappers** is to provide a standard for wrapper cha - [🍡 Files](#-files) - [🌰 Usage Demo](#-usage-demo) - - [wrapper implementations in your application code](#wrapper-implementations-in-your-application-code) + - [demo wrapper implementations in your application code](#demo-wrapper-implementations-in-your-application-code) - [inspection of the wrapper chain](#inspection-of-the-wrapper-chain) - [🌰 Integration Demo](#-integration-demo) - - [the demo existed wrapper cannot be modified](#the-demo-existed-wrapper-cannot-be-modified) + - [the demo existed wrapper which cannot be modified](#the-demo-existed-wrapper-which-cannot-be-modified) - [the integration code](#the-integration-code) - [🌰 Integration Demo using `WrapperAdapterUtils`](#-integration-demo-using-wrapperadapterutils) - [🍼 Java API Docs](#-java-api-docs) @@ -362,7 +362,7 @@ For `Maven` projects: io.foldright inspectable-wrappers - 0.5.2 + 0.5.3 ``` @@ -370,12 +370,12 @@ For `Gradle` projects: ```groovy // Gradle Kotlin DSL -implementation("io.foldright:inspectable-wrappers:0.5.2") +implementation("io.foldright:inspectable-wrappers:0.5.3") ``` ```groovy // Gradle Groovy DSL -implementation 'io.foldright:inspectable-wrappers:0.5.2' +implementation 'io.foldright:inspectable-wrappers:0.5.3' ``` `inspectable-wrappers` has published to maven central, find the latest version at [central.sonatype.com](https://central.sonatype.com/artifact/io.foldright/inspectable-wrappers/0.3.0/versions). diff --git a/pom.xml b/pom.xml index b10397f..319f385 100644 --- a/pom.xml +++ b/pom.xml @@ -496,32 +496,33 @@ ${javadoc.default.exclude.packages} false - - - https://www.javadoc.io/doc/com.google.code.findbugs/jsr305/${jsr305.version}/ - ${javadoc.package.list.dir}/jsr305/ - - - - https://www.javadoc.io/doc/com.github.spotbugs/spotbugs-annotations/${spotbugs.annotations.version}/ - - ${javadoc.package.list.dir}/spotbugs-annotations/ - - - https://www.javadoc.io/doc/org.jetbrains/annotations/${jetbrains.annotations.version}/ - ${javadoc.package.list.dir}/jetbrains-annotations/ - - - https://docs.oracle.com/en/java/javase/${perform.release.jdk.version}/docs/api/java.base/ - ${javadoc.package.list.dir}/java/ - - -html5 + + -linkoffline + + https://www.javadoc.io/doc/com.github.spotbugs/spotbugs-annotations/${spotbugs.annotations.version}/ + + ${javadoc.package.list.dir}/spotbugs-annotations/ + -linkoffline + + https://www.javadoc.io/doc/org.jetbrains/annotations/${jetbrains.annotations.version}/ + + ${javadoc.package.list.dir}/jetbrains-annotations/ + -linkoffline + + https://www.javadoc.io/doc/com.google.code.findbugs/jsr305/${jsr305.version}/ + + ${javadoc.package.list.dir}/jsr305/ + -linkoffline + + https://docs.oracle.com/en/java/javase/${perform.release.jdk.version}/docs/api/java.base/ + + ${javadoc.package.list.dir}/java/ -J-Duser.language=en diff --git a/scripts/check-forbidden-classes.sh b/scripts/check-forbidden-classes.sh index 433d230..4876278 100755 --- a/scripts/check-forbidden-classes.sh +++ b/scripts/check-forbidden-classes.sh @@ -5,25 +5,27 @@ set -eEuo pipefail cd "${0%/*}"/.. readonly forbidden_classes=( - # use edu.umd.cs.findbugs.annotations.Nullable + # prefer edu.umd.cs.findbugs.annotations.Nullable javax.annotation.Nullable org.jetbrains.annotations.Nullable - # use edu.umd.cs.findbugs.annotations.NonNull + # prefer edu.umd.cs.findbugs.annotations.NonNull javax.annotation.Nonnull org.jetbrains.annotations.NotNull - # use edu.umd.cs.findbugs.annotations.CheckForNull + # prefer edu.umd.cs.findbugs.annotations.CheckForNull javax.annotation.CheckReturnValue org.jetbrains.annotations.CheckReturnValue - # use @edu.umd.cs.findbugs.annotations.DefaultAnnotationForParameters(NonNull.class) + # prefer @edu.umd.cs.findbugs.annotations.DefaultAnnotationForParameters(NonNull.class) javax.annotation.ParametersAreNonnullByDefault + + # prefer static import methods of `Assertions` + org.junit.jupiter.api.Assertions\; ) grep_pattern=$(printf '%s\n' "${forbidden_classes[@]}") +[[ "${GITHUB_ACTIONS:-}" = true || -t 1 ]] && more_grep_options=(--color=always) +readonly grep_pattern more_grep_options -grep_options=("$grep_pattern" -F -n -C2 -r src/) -[[ "${GITHUB_ACTIONS:-}" = true || -t 1 ]] && grep_options=("${grep_options[@]}" --color=always) - -! grep "${grep_options[@]}" +! grep "$grep_pattern" -F ${more_grep_options[@]:+"${more_grep_options[@]}"} -n -C2 -r src/