From 2adfeeba51c2aaf4bddcd5bc1d624ca5974f3a09 Mon Sep 17 00:00:00 2001 From: Dimitry Ivanov Date: Wed, 5 Aug 2020 12:15:29 +0300 Subject: [PATCH] Prepare 4.5.0 release --- CHANGELOG.md | 2 +- gradle.properties | 2 +- .../main/java/io/noties/markwon/MarkwonReducer.java | 2 +- .../main/java/io/noties/markwon/core/CorePlugin.java | 6 +++--- .../main/java/io/noties/markwon/core/MarkwonTheme.java | 4 ++-- .../java/io/noties/markwon/image/AsyncDrawable.java | 10 +++++----- .../noties/markwon/movement/MovementMethodPlugin.java | 10 +++++----- .../io/noties/markwon/ext/latex/JLatexMathTheme.java | 2 +- .../io/noties/markwon/html/tag/SimpleTagHandler.java | 2 +- .../noties/markwon/image/glide/GlideImagesPlugin.java | 2 +- .../markwon/inlineparser/BangInlineProcessor.java | 2 +- 11 files changed, 22 insertions(+), 22 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4e775722..76d21e93 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Changelog -# SNAPSHOT +# 4.5.0 #### Added * `core` - `MovementMethodPlugin.none()`, `MovementMethodPlugin.link()` factory methods diff --git a/gradle.properties b/gradle.properties index 796bb0c0..bcbc2089 100644 --- a/gradle.properties +++ b/gradle.properties @@ -8,7 +8,7 @@ android.enableJetifier=true android.enableBuildCache=true android.buildCacheDir=build/pre-dex-cache -VERSION_NAME=4.5.0-SNAPSHOT +VERSION_NAME=4.5.0 GROUP=io.noties.markwon POM_DESCRIPTION=Markwon markdown for Android diff --git a/markwon-core/src/main/java/io/noties/markwon/MarkwonReducer.java b/markwon-core/src/main/java/io/noties/markwon/MarkwonReducer.java index cd9c8bbc..a987576a 100644 --- a/markwon-core/src/main/java/io/noties/markwon/MarkwonReducer.java +++ b/markwon-core/src/main/java/io/noties/markwon/MarkwonReducer.java @@ -49,7 +49,7 @@ public List reduce(@NonNull Node root) { Node temp; while (node != null) { - // @since $SNAPSHOT; do not include LinkReferenceDefinition node (would result + // @since 4.5.0 do not include LinkReferenceDefinition node (would result // in empty textView if rendered in recycler-view) if (!(node instanceof LinkReferenceDefinition)) { list.add(node); diff --git a/markwon-core/src/main/java/io/noties/markwon/core/CorePlugin.java b/markwon-core/src/main/java/io/noties/markwon/core/CorePlugin.java index 845eb90f..4961505a 100644 --- a/markwon-core/src/main/java/io/noties/markwon/core/CorePlugin.java +++ b/markwon-core/src/main/java/io/noties/markwon/core/CorePlugin.java @@ -115,14 +115,14 @@ public static Set> enabledBlockTypes() { // @since 4.0.0 private final List onTextAddedListeners = new ArrayList<>(0); - // @since $SNAPSHOT; + // @since 4.5.0 private boolean hasExplicitMovementMethod; protected CorePlugin() { } /** - * @since $SNAPSHOT; + * @since 4.5.0 */ @SuppressWarnings("UnusedReturnValue") @NonNull @@ -201,7 +201,7 @@ public void afterSetText(@NonNull TextView textView) { // let's ensure that there is a movement method applied // we do it `afterSetText` so any user-defined movement method won't be // replaced (it should be done in `beforeSetText` or manually on a TextView) - // @since $SNAPSHOT; we additionally check if we should apply _implicit_ movement method + // @since 4.5.0 we additionally check if we should apply _implicit_ movement method if (!hasExplicitMovementMethod && textView.getMovementMethod() == null) { textView.setMovementMethod(LinkMovementMethod.getInstance()); } diff --git a/markwon-core/src/main/java/io/noties/markwon/core/MarkwonTheme.java b/markwon-core/src/main/java/io/noties/markwon/core/MarkwonTheme.java index 34a37893..53504310 100644 --- a/markwon-core/src/main/java/io/noties/markwon/core/MarkwonTheme.java +++ b/markwon-core/src/main/java/io/noties/markwon/core/MarkwonTheme.java @@ -118,7 +118,7 @@ public static Builder builderWithDefaults(@NonNull Context context) { protected final int linkColor; // specifies whether we underline links, by default is true - // @since $SNAPSHOT; + // @since 4.5.0 protected final boolean isLinkedUnderlined; // used in quote, lists @@ -462,7 +462,7 @@ public void applyThematicBreakStyle(@NonNull Paint paint) { public static class Builder { private int linkColor; - private boolean isLinkUnderlined = true; // @since $SNAPSHOT; + private boolean isLinkUnderlined = true; // @since 4.5.0 private int blockMargin; private int blockQuoteWidth; private int blockQuoteColor; diff --git a/markwon-core/src/main/java/io/noties/markwon/image/AsyncDrawable.java b/markwon-core/src/main/java/io/noties/markwon/image/AsyncDrawable.java index b7ac8aca..0e217eac 100644 --- a/markwon-core/src/main/java/io/noties/markwon/image/AsyncDrawable.java +++ b/markwon-core/src/main/java/io/noties/markwon/image/AsyncDrawable.java @@ -18,7 +18,7 @@ public class AsyncDrawable extends Drawable { private final ImageSize imageSize; private final ImageSizeResolver imageSizeResolver; - // @since $SNAPSHOT; + // @since 4.5.0 private final Drawable placeholder; private Drawable result; @@ -30,7 +30,7 @@ public class AsyncDrawable extends Drawable { // @since 2.0.1 for use-cases when image is loaded faster than span is drawn and knows canvas width private boolean waitingForDimensions; - // @since $SNAPSHOT; in case if result is Animatable and this drawable was detached, we + // @since 4.5.0 in case if result is Animatable and this drawable was detached, we // keep the state to resume when we are going to be attached again (when used in RecyclerView) private boolean wasPlayingBefore = false; @@ -136,13 +136,13 @@ public void setCallback2(@Nullable Callback cb) { result.setCallback(callback); } - // @since $SNAPSHOT; we trigger loading only if we have no result (and result is not placeholder) + // @since 4.5.0 we trigger loading only if we have no result (and result is not placeholder) final boolean shouldLoad = result == null || result == placeholder; if (result != null) { result.setCallback(callback); - // @since $SNAPSHOT; + // @since 4.5.0 if (result instanceof Animatable && wasPlayingBefore) { ((Animatable) result).start(); } @@ -229,7 +229,7 @@ protected void setPlaceholderResult(@NonNull Drawable placeholder) { public void setResult(@NonNull Drawable result) { - // @since $SNAPSHOT; revert this flag when we have new source + // @since 4.5.0 revert this flag when we have new source wasPlayingBefore = false; // if we have previous one, detach it diff --git a/markwon-core/src/main/java/io/noties/markwon/movement/MovementMethodPlugin.java b/markwon-core/src/main/java/io/noties/markwon/movement/MovementMethodPlugin.java index 40e8efec..a8996b15 100644 --- a/markwon-core/src/main/java/io/noties/markwon/movement/MovementMethodPlugin.java +++ b/markwon-core/src/main/java/io/noties/markwon/movement/MovementMethodPlugin.java @@ -22,7 +22,7 @@ public class MovementMethodPlugin extends AbstractMarkwonPlugin { * * @see #create(MovementMethod) * @see #link() - * @deprecated $SNAPSHOT; use {@link #link()} + * @deprecated 4.5.0 use {@link #link()} */ @NonNull @Deprecated @@ -31,7 +31,7 @@ public static MovementMethodPlugin create() { } /** - * @since $SNAPSHOT; + * @since 4.5.0 */ @NonNull public static MovementMethodPlugin link() { @@ -42,7 +42,7 @@ public static MovementMethodPlugin link() { * Special {@link MovementMethodPlugin} that is not applying a MovementMethod on a TextView * implicitly * - * @since $SNAPSHOT; + * @since 4.5.0 */ @NonNull public static MovementMethodPlugin none() { @@ -58,7 +58,7 @@ public static MovementMethodPlugin create(@NonNull MovementMethod movementMethod private final MovementMethod movementMethod; /** - * Since $SNAPSHOT; change to be nullable + * Since 4.5.0 change to be nullable */ @SuppressWarnings("WeakerAccess") MovementMethodPlugin(@Nullable MovementMethod movementMethod) { @@ -73,7 +73,7 @@ public void configure(@NonNull Registry registry) { @Override public void beforeSetText(@NonNull TextView textView, @NonNull Spanned markdown) { - // @since $SNAPSHOT; check for equality + // @since 4.5.0 check for equality final MovementMethod current = textView.getMovementMethod(); if (current != movementMethod) { textView.setMovementMethod(movementMethod); diff --git a/markwon-ext-latex/src/main/java/io/noties/markwon/ext/latex/JLatexMathTheme.java b/markwon-ext-latex/src/main/java/io/noties/markwon/ext/latex/JLatexMathTheme.java index 7655c510..b7a0b3af 100644 --- a/markwon-ext-latex/src/main/java/io/noties/markwon/ext/latex/JLatexMathTheme.java +++ b/markwon-ext-latex/src/main/java/io/noties/markwon/ext/latex/JLatexMathTheme.java @@ -83,7 +83,7 @@ public static Padding symmetric(int vertical, int horizontal) { } /** - * @since $SNAPSHOT; + * @since 4.5.0 */ @NonNull public static Padding of(int left, int top, int right, int bottom) { diff --git a/markwon-html/src/main/java/io/noties/markwon/html/tag/SimpleTagHandler.java b/markwon-html/src/main/java/io/noties/markwon/html/tag/SimpleTagHandler.java index cb887bc1..4bf80a7b 100644 --- a/markwon-html/src/main/java/io/noties/markwon/html/tag/SimpleTagHandler.java +++ b/markwon-html/src/main/java/io/noties/markwon/html/tag/SimpleTagHandler.java @@ -28,7 +28,7 @@ public abstract Object getSpans( @Override public void handle(@NonNull MarkwonVisitor visitor, @NonNull MarkwonHtmlRenderer renderer, @NonNull HtmlTag tag) { - // @since $SNAPSHOT; check if tag is block one and visit children + // @since 4.5.0 check if tag is block one and visit children if (tag.isBlock()) { visitChildren(visitor, renderer, tag.getAsBlock()); } diff --git a/markwon-image-glide/src/main/java/io/noties/markwon/image/glide/GlideImagesPlugin.java b/markwon-image-glide/src/main/java/io/noties/markwon/image/glide/GlideImagesPlugin.java index 416624b2..c48df4af 100644 --- a/markwon-image-glide/src/main/java/io/noties/markwon/image/glide/GlideImagesPlugin.java +++ b/markwon-image-glide/src/main/java/io/noties/markwon/image/glide/GlideImagesPlugin.java @@ -44,7 +44,7 @@ public interface GlideStore { @NonNull public static GlideImagesPlugin create(@NonNull final Context context) { - // @since $SNAPSHOT; cache RequestManager + // @since 4.5.0 cache RequestManager // sometimes `cancel` would be called after activity is destroyed, // so `Glide.with(context)` will throw an exception return create(Glide.with(context)); diff --git a/markwon-inline-parser/src/main/java/io/noties/markwon/inlineparser/BangInlineProcessor.java b/markwon-inline-parser/src/main/java/io/noties/markwon/inlineparser/BangInlineProcessor.java index 47bad470..752d29d5 100644 --- a/markwon-inline-parser/src/main/java/io/noties/markwon/inlineparser/BangInlineProcessor.java +++ b/markwon-inline-parser/src/main/java/io/noties/markwon/inlineparser/BangInlineProcessor.java @@ -29,7 +29,7 @@ protected Node parse() { return node; } else { - // @since $SNAPSHOT; return null in case no match (multiple inline + // @since 4.5.0 return null in case no match (multiple inline // processors can define `!` as _special_ character, so let them handle it) // NB! do not forget to reset index index = startIndex;