Prepare 4.1.0 release

This commit is contained in:
Dimitry Ivanov 2019-08-06 18:13:13 +03:00
parent b6fa66914f
commit a2d35a1553
8 changed files with 16 additions and 16 deletions

View File

@ -1,6 +1,6 @@
# Changelog # Changelog
# 4.1.0-SNAPSHOT # 4.1.0
* Add `Markwon.TextSetter` interface to be able to use PrecomputedText/PrecomputedTextCompat * Add `Markwon.TextSetter` interface to be able to use PrecomputedText/PrecomputedTextCompat
* Add `PrecomputedTextSetterCompat` and `compileOnly` dependency on `androidx.core:core` * Add `PrecomputedTextSetterCompat` and `compileOnly` dependency on `androidx.core:core`
(clients must have this dependency in the classpath) (clients must have this dependency in the classpath)

View File

@ -8,7 +8,7 @@ android.enableJetifier=true
android.enableBuildCache=true android.enableBuildCache=true
android.buildCacheDir=build/pre-dex-cache android.buildCacheDir=build/pre-dex-cache
VERSION_NAME=4.1.0-SNAPSHOT VERSION_NAME=4.1.0
GROUP=io.noties.markwon GROUP=io.noties.markwon
POM_DESCRIPTION=Markwon markdown for Android POM_DESCRIPTION=Markwon markdown for Android

View File

@ -19,7 +19,7 @@ dependencies {
api it['x-annotations'] api it['x-annotations']
api it['commonmark'] api it['commonmark']
// @since 4.1.0-SNAPSHOT to allow PrecomputedTextSetterCompat // @since 4.1.0 to allow PrecomputedTextSetterCompat
// note that this dependency must be added on a client side explicitly // note that this dependency must be added on a client side explicitly
compileOnly it['x-core'] compileOnly it['x-core']
} }

View File

@ -122,14 +122,14 @@ public abstract class Markwon {
public abstract <P extends MarkwonPlugin> P getPlugin(@NonNull Class<P> type); public abstract <P extends MarkwonPlugin> P getPlugin(@NonNull Class<P> type);
/** /**
* @since 4.1.0-SNAPSHOT * @since 4.1.0
*/ */
@NonNull @NonNull
public abstract <P extends MarkwonPlugin> P requirePlugin(@NonNull Class<P> type); public abstract <P extends MarkwonPlugin> P requirePlugin(@NonNull Class<P> type);
/** /**
* @return a list of registered {@link MarkwonPlugin} * @return a list of registered {@link MarkwonPlugin}
* @since 4.1.0-SNAPSHOT * @since 4.1.0
*/ */
@NonNull @NonNull
public abstract List<? extends MarkwonPlugin> getPlugins(); public abstract List<? extends MarkwonPlugin> getPlugins();
@ -139,7 +139,7 @@ public abstract class Markwon {
* functionality * functionality
* *
* @see PrecomputedTextSetterCompat * @see PrecomputedTextSetterCompat
* @since 4.1.0-SNAPSHOT * @since 4.1.0
*/ */
public interface TextSetter { public interface TextSetter {
/** /**
@ -178,7 +178,7 @@ public abstract class Markwon {
/** /**
* @param textSetter {@link TextSetter} to apply text to a TextView * @param textSetter {@link TextSetter} to apply text to a TextView
* @since 4.1.0-SNAPSHOT * @since 4.1.0
*/ */
@NonNull @NonNull
Builder textSetter(@NonNull TextSetter textSetter); Builder textSetter(@NonNull TextSetter textSetter);

View File

@ -23,7 +23,7 @@ class MarkwonImpl extends Markwon {
private final MarkwonVisitor visitor; private final MarkwonVisitor visitor;
private final List<MarkwonPlugin> plugins; private final List<MarkwonPlugin> plugins;
// @since 4.1.0-SNAPSHOT // @since 4.1.0
@Nullable @Nullable
private final TextSetter textSetter; private final TextSetter textSetter;
@ -92,7 +92,7 @@ class MarkwonImpl extends Markwon {
plugin.beforeSetText(textView, markdown); plugin.beforeSetText(textView, markdown);
} }
// @since 4.1.0-SNAPSHOT // @since 4.1.0
if (textSetter != null) { if (textSetter != null) {
textSetter.setText(textView, markdown, bufferType, new Runnable() { textSetter.setText(textView, markdown, bufferType, new Runnable() {
@Override @Override

View File

@ -17,7 +17,7 @@ import java.util.concurrent.Executor;
* Please do not use with `markwon-recycler` as it will lead to bad item rendering (due to async nature) * Please do not use with `markwon-recycler` as it will lead to bad item rendering (due to async nature)
* *
* @see io.noties.markwon.Markwon.TextSetter * @see io.noties.markwon.Markwon.TextSetter
* @since 4.1.0-SNAPSHOT * @since 4.1.0
*/ */
public class PrecomputedTextSetterCompat implements Markwon.TextSetter { public class PrecomputedTextSetterCompat implements Markwon.TextSetter {

View File

@ -57,7 +57,7 @@ public abstract class AsyncDrawableScheduler {
textView.setTag(R.id.markwon_drawables_scheduler, listener); textView.setTag(R.id.markwon_drawables_scheduler, listener);
} }
// @since 4.1.0-SNAPSHOT // @since 4.1.0
final DrawableCallbackImpl.Invalidator invalidator = new TextViewInvalidator(textView); final DrawableCallbackImpl.Invalidator invalidator = new TextViewInvalidator(textView);
AsyncDrawable drawable; AsyncDrawable drawable;
@ -112,14 +112,14 @@ public abstract class AsyncDrawableScheduler {
private static class DrawableCallbackImpl implements Drawable.Callback { private static class DrawableCallbackImpl implements Drawable.Callback {
// @since 4.1.0-SNAPSHOT // @since 4.1.0
// interface to be used when bounds change and view must be invalidated // interface to be used when bounds change and view must be invalidated
interface Invalidator { interface Invalidator {
void invalidate(); void invalidate();
} }
private final TextView view; private final TextView view;
private final Invalidator invalidator; // @since 4.1.0-SNAPSHOT private final Invalidator invalidator; // @since 4.1.0
private Rect previousBounds; private Rect previousBounds;
@ -151,7 +151,7 @@ public abstract class AsyncDrawableScheduler {
// but if the size has changed, then we need to update the whole layout... // but if the size has changed, then we need to update the whole layout...
if (!previousBounds.equals(rect)) { if (!previousBounds.equals(rect)) {
// @since 4.1.0-SNAPSHOT // @since 4.1.0
// invalidation moved to upper level (so invalidation can be deferred, // invalidation moved to upper level (so invalidation can be deferred,
// and multiple calls combined) // and multiple calls combined)
invalidator.invalidate(); invalidator.invalidate();

View File

@ -35,7 +35,7 @@ abstract class TableRowsScheduler {
final TableRowSpan.Invalidator invalidator = new TableRowSpan.Invalidator() { final TableRowSpan.Invalidator invalidator = new TableRowSpan.Invalidator() {
// @since 4.1.0-SNAPSHOT // @since 4.1.0
// let's stack-up invalidation calls (so invalidation happens, // let's stack-up invalidation calls (so invalidation happens,
// but not with each table-row-span draw call) // but not with each table-row-span draw call)
final Runnable runnable = new Runnable() { final Runnable runnable = new Runnable() {
@ -47,7 +47,7 @@ abstract class TableRowsScheduler {
@Override @Override
public void invalidate() { public void invalidate() {
// @since 4.1.0-SNAPSHOT post invalidation (combine multiple calls) // @since 4.1.0 post invalidation (combine multiple calls)
view.removeCallbacks(runnable); view.removeCallbacks(runnable);
view.post(runnable); view.post(runnable);
} }