diff --git a/README.md b/README.md index 34db2572..075186b0 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ features listed in [commonmark-spec] are supported ![stable](https://img.shields.io/maven-central/v/io.noties.markwon/core.svg?label=stable) ![snapshot](https://img.shields.io/nexus/s/https/oss.sonatype.org/io.noties.markwon/core.svg?label=snapshot) -```groovy +```kotlin implementation "io.noties.markwon:core:${markwonVersion}" ``` diff --git a/app/src/debug/java/io/noties/markwon/debug/DebugCheckboxDrawableView.java b/app/src/debug/java/io/noties/markwon/debug/DebugCheckboxDrawableView.java index 759ab4dc..7a506fc8 100644 --- a/app/src/debug/java/io/noties/markwon/debug/DebugCheckboxDrawableView.java +++ b/app/src/debug/java/io/noties/markwon/debug/DebugCheckboxDrawableView.java @@ -4,7 +4,7 @@ import android.content.Context; import android.content.res.TypedArray; import android.graphics.Canvas; import android.graphics.drawable.Drawable; -import android.support.annotation.Nullable; +import androidx.annotation.Nullable; import android.util.AttributeSet; import android.view.View; diff --git a/app/src/main/java/io/noties/markwon/app/App.java b/app/src/main/java/io/noties/markwon/app/App.java index 0b8bced2..46e15e4b 100644 --- a/app/src/main/java/io/noties/markwon/app/App.java +++ b/app/src/main/java/io/noties/markwon/app/App.java @@ -2,7 +2,8 @@ package io.noties.markwon.app; import android.app.Application; import android.content.Context; -import android.support.annotation.NonNull; + +import androidx.annotation.NonNull; import io.noties.debug.AndroidLogDebugOutput; import io.noties.debug.Debug; diff --git a/app/src/main/java/io/noties/markwon/app/AppBarItem.java b/app/src/main/java/io/noties/markwon/app/AppBarItem.java index ce6094c3..a8b8a322 100644 --- a/app/src/main/java/io/noties/markwon/app/AppBarItem.java +++ b/app/src/main/java/io/noties/markwon/app/AppBarItem.java @@ -1,10 +1,11 @@ package io.noties.markwon.app; -import android.support.annotation.NonNull; import android.text.TextUtils; import android.view.View; import android.widget.TextView; +import androidx.annotation.NonNull; + abstract class AppBarItem { static class State { diff --git a/app/src/main/java/io/noties/markwon/app/AppModule.java b/app/src/main/java/io/noties/markwon/app/AppModule.java index 4e4acc5a..45673165 100644 --- a/app/src/main/java/io/noties/markwon/app/AppModule.java +++ b/app/src/main/java/io/noties/markwon/app/AppModule.java @@ -16,8 +16,8 @@ import io.noties.markwon.syntax.Prism4jThemeDarkula; import io.noties.markwon.syntax.Prism4jThemeDefault; import okhttp3.Cache; import okhttp3.OkHttpClient; -import ru.noties.prism4j.Prism4j; -import ru.noties.prism4j.annotations.PrismBundle; +import io.noties.prism4j.Prism4j; +import io.noties.prism4j.annotations.PrismBundle; @Module @PrismBundle(includeAll = true) diff --git a/app/src/main/java/io/noties/markwon/app/MainActivity.java b/app/src/main/java/io/noties/markwon/app/MainActivity.java index 4aa34b47..c72542b3 100644 --- a/app/src/main/java/io/noties/markwon/app/MainActivity.java +++ b/app/src/main/java/io/noties/markwon/app/MainActivity.java @@ -4,16 +4,17 @@ import android.app.Activity; import android.content.Intent; import android.net.Uri; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; import android.text.Spanned; import android.view.View; import android.widget.TextView; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; + import javax.inject.Inject; -import io.noties.markwon.Markwon; import io.noties.debug.Debug; +import io.noties.markwon.Markwon; public class MainActivity extends Activity { diff --git a/app/src/main/java/io/noties/markwon/app/MarkdownLoader.java b/app/src/main/java/io/noties/markwon/app/MarkdownLoader.java index 05aaa5fc..db135dc4 100644 --- a/app/src/main/java/io/noties/markwon/app/MarkdownLoader.java +++ b/app/src/main/java/io/noties/markwon/app/MarkdownLoader.java @@ -4,10 +4,11 @@ import android.content.ContentResolver; import android.content.Context; import android.net.Uri; import android.os.Handler; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; import android.text.TextUtils; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; + import java.io.BufferedReader; import java.io.File; import java.io.FileInputStream; @@ -20,11 +21,11 @@ import java.util.concurrent.Future; import javax.inject.Inject; +import io.noties.debug.Debug; import okhttp3.OkHttpClient; import okhttp3.Request; import okhttp3.Response; import okhttp3.ResponseBody; -import io.noties.debug.Debug; @ActivityScope public class MarkdownLoader { diff --git a/app/src/main/java/io/noties/markwon/app/MarkdownRenderer.java b/app/src/main/java/io/noties/markwon/app/MarkdownRenderer.java index 8d23ca68..9bcb8e0f 100644 --- a/app/src/main/java/io/noties/markwon/app/MarkdownRenderer.java +++ b/app/src/main/java/io/noties/markwon/app/MarkdownRenderer.java @@ -4,10 +4,11 @@ import android.content.Context; import android.net.Uri; import android.os.Handler; import android.os.SystemClock; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; import android.text.Spanned; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; + import java.util.concurrent.ExecutorService; import java.util.concurrent.Future; @@ -31,7 +32,7 @@ import io.noties.markwon.syntax.Prism4jThemeDefault; import io.noties.markwon.syntax.SyntaxHighlightPlugin; import io.noties.markwon.urlprocessor.UrlProcessor; import io.noties.markwon.urlprocessor.UrlProcessorRelativeToAbsolute; -import ru.noties.prism4j.Prism4j; +import io.noties.prism4j.Prism4j; @ActivityScope public class MarkdownRenderer { diff --git a/app/src/main/java/io/noties/markwon/app/Themes.java b/app/src/main/java/io/noties/markwon/app/Themes.java index f2dc5571..14dc1f61 100644 --- a/app/src/main/java/io/noties/markwon/app/Themes.java +++ b/app/src/main/java/io/noties/markwon/app/Themes.java @@ -2,7 +2,8 @@ package io.noties.markwon.app; import android.content.Context; import android.content.SharedPreferences; -import android.support.annotation.NonNull; + +import androidx.annotation.NonNull; import javax.inject.Inject; import javax.inject.Singleton; diff --git a/app/src/main/java/io/noties/markwon/app/UriProcessor.java b/app/src/main/java/io/noties/markwon/app/UriProcessor.java index 4fcc48dd..45364c67 100644 --- a/app/src/main/java/io/noties/markwon/app/UriProcessor.java +++ b/app/src/main/java/io/noties/markwon/app/UriProcessor.java @@ -1,7 +1,8 @@ package io.noties.markwon.app; import android.net.Uri; -import android.support.annotation.NonNull; + +import androidx.annotation.NonNull; @SuppressWarnings("WeakerAccess") public interface UriProcessor { diff --git a/app/src/main/java/io/noties/markwon/app/UriProcessorImpl.java b/app/src/main/java/io/noties/markwon/app/UriProcessorImpl.java index 843a2403..a4bb3137 100644 --- a/app/src/main/java/io/noties/markwon/app/UriProcessorImpl.java +++ b/app/src/main/java/io/noties/markwon/app/UriProcessorImpl.java @@ -1,7 +1,8 @@ package io.noties.markwon.app; import android.net.Uri; -import android.support.annotation.NonNull; + +import androidx.annotation.NonNull; import java.util.List; @@ -32,7 +33,7 @@ class UriProcessorImpl implements UriProcessor { .fragment(uri.getFragment()) .query(uri.getQuery()); - for (String segment: segments) { + for (String segment : segments) { final String part; if ("blob".equals(segment)) { part = "raw"; diff --git a/app/src/main/java/io/noties/markwon/app/UrlProcessorInitialReadme.java b/app/src/main/java/io/noties/markwon/app/UrlProcessorInitialReadme.java index 535a4810..571bb395 100644 --- a/app/src/main/java/io/noties/markwon/app/UrlProcessorInitialReadme.java +++ b/app/src/main/java/io/noties/markwon/app/UrlProcessorInitialReadme.java @@ -1,9 +1,10 @@ package io.noties.markwon.app; import android.net.Uri; -import android.support.annotation.NonNull; import android.text.TextUtils; +import androidx.annotation.NonNull; + import io.noties.markwon.urlprocessor.UrlProcessor; import io.noties.markwon.urlprocessor.UrlProcessorRelativeToAbsolute; diff --git a/app/src/main/java/io/noties/markwon/app/Views.java b/app/src/main/java/io/noties/markwon/app/Views.java index db438375..587b2c9f 100644 --- a/app/src/main/java/io/noties/markwon/app/Views.java +++ b/app/src/main/java/io/noties/markwon/app/Views.java @@ -1,9 +1,10 @@ package io.noties.markwon.app; -import android.support.annotation.IntDef; -import android.support.annotation.NonNull; import android.view.View; +import androidx.annotation.IntDef; +import androidx.annotation.NonNull; + @SuppressWarnings("WeakerAccess") public abstract class Views { diff --git a/app/src/main/java/io/noties/markwon/app/gif/GifAwareAsyncDrawable.java b/app/src/main/java/io/noties/markwon/app/gif/GifAwareAsyncDrawable.java index 553bcd90..58c0bad3 100644 --- a/app/src/main/java/io/noties/markwon/app/gif/GifAwareAsyncDrawable.java +++ b/app/src/main/java/io/noties/markwon/app/gif/GifAwareAsyncDrawable.java @@ -2,8 +2,9 @@ package io.noties.markwon.app.gif; import android.graphics.Canvas; import android.graphics.drawable.Drawable; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; + +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import io.noties.markwon.image.AsyncDrawable; import io.noties.markwon.image.AsyncDrawableLoader; diff --git a/app/src/main/java/io/noties/markwon/app/gif/GifAwarePlugin.java b/app/src/main/java/io/noties/markwon/app/gif/GifAwarePlugin.java index ad5ab813..30b33f5b 100644 --- a/app/src/main/java/io/noties/markwon/app/gif/GifAwarePlugin.java +++ b/app/src/main/java/io/noties/markwon/app/gif/GifAwarePlugin.java @@ -1,9 +1,10 @@ package io.noties.markwon.app.gif; import android.content.Context; -import android.support.annotation.NonNull; import android.widget.TextView; +import androidx.annotation.NonNull; + import org.commonmark.node.Image; import io.noties.markwon.AbstractMarkwonPlugin; diff --git a/app/src/main/java/io/noties/markwon/app/gif/GifPlaceholder.java b/app/src/main/java/io/noties/markwon/app/gif/GifPlaceholder.java index 326d1b22..8417545b 100644 --- a/app/src/main/java/io/noties/markwon/app/gif/GifPlaceholder.java +++ b/app/src/main/java/io/noties/markwon/app/gif/GifPlaceholder.java @@ -6,9 +6,10 @@ import android.graphics.Paint; import android.graphics.PixelFormat; import android.graphics.Rect; import android.graphics.drawable.Drawable; -import android.support.annotation.ColorInt; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; + +import androidx.annotation.ColorInt; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; public class GifPlaceholder extends Drawable { diff --git a/app/src/main/java/io/noties/markwon/app/gif/GifProcessor.java b/app/src/main/java/io/noties/markwon/app/gif/GifProcessor.java index 266c5a03..59d4dfef 100644 --- a/app/src/main/java/io/noties/markwon/app/gif/GifProcessor.java +++ b/app/src/main/java/io/noties/markwon/app/gif/GifProcessor.java @@ -1,13 +1,14 @@ package io.noties.markwon.app.gif; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; import android.text.Spannable; import android.text.Spanned; import android.text.style.ClickableSpan; import android.view.View; import android.widget.TextView; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; + import io.noties.markwon.image.AsyncDrawableSpan; import pl.droidsonroids.gif.GifDrawable; diff --git a/build.gradle b/build.gradle index daec9a93..157757aa 100644 --- a/build.gradle +++ b/build.gradle @@ -53,14 +53,12 @@ ext { 'push-aar-gradle': 'https://raw.githubusercontent.com/noties/gradle-mvn-push/master/gradle-mvn-push-aar.gradle' ] - final def supportVersion = '28.0.0' final def commonMarkVersion = '0.12.1' final def daggerVersion = '2.10' deps = [ - 'support-annotations' : "com.android.support:support-annotations:$supportVersion", - 'support-app-compat' : "com.android.support:appcompat-v7:$supportVersion", - 'support-recycler-view' : "com.android.support:recyclerview-v7:$supportVersion", + 'x-annotations' : 'androidx.annotation:annotation:1.1.0', + 'x-recycler-view' : 'androidx.recyclerview:recyclerview:1.0.0', 'commonmark' : "com.atlassian.commonmark:commonmark:$commonMarkVersion", 'commonmark-strikethrough': "com.atlassian.commonmark:commonmark-ext-gfm-strikethrough:$commonMarkVersion", 'commonmark-table' : "com.atlassian.commonmark:commonmark-ext-gfm-tables:$commonMarkVersion", @@ -68,7 +66,7 @@ ext { 'android-gif' : 'pl.droidsonroids.gif:android-gif-drawable:1.2.14', 'jlatexmath-android' : 'ru.noties:jlatexmath-android:0.1.0', 'okhttp' : 'com.squareup.okhttp3:okhttp:3.9.0', - 'prism4j' : 'ru.noties:prism4j:1.1.0', + 'prism4j' : 'io.noties:prism4j:2.0.0', 'debug' : 'io.noties:debug:5.0.0@jar', 'adapt' : 'io.noties:adapt:2.0.0', 'dagger' : "com.google.dagger:dagger:$daggerVersion", @@ -77,7 +75,7 @@ ext { ] deps['annotationProcessor'] = [ - 'prism4j-bundler': 'ru.noties:prism4j-bundler:1.1.0', + 'prism4j-bundler': 'io.noties:prism4j-bundler:2.0.0', 'dagger-compiler': "com.google.dagger:dagger-compiler:$daggerVersion" ] diff --git a/gradle.properties b/gradle.properties index 59be8bf9..2642f708 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,6 +3,8 @@ org.gradle.jvmargs=-Xmx5g -Dfile.encoding=UTF-8 #org.gradle.parallel=true org.gradle.configureondemand=true +android.useAndroidX=true +android.enableJetifier=true android.enableBuildCache=true android.buildCacheDir=build/pre-dex-cache diff --git a/markwon-core/build.gradle b/markwon-core/build.gradle index 0f6f15db..946d760e 100644 --- a/markwon-core/build.gradle +++ b/markwon-core/build.gradle @@ -16,7 +16,7 @@ android { dependencies { deps.with { - api it['support-annotations'] + api it['x-annotations'] api it['commonmark'] } diff --git a/markwon-core/src/main/java/io/noties/markwon/AbstractMarkwonPlugin.java b/markwon-core/src/main/java/io/noties/markwon/AbstractMarkwonPlugin.java index d7d9f744..65db542a 100644 --- a/markwon-core/src/main/java/io/noties/markwon/AbstractMarkwonPlugin.java +++ b/markwon-core/src/main/java/io/noties/markwon/AbstractMarkwonPlugin.java @@ -1,9 +1,10 @@ package io.noties.markwon; -import android.support.annotation.NonNull; import android.text.Spanned; import android.widget.TextView; +import androidx.annotation.NonNull; + import org.commonmark.node.Node; import org.commonmark.parser.Parser; diff --git a/markwon-core/src/main/java/io/noties/markwon/LinkResolverDef.java b/markwon-core/src/main/java/io/noties/markwon/LinkResolverDef.java index da08c9fc..0b9e30fb 100644 --- a/markwon-core/src/main/java/io/noties/markwon/LinkResolverDef.java +++ b/markwon-core/src/main/java/io/noties/markwon/LinkResolverDef.java @@ -5,10 +5,11 @@ import android.content.Context; import android.content.Intent; import android.net.Uri; import android.provider.Browser; -import android.support.annotation.NonNull; import android.util.Log; import android.view.View; +import androidx.annotation.NonNull; + import io.noties.markwon.core.spans.LinkSpan; public class LinkResolverDef implements LinkSpan.Resolver { diff --git a/markwon-core/src/main/java/io/noties/markwon/Markwon.java b/markwon-core/src/main/java/io/noties/markwon/Markwon.java index 6f7af7bf..1f3896ce 100644 --- a/markwon-core/src/main/java/io/noties/markwon/Markwon.java +++ b/markwon-core/src/main/java/io/noties/markwon/Markwon.java @@ -1,11 +1,12 @@ package io.noties.markwon; import android.content.Context; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; import android.text.Spanned; import android.widget.TextView; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; + import org.commonmark.node.Node; import io.noties.markwon.core.CorePlugin; diff --git a/markwon-core/src/main/java/io/noties/markwon/MarkwonBuilderImpl.java b/markwon-core/src/main/java/io/noties/markwon/MarkwonBuilderImpl.java index 4362fbfc..38ad7573 100644 --- a/markwon-core/src/main/java/io/noties/markwon/MarkwonBuilderImpl.java +++ b/markwon-core/src/main/java/io/noties/markwon/MarkwonBuilderImpl.java @@ -1,9 +1,10 @@ package io.noties.markwon; import android.content.Context; -import android.support.annotation.NonNull; import android.widget.TextView; +import androidx.annotation.NonNull; + import org.commonmark.parser.Parser; import java.util.ArrayList; diff --git a/markwon-core/src/main/java/io/noties/markwon/MarkwonConfiguration.java b/markwon-core/src/main/java/io/noties/markwon/MarkwonConfiguration.java index a544ef6e..c7f0f04d 100644 --- a/markwon-core/src/main/java/io/noties/markwon/MarkwonConfiguration.java +++ b/markwon-core/src/main/java/io/noties/markwon/MarkwonConfiguration.java @@ -1,6 +1,6 @@ package io.noties.markwon; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import io.noties.markwon.core.MarkwonTheme; import io.noties.markwon.core.spans.LinkSpan; diff --git a/markwon-core/src/main/java/io/noties/markwon/MarkwonImpl.java b/markwon-core/src/main/java/io/noties/markwon/MarkwonImpl.java index d76925ae..199beb0b 100644 --- a/markwon-core/src/main/java/io/noties/markwon/MarkwonImpl.java +++ b/markwon-core/src/main/java/io/noties/markwon/MarkwonImpl.java @@ -1,10 +1,11 @@ package io.noties.markwon; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; import android.text.Spanned; import android.widget.TextView; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; + import org.commonmark.node.Node; import org.commonmark.parser.Parser; diff --git a/markwon-core/src/main/java/io/noties/markwon/MarkwonNodeRenderer.java b/markwon-core/src/main/java/io/noties/markwon/MarkwonNodeRenderer.java deleted file mode 100644 index 7038a620..00000000 --- a/markwon-core/src/main/java/io/noties/markwon/MarkwonNodeRenderer.java +++ /dev/null @@ -1,184 +0,0 @@ -package io.noties.markwon; - -import android.content.Context; -import android.support.annotation.IdRes; -import android.support.annotation.LayoutRes; -import android.support.annotation.NonNull; -import android.view.LayoutInflater; -import android.view.View; -import android.view.ViewGroup; -import android.widget.TextView; - -import org.commonmark.node.Node; - -import java.util.HashMap; -import java.util.Map; - -/** - * @since 3.0.0 - */ -public abstract class MarkwonNodeRenderer { - - public interface ViewProvider { - - /** - * Please note that you should not attach created View to specified group. It will be done - * automatically. - */ - @NonNull - View provide( - @NonNull LayoutInflater inflater, - @NonNull ViewGroup group, - @NonNull Markwon markwon, - @NonNull N n); - } - - @NonNull - public static Builder builder(@NonNull ViewProvider defaultViewProvider) { - return new Builder(defaultViewProvider); - } - - /** - * @param defaultViewProviderLayoutResId layout resource id to be used in default view provider - * @param defaultViewProviderTextViewId id of a TextView in specified layout - * @return Builder - * @see SimpleTextViewProvider - */ - @NonNull - public static Builder builder( - @LayoutRes int defaultViewProviderLayoutResId, - @IdRes int defaultViewProviderTextViewId) { - return new Builder(new SimpleTextViewProvider( - defaultViewProviderLayoutResId, - defaultViewProviderTextViewId)); - } - - public abstract void render(@NonNull ViewGroup group, @NonNull Markwon markwon, @NonNull String markdown); - - public abstract void render(@NonNull ViewGroup group, @NonNull Markwon markwon, @NonNull Node root); - - - public static class Builder { - - private final ViewProvider defaultViewProvider; - - private MarkwonReducer reducer; - private Map, ViewProvider> viewProviders; - private LayoutInflater inflater; - - public Builder(@NonNull ViewProvider defaultViewProvider) { - this.defaultViewProvider = defaultViewProvider; - this.viewProviders = new HashMap<>(3); - } - - @NonNull - public Builder reducer(@NonNull MarkwonReducer reducer) { - this.reducer = reducer; - return this; - } - - @NonNull - public Builder viewProvider( - @NonNull Class type, - @NonNull ViewProvider viewProvider) { - //noinspection unchecked - viewProviders.put(type, (ViewProvider) viewProvider); - return this; - } - - @NonNull - public Builder inflater(@NonNull LayoutInflater inflater) { - this.inflater = inflater; - return this; - } - - @NonNull - public MarkwonNodeRenderer build() { - if (reducer == null) { - reducer = MarkwonReducer.directChildren(); - } - return new Impl(this); - } - } - - public static class SimpleTextViewProvider implements ViewProvider { - - private final int layoutResId; - private final int textViewId; - - public SimpleTextViewProvider(@LayoutRes int layoutResId, @IdRes int textViewId) { - this.layoutResId = layoutResId; - this.textViewId = textViewId; - } - - @NonNull - @Override - public View provide( - @NonNull LayoutInflater inflater, - @NonNull ViewGroup group, - @NonNull Markwon markwon, - @NonNull Node node) { - final View view = inflater.inflate(layoutResId, group, false); - final TextView textView = view.findViewById(textViewId); - markwon.setParsedMarkdown(textView, markwon.render(node)); - return view; - } - } - - static class Impl extends MarkwonNodeRenderer { - - private final MarkwonReducer reducer; - private final Map, ViewProvider> viewProviders; - private final ViewProvider defaultViewProvider; - - private LayoutInflater inflater; - - Impl(@NonNull Builder builder) { - this.reducer = builder.reducer; - this.viewProviders = builder.viewProviders; - this.defaultViewProvider = builder.defaultViewProvider; - this.inflater = builder.inflater; - } - - @Override - public void render(@NonNull ViewGroup group, @NonNull Markwon markwon, @NonNull String markdown) { - render(group, markwon, markwon.parse(markdown)); - } - - @Override - public void render(@NonNull ViewGroup group, @NonNull Markwon markwon, @NonNull Node root) { - - final LayoutInflater inflater = ensureLayoutInflater(group.getContext()); - - ViewProvider viewProvider; - - for (Node node : reducer.reduce(root)) { - viewProvider = viewProvider(node); - group.addView(viewProvider.provide(inflater, group, markwon, node)); - } - } - - @NonNull - private LayoutInflater ensureLayoutInflater(@NonNull Context context) { - LayoutInflater inflater = this.inflater; - if (inflater == null) { - inflater = this.inflater = LayoutInflater.from(context); - } - return inflater; - } - - @NonNull - private ViewProvider viewProvider(@NonNull Node node) { - - // check for specific node view provider - final ViewProvider provider = viewProviders.get(node.getClass()); - if (provider != null) { - return provider; - } - - // if it's not present, then we can return a default one - return defaultViewProvider; - } - } - -} diff --git a/markwon-core/src/main/java/io/noties/markwon/MarkwonPlugin.java b/markwon-core/src/main/java/io/noties/markwon/MarkwonPlugin.java index f84ab62a..a916540a 100644 --- a/markwon-core/src/main/java/io/noties/markwon/MarkwonPlugin.java +++ b/markwon-core/src/main/java/io/noties/markwon/MarkwonPlugin.java @@ -1,9 +1,10 @@ package io.noties.markwon; -import android.support.annotation.NonNull; import android.text.Spanned; import android.widget.TextView; +import androidx.annotation.NonNull; + import org.commonmark.node.Node; import org.commonmark.parser.Parser; 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 82a61963..c54f8c2d 100644 --- a/markwon-core/src/main/java/io/noties/markwon/MarkwonReducer.java +++ b/markwon-core/src/main/java/io/noties/markwon/MarkwonReducer.java @@ -1,6 +1,6 @@ package io.noties.markwon; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import org.commonmark.node.Node; diff --git a/markwon-core/src/main/java/io/noties/markwon/MarkwonSpansFactory.java b/markwon-core/src/main/java/io/noties/markwon/MarkwonSpansFactory.java index 2dd6b156..c4153075 100644 --- a/markwon-core/src/main/java/io/noties/markwon/MarkwonSpansFactory.java +++ b/markwon-core/src/main/java/io/noties/markwon/MarkwonSpansFactory.java @@ -1,7 +1,7 @@ package io.noties.markwon; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import org.commonmark.node.Node; diff --git a/markwon-core/src/main/java/io/noties/markwon/MarkwonSpansFactoryImpl.java b/markwon-core/src/main/java/io/noties/markwon/MarkwonSpansFactoryImpl.java index 66c3823d..ab2c1f84 100644 --- a/markwon-core/src/main/java/io/noties/markwon/MarkwonSpansFactoryImpl.java +++ b/markwon-core/src/main/java/io/noties/markwon/MarkwonSpansFactoryImpl.java @@ -1,7 +1,7 @@ package io.noties.markwon; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import org.commonmark.node.Node; diff --git a/markwon-core/src/main/java/io/noties/markwon/MarkwonVisitor.java b/markwon-core/src/main/java/io/noties/markwon/MarkwonVisitor.java index b2dd95c2..9fd6ffc7 100644 --- a/markwon-core/src/main/java/io/noties/markwon/MarkwonVisitor.java +++ b/markwon-core/src/main/java/io/noties/markwon/MarkwonVisitor.java @@ -1,7 +1,7 @@ package io.noties.markwon; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import org.commonmark.node.Node; import org.commonmark.node.Visitor; diff --git a/markwon-core/src/main/java/io/noties/markwon/MarkwonVisitorImpl.java b/markwon-core/src/main/java/io/noties/markwon/MarkwonVisitorImpl.java index f443bcd4..42db74ac 100644 --- a/markwon-core/src/main/java/io/noties/markwon/MarkwonVisitorImpl.java +++ b/markwon-core/src/main/java/io/noties/markwon/MarkwonVisitorImpl.java @@ -1,7 +1,7 @@ package io.noties.markwon; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import org.commonmark.node.BlockQuote; import org.commonmark.node.BulletList; diff --git a/markwon-core/src/main/java/io/noties/markwon/Prop.java b/markwon-core/src/main/java/io/noties/markwon/Prop.java index 552a4340..bc87c2f2 100644 --- a/markwon-core/src/main/java/io/noties/markwon/Prop.java +++ b/markwon-core/src/main/java/io/noties/markwon/Prop.java @@ -1,7 +1,7 @@ package io.noties.markwon; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; /** * Class to hold data in {@link RenderProps}. Represents a certain property. diff --git a/markwon-core/src/main/java/io/noties/markwon/RegistryImpl.java b/markwon-core/src/main/java/io/noties/markwon/RegistryImpl.java index 17a85dc8..76805be8 100644 --- a/markwon-core/src/main/java/io/noties/markwon/RegistryImpl.java +++ b/markwon-core/src/main/java/io/noties/markwon/RegistryImpl.java @@ -1,7 +1,7 @@ package io.noties.markwon; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import java.util.ArrayList; import java.util.HashSet; @@ -13,8 +13,6 @@ import io.noties.markwon.core.CorePlugin; // @since 4.0.0-SNAPSHOT class RegistryImpl implements MarkwonPlugin.Registry { - // todo: core-plugin must be (better be) first any way - private final List origin; private final List plugins; private final Set pending; diff --git a/markwon-core/src/main/java/io/noties/markwon/RenderProps.java b/markwon-core/src/main/java/io/noties/markwon/RenderProps.java index 61442969..b7b0a4e2 100644 --- a/markwon-core/src/main/java/io/noties/markwon/RenderProps.java +++ b/markwon-core/src/main/java/io/noties/markwon/RenderProps.java @@ -1,7 +1,7 @@ package io.noties.markwon; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; /** * @since 3.0.0 diff --git a/markwon-core/src/main/java/io/noties/markwon/RenderPropsImpl.java b/markwon-core/src/main/java/io/noties/markwon/RenderPropsImpl.java index 9b0fc241..e400e528 100644 --- a/markwon-core/src/main/java/io/noties/markwon/RenderPropsImpl.java +++ b/markwon-core/src/main/java/io/noties/markwon/RenderPropsImpl.java @@ -1,7 +1,7 @@ package io.noties.markwon; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import java.util.HashMap; import java.util.Map; diff --git a/markwon-core/src/main/java/io/noties/markwon/SpanFactory.java b/markwon-core/src/main/java/io/noties/markwon/SpanFactory.java index 6a90a533..a9f7418b 100644 --- a/markwon-core/src/main/java/io/noties/markwon/SpanFactory.java +++ b/markwon-core/src/main/java/io/noties/markwon/SpanFactory.java @@ -1,7 +1,7 @@ package io.noties.markwon; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; /** * @since 3.0.0 diff --git a/markwon-core/src/main/java/io/noties/markwon/SpannableBuilder.java b/markwon-core/src/main/java/io/noties/markwon/SpannableBuilder.java index a9f3a48d..6a15a9a8 100644 --- a/markwon-core/src/main/java/io/noties/markwon/SpannableBuilder.java +++ b/markwon-core/src/main/java/io/noties/markwon/SpannableBuilder.java @@ -1,11 +1,12 @@ package io.noties.markwon; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.annotation.VisibleForTesting; import android.text.SpannableStringBuilder; import android.text.Spanned; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.annotation.VisibleForTesting; + import java.util.ArrayDeque; import java.util.ArrayList; import java.util.Collections; 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 2604ecdc..084fb0d2 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 @@ -1,12 +1,13 @@ package io.noties.markwon.core; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.annotation.VisibleForTesting; import android.text.Spanned; import android.text.method.LinkMovementMethod; import android.widget.TextView; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.annotation.VisibleForTesting; + import org.commonmark.node.BlockQuote; import org.commonmark.node.BulletList; import org.commonmark.node.Code; @@ -30,15 +31,13 @@ import org.commonmark.node.ThematicBreak; import java.util.ArrayList; import java.util.List; -import io.noties.markwon.SpannableBuilder; -import io.noties.markwon.core.spans.OrderedListItemSpan; -import io.noties.markwon.image.ImageProps; import io.noties.markwon.AbstractMarkwonPlugin; import io.noties.markwon.MarkwonConfiguration; import io.noties.markwon.MarkwonSpansFactory; import io.noties.markwon.MarkwonVisitor; import io.noties.markwon.RenderProps; import io.noties.markwon.SpanFactory; +import io.noties.markwon.SpannableBuilder; import io.noties.markwon.core.factory.BlockQuoteSpanFactory; import io.noties.markwon.core.factory.CodeBlockSpanFactory; import io.noties.markwon.core.factory.CodeSpanFactory; @@ -48,6 +47,8 @@ import io.noties.markwon.core.factory.LinkSpanFactory; import io.noties.markwon.core.factory.ListItemSpanFactory; import io.noties.markwon.core.factory.StrongEmphasisSpanFactory; import io.noties.markwon.core.factory.ThematicBreakSpanFactory; +import io.noties.markwon.core.spans.OrderedListItemSpan; +import io.noties.markwon.image.ImageProps; /** * @see CoreProps 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 8a9dcee6..7c8142de 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 @@ -3,13 +3,14 @@ package io.noties.markwon.core; import android.content.Context; import android.graphics.Paint; import android.graphics.Typeface; -import android.support.annotation.ColorInt; -import android.support.annotation.IntRange; -import android.support.annotation.NonNull; -import android.support.annotation.Px; -import android.support.annotation.Size; import android.text.TextPaint; +import androidx.annotation.ColorInt; +import androidx.annotation.IntRange; +import androidx.annotation.NonNull; +import androidx.annotation.Px; +import androidx.annotation.Size; + import java.util.Arrays; import java.util.Locale; diff --git a/markwon-core/src/main/java/io/noties/markwon/core/SimpleBlockNodeVisitor.java b/markwon-core/src/main/java/io/noties/markwon/core/SimpleBlockNodeVisitor.java index 03ffaeff..91742773 100644 --- a/markwon-core/src/main/java/io/noties/markwon/core/SimpleBlockNodeVisitor.java +++ b/markwon-core/src/main/java/io/noties/markwon/core/SimpleBlockNodeVisitor.java @@ -1,6 +1,6 @@ package io.noties.markwon.core; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import org.commonmark.node.Node; diff --git a/markwon-core/src/main/java/io/noties/markwon/core/factory/BlockQuoteSpanFactory.java b/markwon-core/src/main/java/io/noties/markwon/core/factory/BlockQuoteSpanFactory.java index 30fa2853..4541169c 100644 --- a/markwon-core/src/main/java/io/noties/markwon/core/factory/BlockQuoteSpanFactory.java +++ b/markwon-core/src/main/java/io/noties/markwon/core/factory/BlockQuoteSpanFactory.java @@ -1,12 +1,12 @@ package io.noties.markwon.core.factory; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; -import io.noties.markwon.core.spans.BlockQuoteSpan; import io.noties.markwon.MarkwonConfiguration; import io.noties.markwon.RenderProps; import io.noties.markwon.SpanFactory; +import io.noties.markwon.core.spans.BlockQuoteSpan; public class BlockQuoteSpanFactory implements SpanFactory { @Nullable diff --git a/markwon-core/src/main/java/io/noties/markwon/core/factory/CodeBlockSpanFactory.java b/markwon-core/src/main/java/io/noties/markwon/core/factory/CodeBlockSpanFactory.java index 352a0e1f..656b1ade 100644 --- a/markwon-core/src/main/java/io/noties/markwon/core/factory/CodeBlockSpanFactory.java +++ b/markwon-core/src/main/java/io/noties/markwon/core/factory/CodeBlockSpanFactory.java @@ -1,12 +1,12 @@ package io.noties.markwon.core.factory; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; -import io.noties.markwon.core.spans.CodeBlockSpan; import io.noties.markwon.MarkwonConfiguration; import io.noties.markwon.RenderProps; import io.noties.markwon.SpanFactory; +import io.noties.markwon.core.spans.CodeBlockSpan; public class CodeBlockSpanFactory implements SpanFactory { @Nullable diff --git a/markwon-core/src/main/java/io/noties/markwon/core/factory/CodeSpanFactory.java b/markwon-core/src/main/java/io/noties/markwon/core/factory/CodeSpanFactory.java index 9c4f0aef..6c3615b1 100644 --- a/markwon-core/src/main/java/io/noties/markwon/core/factory/CodeSpanFactory.java +++ b/markwon-core/src/main/java/io/noties/markwon/core/factory/CodeSpanFactory.java @@ -1,12 +1,12 @@ package io.noties.markwon.core.factory; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; -import io.noties.markwon.core.spans.CodeSpan; import io.noties.markwon.MarkwonConfiguration; import io.noties.markwon.RenderProps; import io.noties.markwon.SpanFactory; +import io.noties.markwon.core.spans.CodeSpan; public class CodeSpanFactory implements SpanFactory { @Nullable diff --git a/markwon-core/src/main/java/io/noties/markwon/core/factory/EmphasisSpanFactory.java b/markwon-core/src/main/java/io/noties/markwon/core/factory/EmphasisSpanFactory.java index 3942b8b1..9ea0c609 100644 --- a/markwon-core/src/main/java/io/noties/markwon/core/factory/EmphasisSpanFactory.java +++ b/markwon-core/src/main/java/io/noties/markwon/core/factory/EmphasisSpanFactory.java @@ -1,12 +1,12 @@ package io.noties.markwon.core.factory; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; -import io.noties.markwon.core.spans.EmphasisSpan; import io.noties.markwon.MarkwonConfiguration; import io.noties.markwon.RenderProps; import io.noties.markwon.SpanFactory; +import io.noties.markwon.core.spans.EmphasisSpan; public class EmphasisSpanFactory implements SpanFactory { @Nullable diff --git a/markwon-core/src/main/java/io/noties/markwon/core/factory/HeadingSpanFactory.java b/markwon-core/src/main/java/io/noties/markwon/core/factory/HeadingSpanFactory.java index f96ab110..d0f7df78 100644 --- a/markwon-core/src/main/java/io/noties/markwon/core/factory/HeadingSpanFactory.java +++ b/markwon-core/src/main/java/io/noties/markwon/core/factory/HeadingSpanFactory.java @@ -1,13 +1,13 @@ package io.noties.markwon.core.factory; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; -import io.noties.markwon.core.CoreProps; -import io.noties.markwon.core.spans.HeadingSpan; import io.noties.markwon.MarkwonConfiguration; import io.noties.markwon.RenderProps; import io.noties.markwon.SpanFactory; +import io.noties.markwon.core.CoreProps; +import io.noties.markwon.core.spans.HeadingSpan; public class HeadingSpanFactory implements SpanFactory { @Nullable diff --git a/markwon-core/src/main/java/io/noties/markwon/core/factory/LinkSpanFactory.java b/markwon-core/src/main/java/io/noties/markwon/core/factory/LinkSpanFactory.java index 345e4e15..fe93ef77 100644 --- a/markwon-core/src/main/java/io/noties/markwon/core/factory/LinkSpanFactory.java +++ b/markwon-core/src/main/java/io/noties/markwon/core/factory/LinkSpanFactory.java @@ -1,13 +1,13 @@ package io.noties.markwon.core.factory; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; -import io.noties.markwon.core.CoreProps; -import io.noties.markwon.core.spans.LinkSpan; import io.noties.markwon.MarkwonConfiguration; import io.noties.markwon.RenderProps; import io.noties.markwon.SpanFactory; +import io.noties.markwon.core.CoreProps; +import io.noties.markwon.core.spans.LinkSpan; public class LinkSpanFactory implements SpanFactory { @Nullable diff --git a/markwon-core/src/main/java/io/noties/markwon/core/factory/ListItemSpanFactory.java b/markwon-core/src/main/java/io/noties/markwon/core/factory/ListItemSpanFactory.java index fd55e9a4..24cac063 100644 --- a/markwon-core/src/main/java/io/noties/markwon/core/factory/ListItemSpanFactory.java +++ b/markwon-core/src/main/java/io/noties/markwon/core/factory/ListItemSpanFactory.java @@ -1,14 +1,14 @@ package io.noties.markwon.core.factory; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; -import io.noties.markwon.core.CoreProps; -import io.noties.markwon.core.spans.BulletListItemSpan; -import io.noties.markwon.core.spans.OrderedListItemSpan; import io.noties.markwon.MarkwonConfiguration; import io.noties.markwon.RenderProps; import io.noties.markwon.SpanFactory; +import io.noties.markwon.core.CoreProps; +import io.noties.markwon.core.spans.BulletListItemSpan; +import io.noties.markwon.core.spans.OrderedListItemSpan; public class ListItemSpanFactory implements SpanFactory { diff --git a/markwon-core/src/main/java/io/noties/markwon/core/factory/StrongEmphasisSpanFactory.java b/markwon-core/src/main/java/io/noties/markwon/core/factory/StrongEmphasisSpanFactory.java index 029d3d25..46cadf17 100644 --- a/markwon-core/src/main/java/io/noties/markwon/core/factory/StrongEmphasisSpanFactory.java +++ b/markwon-core/src/main/java/io/noties/markwon/core/factory/StrongEmphasisSpanFactory.java @@ -1,12 +1,12 @@ package io.noties.markwon.core.factory; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; -import io.noties.markwon.core.spans.StrongEmphasisSpan; import io.noties.markwon.MarkwonConfiguration; import io.noties.markwon.RenderProps; import io.noties.markwon.SpanFactory; +import io.noties.markwon.core.spans.StrongEmphasisSpan; public class StrongEmphasisSpanFactory implements SpanFactory { @Nullable diff --git a/markwon-core/src/main/java/io/noties/markwon/core/factory/ThematicBreakSpanFactory.java b/markwon-core/src/main/java/io/noties/markwon/core/factory/ThematicBreakSpanFactory.java index 6f5659fc..2b141a38 100644 --- a/markwon-core/src/main/java/io/noties/markwon/core/factory/ThematicBreakSpanFactory.java +++ b/markwon-core/src/main/java/io/noties/markwon/core/factory/ThematicBreakSpanFactory.java @@ -1,12 +1,12 @@ package io.noties.markwon.core.factory; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; -import io.noties.markwon.core.spans.ThematicBreakSpan; import io.noties.markwon.MarkwonConfiguration; import io.noties.markwon.RenderProps; import io.noties.markwon.SpanFactory; +import io.noties.markwon.core.spans.ThematicBreakSpan; public class ThematicBreakSpanFactory implements SpanFactory { @Nullable diff --git a/markwon-core/src/main/java/io/noties/markwon/core/spans/BlockQuoteSpan.java b/markwon-core/src/main/java/io/noties/markwon/core/spans/BlockQuoteSpan.java index 0a7c7615..9f649d55 100644 --- a/markwon-core/src/main/java/io/noties/markwon/core/spans/BlockQuoteSpan.java +++ b/markwon-core/src/main/java/io/noties/markwon/core/spans/BlockQuoteSpan.java @@ -3,10 +3,11 @@ package io.noties.markwon.core.spans; import android.graphics.Canvas; import android.graphics.Paint; import android.graphics.Rect; -import android.support.annotation.NonNull; import android.text.Layout; import android.text.style.LeadingMarginSpan; +import androidx.annotation.NonNull; + import io.noties.markwon.core.MarkwonTheme; public class BlockQuoteSpan implements LeadingMarginSpan { diff --git a/markwon-core/src/main/java/io/noties/markwon/core/spans/BulletListItemSpan.java b/markwon-core/src/main/java/io/noties/markwon/core/spans/BulletListItemSpan.java index 59681b5a..6d8da746 100644 --- a/markwon-core/src/main/java/io/noties/markwon/core/spans/BulletListItemSpan.java +++ b/markwon-core/src/main/java/io/noties/markwon/core/spans/BulletListItemSpan.java @@ -4,11 +4,12 @@ import android.graphics.Canvas; import android.graphics.Paint; import android.graphics.Rect; import android.graphics.RectF; -import android.support.annotation.IntRange; -import android.support.annotation.NonNull; import android.text.Layout; import android.text.style.LeadingMarginSpan; +import androidx.annotation.IntRange; +import androidx.annotation.NonNull; + import io.noties.markwon.core.MarkwonTheme; import io.noties.markwon.utils.LeadingMarginUtils; diff --git a/markwon-core/src/main/java/io/noties/markwon/core/spans/CodeBlockSpan.java b/markwon-core/src/main/java/io/noties/markwon/core/spans/CodeBlockSpan.java index 24626f12..c358a27e 100644 --- a/markwon-core/src/main/java/io/noties/markwon/core/spans/CodeBlockSpan.java +++ b/markwon-core/src/main/java/io/noties/markwon/core/spans/CodeBlockSpan.java @@ -3,12 +3,13 @@ package io.noties.markwon.core.spans; import android.graphics.Canvas; import android.graphics.Paint; import android.graphics.Rect; -import android.support.annotation.NonNull; import android.text.Layout; import android.text.TextPaint; import android.text.style.LeadingMarginSpan; import android.text.style.MetricAffectingSpan; +import androidx.annotation.NonNull; + import io.noties.markwon.core.MarkwonTheme; /** diff --git a/markwon-core/src/main/java/io/noties/markwon/core/spans/CodeSpan.java b/markwon-core/src/main/java/io/noties/markwon/core/spans/CodeSpan.java index 8e2b1051..455fe34b 100644 --- a/markwon-core/src/main/java/io/noties/markwon/core/spans/CodeSpan.java +++ b/markwon-core/src/main/java/io/noties/markwon/core/spans/CodeSpan.java @@ -1,9 +1,10 @@ package io.noties.markwon.core.spans; -import android.support.annotation.NonNull; import android.text.TextPaint; import android.text.style.MetricAffectingSpan; +import androidx.annotation.NonNull; + import io.noties.markwon.core.MarkwonTheme; /** diff --git a/markwon-core/src/main/java/io/noties/markwon/core/spans/CustomTypefaceSpan.java b/markwon-core/src/main/java/io/noties/markwon/core/spans/CustomTypefaceSpan.java index 083c35f7..b12a80d6 100644 --- a/markwon-core/src/main/java/io/noties/markwon/core/spans/CustomTypefaceSpan.java +++ b/markwon-core/src/main/java/io/noties/markwon/core/spans/CustomTypefaceSpan.java @@ -1,10 +1,11 @@ package io.noties.markwon.core.spans; import android.graphics.Typeface; -import android.support.annotation.NonNull; import android.text.TextPaint; import android.text.style.MetricAffectingSpan; +import androidx.annotation.NonNull; + /** * A span implementation that allow applying custom Typeface. Although it is * not used directly by the library, it\'s helpful for customizations. diff --git a/markwon-core/src/main/java/io/noties/markwon/core/spans/HeadingSpan.java b/markwon-core/src/main/java/io/noties/markwon/core/spans/HeadingSpan.java index 9d4e8e72..cb723a30 100644 --- a/markwon-core/src/main/java/io/noties/markwon/core/spans/HeadingSpan.java +++ b/markwon-core/src/main/java/io/noties/markwon/core/spans/HeadingSpan.java @@ -3,13 +3,14 @@ package io.noties.markwon.core.spans; import android.graphics.Canvas; import android.graphics.Paint; import android.graphics.Rect; -import android.support.annotation.IntRange; -import android.support.annotation.NonNull; import android.text.Layout; import android.text.TextPaint; import android.text.style.LeadingMarginSpan; import android.text.style.MetricAffectingSpan; +import androidx.annotation.IntRange; +import androidx.annotation.NonNull; + import io.noties.markwon.core.MarkwonTheme; import io.noties.markwon.utils.LeadingMarginUtils; diff --git a/markwon-core/src/main/java/io/noties/markwon/core/spans/LinkSpan.java b/markwon-core/src/main/java/io/noties/markwon/core/spans/LinkSpan.java index 32108b0c..4bcbfd11 100644 --- a/markwon-core/src/main/java/io/noties/markwon/core/spans/LinkSpan.java +++ b/markwon-core/src/main/java/io/noties/markwon/core/spans/LinkSpan.java @@ -1,10 +1,11 @@ package io.noties.markwon.core.spans; -import android.support.annotation.NonNull; import android.text.TextPaint; import android.text.style.URLSpan; import android.view.View; +import androidx.annotation.NonNull; + import io.noties.markwon.core.MarkwonTheme; public class LinkSpan extends URLSpan { diff --git a/markwon-core/src/main/java/io/noties/markwon/core/spans/OrderedListItemSpan.java b/markwon-core/src/main/java/io/noties/markwon/core/spans/OrderedListItemSpan.java index 0109c14c..abcd3287 100644 --- a/markwon-core/src/main/java/io/noties/markwon/core/spans/OrderedListItemSpan.java +++ b/markwon-core/src/main/java/io/noties/markwon/core/spans/OrderedListItemSpan.java @@ -2,13 +2,14 @@ package io.noties.markwon.core.spans; import android.graphics.Canvas; import android.graphics.Paint; -import android.support.annotation.NonNull; import android.text.Layout; import android.text.Spanned; import android.text.TextPaint; import android.text.style.LeadingMarginSpan; import android.widget.TextView; +import androidx.annotation.NonNull; + import io.noties.markwon.core.MarkwonTheme; import io.noties.markwon.utils.LeadingMarginUtils; diff --git a/markwon-core/src/main/java/io/noties/markwon/core/spans/ThematicBreakSpan.java b/markwon-core/src/main/java/io/noties/markwon/core/spans/ThematicBreakSpan.java index aa3f4259..6b3bcc5c 100644 --- a/markwon-core/src/main/java/io/noties/markwon/core/spans/ThematicBreakSpan.java +++ b/markwon-core/src/main/java/io/noties/markwon/core/spans/ThematicBreakSpan.java @@ -3,10 +3,11 @@ package io.noties.markwon.core.spans; import android.graphics.Canvas; import android.graphics.Paint; import android.graphics.Rect; -import android.support.annotation.NonNull; import android.text.Layout; import android.text.style.LeadingMarginSpan; +import androidx.annotation.NonNull; + import io.noties.markwon.core.MarkwonTheme; public class ThematicBreakSpan implements LeadingMarginSpan { 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 422f4923..dfbf8d19 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 @@ -6,9 +6,10 @@ import android.graphics.PixelFormat; import android.graphics.Rect; import android.graphics.drawable.Animatable; import android.graphics.drawable.Drawable; -import android.support.annotation.IntRange; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; + +import androidx.annotation.IntRange; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; public class AsyncDrawable extends Drawable { diff --git a/markwon-core/src/main/java/io/noties/markwon/image/AsyncDrawableLoader.java b/markwon-core/src/main/java/io/noties/markwon/image/AsyncDrawableLoader.java index 3a3a7d31..75c99384 100644 --- a/markwon-core/src/main/java/io/noties/markwon/image/AsyncDrawableLoader.java +++ b/markwon-core/src/main/java/io/noties/markwon/image/AsyncDrawableLoader.java @@ -1,8 +1,9 @@ package io.noties.markwon.image; import android.graphics.drawable.Drawable; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; + +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; public abstract class AsyncDrawableLoader { diff --git a/markwon-core/src/main/java/io/noties/markwon/image/AsyncDrawableLoaderNoOp.java b/markwon-core/src/main/java/io/noties/markwon/image/AsyncDrawableLoaderNoOp.java index c7d06d7b..2c5c57d0 100644 --- a/markwon-core/src/main/java/io/noties/markwon/image/AsyncDrawableLoaderNoOp.java +++ b/markwon-core/src/main/java/io/noties/markwon/image/AsyncDrawableLoaderNoOp.java @@ -1,8 +1,9 @@ package io.noties.markwon.image; import android.graphics.drawable.Drawable; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; + +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; class AsyncDrawableLoaderNoOp extends AsyncDrawableLoader { @Override diff --git a/markwon-core/src/main/java/io/noties/markwon/image/AsyncDrawableScheduler.java b/markwon-core/src/main/java/io/noties/markwon/image/AsyncDrawableScheduler.java index 251f9937..63ad3f68 100644 --- a/markwon-core/src/main/java/io/noties/markwon/image/AsyncDrawableScheduler.java +++ b/markwon-core/src/main/java/io/noties/markwon/image/AsyncDrawableScheduler.java @@ -4,12 +4,13 @@ import android.graphics.Rect; import android.graphics.drawable.Drawable; import android.os.Looper; import android.os.SystemClock; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; import android.text.Spanned; import android.view.View; import android.widget.TextView; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; + import io.noties.markwon.R; public abstract class AsyncDrawableScheduler { diff --git a/markwon-core/src/main/java/io/noties/markwon/image/AsyncDrawableSpan.java b/markwon-core/src/main/java/io/noties/markwon/image/AsyncDrawableSpan.java index d7b7aaf7..0d70b62a 100644 --- a/markwon-core/src/main/java/io/noties/markwon/image/AsyncDrawableSpan.java +++ b/markwon-core/src/main/java/io/noties/markwon/image/AsyncDrawableSpan.java @@ -3,12 +3,13 @@ package io.noties.markwon.image; import android.graphics.Canvas; import android.graphics.Paint; import android.graphics.Rect; -import android.support.annotation.IntDef; -import android.support.annotation.IntRange; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; import android.text.style.ReplacementSpan; +import androidx.annotation.IntDef; +import androidx.annotation.IntRange; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; + import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; diff --git a/markwon-core/src/main/java/io/noties/markwon/image/DrawableUtils.java b/markwon-core/src/main/java/io/noties/markwon/image/DrawableUtils.java index 2cecf8c0..4017a669 100644 --- a/markwon-core/src/main/java/io/noties/markwon/image/DrawableUtils.java +++ b/markwon-core/src/main/java/io/noties/markwon/image/DrawableUtils.java @@ -2,8 +2,9 @@ package io.noties.markwon.image; import android.graphics.Rect; import android.graphics.drawable.Drawable; -import android.support.annotation.CheckResult; -import android.support.annotation.NonNull; + +import androidx.annotation.CheckResult; +import androidx.annotation.NonNull; /** * @since 3.0.1 diff --git a/markwon-core/src/main/java/io/noties/markwon/image/ImageSize.java b/markwon-core/src/main/java/io/noties/markwon/image/ImageSize.java index f06ec6d3..62b34292 100644 --- a/markwon-core/src/main/java/io/noties/markwon/image/ImageSize.java +++ b/markwon-core/src/main/java/io/noties/markwon/image/ImageSize.java @@ -1,6 +1,6 @@ package io.noties.markwon.image; -import android.support.annotation.Nullable; +import androidx.annotation.Nullable; /** * @since 1.0.1 diff --git a/markwon-core/src/main/java/io/noties/markwon/image/ImageSizeResolver.java b/markwon-core/src/main/java/io/noties/markwon/image/ImageSizeResolver.java index 85b5f44b..8542cac5 100644 --- a/markwon-core/src/main/java/io/noties/markwon/image/ImageSizeResolver.java +++ b/markwon-core/src/main/java/io/noties/markwon/image/ImageSizeResolver.java @@ -1,8 +1,9 @@ package io.noties.markwon.image; import android.graphics.Rect; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; + +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; /** * @since 1.0.1 diff --git a/markwon-core/src/main/java/io/noties/markwon/image/ImageSizeResolverDef.java b/markwon-core/src/main/java/io/noties/markwon/image/ImageSizeResolverDef.java index 9788b7fe..1135d271 100644 --- a/markwon-core/src/main/java/io/noties/markwon/image/ImageSizeResolverDef.java +++ b/markwon-core/src/main/java/io/noties/markwon/image/ImageSizeResolverDef.java @@ -1,8 +1,9 @@ package io.noties.markwon.image; import android.graphics.Rect; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; + +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; /** * @since 1.0.1 diff --git a/markwon-core/src/main/java/io/noties/markwon/image/ImageSpanFactory.java b/markwon-core/src/main/java/io/noties/markwon/image/ImageSpanFactory.java index df2dce06..b1e38362 100644 --- a/markwon-core/src/main/java/io/noties/markwon/image/ImageSpanFactory.java +++ b/markwon-core/src/main/java/io/noties/markwon/image/ImageSpanFactory.java @@ -1,7 +1,7 @@ package io.noties.markwon.image; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import io.noties.markwon.MarkwonConfiguration; import io.noties.markwon.RenderProps; 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 fd672783..0f9a7e10 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 @@ -1,11 +1,12 @@ package io.noties.markwon.movement; -import android.support.annotation.NonNull; import android.text.Spanned; import android.text.method.LinkMovementMethod; import android.text.method.MovementMethod; import android.widget.TextView; +import androidx.annotation.NonNull; + import io.noties.markwon.AbstractMarkwonPlugin; /** diff --git a/markwon-core/src/main/java/io/noties/markwon/syntax/SyntaxHighlight.java b/markwon-core/src/main/java/io/noties/markwon/syntax/SyntaxHighlight.java index 925fd1df..5a7dd839 100644 --- a/markwon-core/src/main/java/io/noties/markwon/syntax/SyntaxHighlight.java +++ b/markwon-core/src/main/java/io/noties/markwon/syntax/SyntaxHighlight.java @@ -1,7 +1,7 @@ package io.noties.markwon.syntax; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; @SuppressWarnings("WeakerAccess") public interface SyntaxHighlight { diff --git a/markwon-core/src/main/java/io/noties/markwon/syntax/SyntaxHighlightNoOp.java b/markwon-core/src/main/java/io/noties/markwon/syntax/SyntaxHighlightNoOp.java index e3931244..c3787bbc 100644 --- a/markwon-core/src/main/java/io/noties/markwon/syntax/SyntaxHighlightNoOp.java +++ b/markwon-core/src/main/java/io/noties/markwon/syntax/SyntaxHighlightNoOp.java @@ -1,7 +1,7 @@ package io.noties.markwon.syntax; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; public class SyntaxHighlightNoOp implements SyntaxHighlight { @NonNull diff --git a/markwon-core/src/main/java/io/noties/markwon/urlprocessor/UrlProcessor.java b/markwon-core/src/main/java/io/noties/markwon/urlprocessor/UrlProcessor.java index 03f1995d..b49585e5 100644 --- a/markwon-core/src/main/java/io/noties/markwon/urlprocessor/UrlProcessor.java +++ b/markwon-core/src/main/java/io/noties/markwon/urlprocessor/UrlProcessor.java @@ -1,6 +1,6 @@ package io.noties.markwon.urlprocessor; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; public interface UrlProcessor { @NonNull diff --git a/markwon-core/src/main/java/io/noties/markwon/urlprocessor/UrlProcessorAndroidAssets.java b/markwon-core/src/main/java/io/noties/markwon/urlprocessor/UrlProcessorAndroidAssets.java index 714f9553..bd3c74cb 100644 --- a/markwon-core/src/main/java/io/noties/markwon/urlprocessor/UrlProcessorAndroidAssets.java +++ b/markwon-core/src/main/java/io/noties/markwon/urlprocessor/UrlProcessorAndroidAssets.java @@ -1,10 +1,11 @@ package io.noties.markwon.urlprocessor; import android.net.Uri; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; import android.text.TextUtils; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; + /** * Processor that will assume that an URL without scheme points to android assets folder. * URL with a scheme will be processed by {@link #processor} (if it is specified) or returned `as-is`. diff --git a/markwon-core/src/main/java/io/noties/markwon/urlprocessor/UrlProcessorNoOp.java b/markwon-core/src/main/java/io/noties/markwon/urlprocessor/UrlProcessorNoOp.java index ba795b5e..1bc15a88 100644 --- a/markwon-core/src/main/java/io/noties/markwon/urlprocessor/UrlProcessorNoOp.java +++ b/markwon-core/src/main/java/io/noties/markwon/urlprocessor/UrlProcessorNoOp.java @@ -1,6 +1,6 @@ package io.noties.markwon.urlprocessor; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; public class UrlProcessorNoOp implements UrlProcessor { @NonNull diff --git a/markwon-core/src/main/java/io/noties/markwon/urlprocessor/UrlProcessorRelativeToAbsolute.java b/markwon-core/src/main/java/io/noties/markwon/urlprocessor/UrlProcessorRelativeToAbsolute.java index e67ab48c..99a19226 100644 --- a/markwon-core/src/main/java/io/noties/markwon/urlprocessor/UrlProcessorRelativeToAbsolute.java +++ b/markwon-core/src/main/java/io/noties/markwon/urlprocessor/UrlProcessorRelativeToAbsolute.java @@ -1,7 +1,7 @@ package io.noties.markwon.urlprocessor; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import java.net.MalformedURLException; import java.net.URL; diff --git a/markwon-core/src/main/java/io/noties/markwon/utils/Dip.java b/markwon-core/src/main/java/io/noties/markwon/utils/Dip.java index 6b8fdba2..8b579356 100644 --- a/markwon-core/src/main/java/io/noties/markwon/utils/Dip.java +++ b/markwon-core/src/main/java/io/noties/markwon/utils/Dip.java @@ -1,7 +1,8 @@ package io.noties.markwon.utils; import android.content.Context; -import android.support.annotation.NonNull; + +import androidx.annotation.NonNull; public class Dip { diff --git a/markwon-core/src/main/java/io/noties/markwon/utils/DrawableUtils.java b/markwon-core/src/main/java/io/noties/markwon/utils/DrawableUtils.java index 5201a828..f50a8b06 100644 --- a/markwon-core/src/main/java/io/noties/markwon/utils/DrawableUtils.java +++ b/markwon-core/src/main/java/io/noties/markwon/utils/DrawableUtils.java @@ -1,7 +1,8 @@ package io.noties.markwon.utils; import android.graphics.drawable.Drawable; -import android.support.annotation.NonNull; + +import androidx.annotation.NonNull; /** * @deprecated Please use {@link io.noties.markwon.image.DrawableUtils} diff --git a/markwon-core/src/main/java/io/noties/markwon/utils/DumpNodes.java b/markwon-core/src/main/java/io/noties/markwon/utils/DumpNodes.java index 0693da72..ffa2bf86 100644 --- a/markwon-core/src/main/java/io/noties/markwon/utils/DumpNodes.java +++ b/markwon-core/src/main/java/io/noties/markwon/utils/DumpNodes.java @@ -1,7 +1,7 @@ package io.noties.markwon.utils; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import org.commonmark.node.Block; import org.commonmark.node.Node; diff --git a/markwon-core/src/main/java/io/noties/markwon/utils/NoCopySpannableFactory.java b/markwon-core/src/main/java/io/noties/markwon/utils/NoCopySpannableFactory.java index 7609630e..dcb49813 100644 --- a/markwon-core/src/main/java/io/noties/markwon/utils/NoCopySpannableFactory.java +++ b/markwon-core/src/main/java/io/noties/markwon/utils/NoCopySpannableFactory.java @@ -1,9 +1,10 @@ package io.noties.markwon.utils; -import android.support.annotation.NonNull; import android.text.Spannable; import android.text.SpannableString; +import androidx.annotation.NonNull; + /** * Utility SpannableFactory that re-uses Spannable instance between multiple * `TextView#setText` calls. diff --git a/markwon-core/src/test/java/io/noties/markwon/AbstractMarkwonVisitorImpl.java b/markwon-core/src/test/java/io/noties/markwon/AbstractMarkwonVisitorImpl.java index 04298a06..ed4dae6b 100644 --- a/markwon-core/src/test/java/io/noties/markwon/AbstractMarkwonVisitorImpl.java +++ b/markwon-core/src/test/java/io/noties/markwon/AbstractMarkwonVisitorImpl.java @@ -1,6 +1,6 @@ package io.noties.markwon; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import org.commonmark.node.Node; diff --git a/markwon-core/src/test/java/io/noties/markwon/MarkwonAssert.java b/markwon-core/src/test/java/io/noties/markwon/MarkwonAssert.java index b220c7f8..85f686c8 100644 --- a/markwon-core/src/test/java/io/noties/markwon/MarkwonAssert.java +++ b/markwon-core/src/test/java/io/noties/markwon/MarkwonAssert.java @@ -1,6 +1,6 @@ package io.noties.markwon; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import org.junit.Assert; diff --git a/markwon-core/src/test/java/io/noties/markwon/RegistryImplTest.java b/markwon-core/src/test/java/io/noties/markwon/RegistryImplTest.java index 283a799e..4456bc47 100644 --- a/markwon-core/src/test/java/io/noties/markwon/RegistryImplTest.java +++ b/markwon-core/src/test/java/io/noties/markwon/RegistryImplTest.java @@ -1,6 +1,6 @@ package io.noties.markwon; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import org.junit.Test; import org.junit.runner.RunWith; diff --git a/markwon-core/src/test/java/io/noties/markwon/SpannableBuilderTest.java b/markwon-core/src/test/java/io/noties/markwon/SpannableBuilderTest.java index 3e68fe38..8a0ee7e4 100644 --- a/markwon-core/src/test/java/io/noties/markwon/SpannableBuilderTest.java +++ b/markwon-core/src/test/java/io/noties/markwon/SpannableBuilderTest.java @@ -1,6 +1,6 @@ package io.noties.markwon; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import android.text.SpannableStringBuilder; import android.text.Spanned; diff --git a/markwon-core/src/test/java/io/noties/markwon/core/CorePluginBridge.java b/markwon-core/src/test/java/io/noties/markwon/core/CorePluginBridge.java index 01520e54..d1bd2dbf 100644 --- a/markwon-core/src/test/java/io/noties/markwon/core/CorePluginBridge.java +++ b/markwon-core/src/test/java/io/noties/markwon/core/CorePluginBridge.java @@ -1,7 +1,7 @@ package io.noties.markwon.core; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import org.commonmark.node.Node; diff --git a/markwon-core/src/test/java/io/noties/markwon/core/CorePluginTest.java b/markwon-core/src/test/java/io/noties/markwon/core/CorePluginTest.java index cda6c9b8..e21a8ded 100644 --- a/markwon-core/src/test/java/io/noties/markwon/core/CorePluginTest.java +++ b/markwon-core/src/test/java/io/noties/markwon/core/CorePluginTest.java @@ -1,7 +1,7 @@ package io.noties.markwon.core; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import android.text.method.MovementMethod; import android.widget.ImageView; import android.widget.TextView; diff --git a/markwon-core/src/test/java/io/noties/markwon/core/CoreTest.java b/markwon-core/src/test/java/io/noties/markwon/core/CoreTest.java index 1d5b4830..b0c4556d 100644 --- a/markwon-core/src/test/java/io/noties/markwon/core/CoreTest.java +++ b/markwon-core/src/test/java/io/noties/markwon/core/CoreTest.java @@ -1,6 +1,6 @@ package io.noties.markwon.core; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import android.text.Spanned; import org.commonmark.node.Emphasis; diff --git a/markwon-core/src/test/java/io/noties/markwon/core/suite/BaseSuiteTest.java b/markwon-core/src/test/java/io/noties/markwon/core/suite/BaseSuiteTest.java index 7ecab39d..09d086fb 100644 --- a/markwon-core/src/test/java/io/noties/markwon/core/suite/BaseSuiteTest.java +++ b/markwon-core/src/test/java/io/noties/markwon/core/suite/BaseSuiteTest.java @@ -1,7 +1,7 @@ package io.noties.markwon.core.suite; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import android.text.Spanned; import org.apache.commons.io.IOUtils; diff --git a/markwon-core/src/test/java/io/noties/markwon/image/AsyncDrawableTest.java b/markwon-core/src/test/java/io/noties/markwon/image/AsyncDrawableTest.java index d725c00f..809cfd5f 100644 --- a/markwon-core/src/test/java/io/noties/markwon/image/AsyncDrawableTest.java +++ b/markwon-core/src/test/java/io/noties/markwon/image/AsyncDrawableTest.java @@ -4,8 +4,8 @@ import android.graphics.Canvas; import android.graphics.ColorFilter; import android.graphics.Rect; import android.graphics.drawable.Drawable; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import org.junit.Before; import org.junit.Test; diff --git a/markwon-core/src/test/java/io/noties/markwon/image/ImageTest.java b/markwon-core/src/test/java/io/noties/markwon/image/ImageTest.java index 71d13624..61721d16 100644 --- a/markwon-core/src/test/java/io/noties/markwon/image/ImageTest.java +++ b/markwon-core/src/test/java/io/noties/markwon/image/ImageTest.java @@ -1,7 +1,7 @@ package io.noties.markwon.image; import android.content.Context; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import org.commonmark.node.Image; import org.junit.Test; diff --git a/markwon-core/src/test/java/io/noties/markwon/syntax/SyntaxHighlightTest.java b/markwon-core/src/test/java/io/noties/markwon/syntax/SyntaxHighlightTest.java index a591303e..fdde1888 100644 --- a/markwon-core/src/test/java/io/noties/markwon/syntax/SyntaxHighlightTest.java +++ b/markwon-core/src/test/java/io/noties/markwon/syntax/SyntaxHighlightTest.java @@ -1,11 +1,12 @@ package io.noties.markwon.syntax; import android.os.Build; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; import android.text.SpannableStringBuilder; import android.text.Spanned; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; + import org.commonmark.node.FencedCodeBlock; import org.commonmark.node.Node; import org.junit.Test; diff --git a/markwon-ext-latex/src/main/java/io/noties/markwon/ext/latex/JLatexMathPlugin.java b/markwon-ext-latex/src/main/java/io/noties/markwon/ext/latex/JLatexMathPlugin.java index f3d16403..1eda8358 100644 --- a/markwon-ext-latex/src/main/java/io/noties/markwon/ext/latex/JLatexMathPlugin.java +++ b/markwon-ext-latex/src/main/java/io/noties/markwon/ext/latex/JLatexMathPlugin.java @@ -4,12 +4,13 @@ import android.graphics.drawable.Drawable; import android.os.Handler; import android.os.Looper; import android.os.SystemClock; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.annotation.Px; import android.text.Spanned; import android.widget.TextView; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.annotation.Px; + import org.commonmark.parser.Parser; import java.util.HashMap; @@ -18,15 +19,15 @@ import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.Future; -import io.noties.markwon.image.AsyncDrawable; -import io.noties.markwon.image.AsyncDrawableScheduler; -import io.noties.markwon.image.AsyncDrawableSpan; -import ru.noties.jlatexmath.JLatexMathDrawable; import io.noties.markwon.AbstractMarkwonPlugin; import io.noties.markwon.MarkwonConfiguration; import io.noties.markwon.MarkwonVisitor; +import io.noties.markwon.image.AsyncDrawable; import io.noties.markwon.image.AsyncDrawableLoader; +import io.noties.markwon.image.AsyncDrawableScheduler; +import io.noties.markwon.image.AsyncDrawableSpan; import io.noties.markwon.image.ImageSize; +import ru.noties.jlatexmath.JLatexMathDrawable; /** * @since 3.0.0 diff --git a/markwon-ext-strikethrough/src/main/java/io/noties/markwon/ext/strikethrough/StrikethroughPlugin.java b/markwon-ext-strikethrough/src/main/java/io/noties/markwon/ext/strikethrough/StrikethroughPlugin.java index 08d7aa06..f805f612 100644 --- a/markwon-ext-strikethrough/src/main/java/io/noties/markwon/ext/strikethrough/StrikethroughPlugin.java +++ b/markwon-ext-strikethrough/src/main/java/io/noties/markwon/ext/strikethrough/StrikethroughPlugin.java @@ -1,8 +1,9 @@ package io.noties.markwon.ext.strikethrough; -import android.support.annotation.NonNull; import android.text.style.StrikethroughSpan; +import androidx.annotation.NonNull; + import org.commonmark.ext.gfm.strikethrough.Strikethrough; import org.commonmark.ext.gfm.strikethrough.StrikethroughExtension; import org.commonmark.parser.Parser; diff --git a/markwon-ext-strikethrough/src/test/java/io/noties/markwon/ext/strikethrough/StrikethroughPluginTest.java b/markwon-ext-strikethrough/src/test/java/io/noties/markwon/ext/strikethrough/StrikethroughPluginTest.java index db77c79d..c9d9421a 100644 --- a/markwon-ext-strikethrough/src/test/java/io/noties/markwon/ext/strikethrough/StrikethroughPluginTest.java +++ b/markwon-ext-strikethrough/src/test/java/io/noties/markwon/ext/strikethrough/StrikethroughPluginTest.java @@ -1,6 +1,6 @@ package io.noties.markwon.ext.strikethrough; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import android.text.style.StrikethroughSpan; import org.commonmark.Extension; diff --git a/markwon-ext-tables/src/main/java/io/noties/markwon/ext/tables/Table.java b/markwon-ext-tables/src/main/java/io/noties/markwon/ext/tables/Table.java index 774c52e2..1d973ddc 100644 --- a/markwon-ext-tables/src/main/java/io/noties/markwon/ext/tables/Table.java +++ b/markwon-ext-tables/src/main/java/io/noties/markwon/ext/tables/Table.java @@ -1,9 +1,10 @@ package io.noties.markwon.ext.tables; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; import android.text.Spanned; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; + import org.commonmark.ext.gfm.tables.TableBlock; import org.commonmark.ext.gfm.tables.TableCell; import org.commonmark.ext.gfm.tables.TableHead; diff --git a/markwon-ext-tables/src/main/java/io/noties/markwon/ext/tables/TablePlugin.java b/markwon-ext-tables/src/main/java/io/noties/markwon/ext/tables/TablePlugin.java index 7846029c..4d931e9a 100644 --- a/markwon-ext-tables/src/main/java/io/noties/markwon/ext/tables/TablePlugin.java +++ b/markwon-ext-tables/src/main/java/io/noties/markwon/ext/tables/TablePlugin.java @@ -1,10 +1,11 @@ package io.noties.markwon.ext.tables; import android.content.Context; -import android.support.annotation.NonNull; import android.text.Spanned; import android.widget.TextView; +import androidx.annotation.NonNull; + import org.commonmark.ext.gfm.tables.TableBody; import org.commonmark.ext.gfm.tables.TableCell; import org.commonmark.ext.gfm.tables.TableHead; diff --git a/markwon-ext-tables/src/main/java/io/noties/markwon/ext/tables/TableRowSpan.java b/markwon-ext-tables/src/main/java/io/noties/markwon/ext/tables/TableRowSpan.java index a4bd08a7..6cbdcae4 100644 --- a/markwon-ext-tables/src/main/java/io/noties/markwon/ext/tables/TableRowSpan.java +++ b/markwon-ext-tables/src/main/java/io/noties/markwon/ext/tables/TableRowSpan.java @@ -4,15 +4,16 @@ import android.annotation.SuppressLint; import android.graphics.Canvas; import android.graphics.Paint; import android.graphics.Rect; -import android.support.annotation.IntDef; -import android.support.annotation.IntRange; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; import android.text.Layout; import android.text.StaticLayout; import android.text.TextPaint; import android.text.style.ReplacementSpan; +import androidx.annotation.IntDef; +import androidx.annotation.IntRange; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; + import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.util.ArrayList; diff --git a/markwon-ext-tables/src/main/java/io/noties/markwon/ext/tables/TableRowsScheduler.java b/markwon-ext-tables/src/main/java/io/noties/markwon/ext/tables/TableRowsScheduler.java index 5fbb6b4b..e3086c20 100644 --- a/markwon-ext-tables/src/main/java/io/noties/markwon/ext/tables/TableRowsScheduler.java +++ b/markwon-ext-tables/src/main/java/io/noties/markwon/ext/tables/TableRowsScheduler.java @@ -1,12 +1,13 @@ package io.noties.markwon.ext.tables; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; import android.text.Spanned; import android.text.TextUtils; import android.view.View; import android.widget.TextView; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; + abstract class TableRowsScheduler { static void schedule(@NonNull final TextView view) { diff --git a/markwon-ext-tables/src/main/java/io/noties/markwon/ext/tables/TableTheme.java b/markwon-ext-tables/src/main/java/io/noties/markwon/ext/tables/TableTheme.java index eeab17d9..f4a1c5cc 100644 --- a/markwon-ext-tables/src/main/java/io/noties/markwon/ext/tables/TableTheme.java +++ b/markwon-ext-tables/src/main/java/io/noties/markwon/ext/tables/TableTheme.java @@ -2,9 +2,10 @@ package io.noties.markwon.ext.tables; import android.content.Context; import android.graphics.Paint; -import android.support.annotation.ColorInt; -import android.support.annotation.NonNull; -import android.support.annotation.Px; + +import androidx.annotation.ColorInt; +import androidx.annotation.NonNull; +import androidx.annotation.Px; import io.noties.markwon.utils.ColorUtils; import io.noties.markwon.utils.Dip; diff --git a/markwon-ext-tasklist/build.gradle b/markwon-ext-tasklist/build.gradle index 43a236df..8a0e6cd7 100644 --- a/markwon-ext-tasklist/build.gradle +++ b/markwon-ext-tasklist/build.gradle @@ -14,6 +14,7 @@ android { } dependencies { + api project(':markwon-core') deps['test'].with { diff --git a/markwon-ext-tasklist/src/main/java/io/noties/markwon/ext/tasklist/TaskListBlockParser.java b/markwon-ext-tasklist/src/main/java/io/noties/markwon/ext/tasklist/TaskListBlockParser.java index b36ce73a..f65c4f7b 100644 --- a/markwon-ext-tasklist/src/main/java/io/noties/markwon/ext/tasklist/TaskListBlockParser.java +++ b/markwon-ext-tasklist/src/main/java/io/noties/markwon/ext/tasklist/TaskListBlockParser.java @@ -1,7 +1,7 @@ package io.noties.markwon.ext.tasklist; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import org.commonmark.node.Block; import org.commonmark.parser.InlineParser; diff --git a/markwon-ext-tasklist/src/main/java/io/noties/markwon/ext/tasklist/TaskListDrawable.java b/markwon-ext-tasklist/src/main/java/io/noties/markwon/ext/tasklist/TaskListDrawable.java index b43ea1ec..4c67d345 100644 --- a/markwon-ext-tasklist/src/main/java/io/noties/markwon/ext/tasklist/TaskListDrawable.java +++ b/markwon-ext-tasklist/src/main/java/io/noties/markwon/ext/tasklist/TaskListDrawable.java @@ -8,10 +8,11 @@ import android.graphics.PixelFormat; import android.graphics.Rect; import android.graphics.RectF; import android.graphics.drawable.Drawable; -import android.support.annotation.ColorInt; -import android.support.annotation.IntRange; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; + +import androidx.annotation.ColorInt; +import androidx.annotation.IntRange; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; /** * @since 1.0.1 @@ -37,7 +38,10 @@ public class TaskListDrawable extends Drawable { // unfortunately we cannot rely on TextView to be LAYER_TYPE_SOFTWARE // if we could we would draw our checkMarkPath with PorterDuff.CLEAR - public TaskListDrawable(@ColorInt int checkedFillColor, @ColorInt int normalOutlineColor, @ColorInt int checkMarkColor) { + public TaskListDrawable( + @ColorInt int checkedFillColor, + @ColorInt int normalOutlineColor, + @ColorInt int checkMarkColor) { this.checkedFillColor = checkedFillColor; this.normalOutlineColor = normalOutlineColor; diff --git a/markwon-ext-tasklist/src/main/java/io/noties/markwon/ext/tasklist/TaskListPlugin.java b/markwon-ext-tasklist/src/main/java/io/noties/markwon/ext/tasklist/TaskListPlugin.java index 5c37ea8c..df71b2c4 100644 --- a/markwon-ext-tasklist/src/main/java/io/noties/markwon/ext/tasklist/TaskListPlugin.java +++ b/markwon-ext-tasklist/src/main/java/io/noties/markwon/ext/tasklist/TaskListPlugin.java @@ -3,11 +3,12 @@ package io.noties.markwon.ext.tasklist; import android.content.Context; import android.content.res.TypedArray; import android.graphics.drawable.Drawable; -import android.support.annotation.AttrRes; -import android.support.annotation.ColorInt; -import android.support.annotation.NonNull; import android.util.TypedValue; +import androidx.annotation.AttrRes; +import androidx.annotation.ColorInt; +import androidx.annotation.NonNull; + import org.commonmark.node.Node; import org.commonmark.parser.Parser; diff --git a/markwon-ext-tasklist/src/main/java/io/noties/markwon/ext/tasklist/TaskListSpan.java b/markwon-ext-tasklist/src/main/java/io/noties/markwon/ext/tasklist/TaskListSpan.java index 02d8a2a3..04ba8dbd 100644 --- a/markwon-ext-tasklist/src/main/java/io/noties/markwon/ext/tasklist/TaskListSpan.java +++ b/markwon-ext-tasklist/src/main/java/io/noties/markwon/ext/tasklist/TaskListSpan.java @@ -3,10 +3,11 @@ package io.noties.markwon.ext.tasklist; import android.graphics.Canvas; import android.graphics.Paint; import android.graphics.drawable.Drawable; -import android.support.annotation.NonNull; import android.text.Layout; import android.text.style.LeadingMarginSpan; +import androidx.annotation.NonNull; + import io.noties.markwon.core.MarkwonTheme; import io.noties.markwon.utils.LeadingMarginUtils; diff --git a/markwon-ext-tasklist/src/main/java/io/noties/markwon/ext/tasklist/TaskListSpanFactory.java b/markwon-ext-tasklist/src/main/java/io/noties/markwon/ext/tasklist/TaskListSpanFactory.java index 80864340..c5d64d60 100644 --- a/markwon-ext-tasklist/src/main/java/io/noties/markwon/ext/tasklist/TaskListSpanFactory.java +++ b/markwon-ext-tasklist/src/main/java/io/noties/markwon/ext/tasklist/TaskListSpanFactory.java @@ -1,8 +1,9 @@ package io.noties.markwon.ext.tasklist; import android.graphics.drawable.Drawable; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; + +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import io.noties.markwon.MarkwonConfiguration; import io.noties.markwon.RenderProps; diff --git a/markwon-ext-tasklist/src/test/java/io/noties/markwon/ext/tasklist/TaskListTest.java b/markwon-ext-tasklist/src/test/java/io/noties/markwon/ext/tasklist/TaskListTest.java index c28a8555..eefc50ab 100644 --- a/markwon-ext-tasklist/src/test/java/io/noties/markwon/ext/tasklist/TaskListTest.java +++ b/markwon-ext-tasklist/src/test/java/io/noties/markwon/ext/tasklist/TaskListTest.java @@ -1,6 +1,6 @@ package io.noties.markwon.ext.tasklist; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import org.apache.commons.io.IOUtils; import org.junit.Test; diff --git a/markwon-html/build.gradle b/markwon-html/build.gradle index c23a7b4f..28ead2d9 100644 --- a/markwon-html/build.gradle +++ b/markwon-html/build.gradle @@ -18,9 +18,6 @@ dependencies { api project(':markwon-core') deps.with { - api it['support-annotations'] - api it['commonmark'] - // add a compileOnly dependency, so if this artifact is present // we will try to obtain a SpanFactory for a Strikethrough node and use // it to be consistent with markdown (please note that we do not use markwon plugin diff --git a/markwon-html/src/main/java/io/noties/markwon/html/AppendableUtils.java b/markwon-html/src/main/java/io/noties/markwon/html/AppendableUtils.java index 29f25b83..bce490a1 100644 --- a/markwon-html/src/main/java/io/noties/markwon/html/AppendableUtils.java +++ b/markwon-html/src/main/java/io/noties/markwon/html/AppendableUtils.java @@ -1,6 +1,6 @@ package io.noties.markwon.html; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import java.io.IOException; diff --git a/markwon-html/src/main/java/io/noties/markwon/html/CssInlineStyleParser.java b/markwon-html/src/main/java/io/noties/markwon/html/CssInlineStyleParser.java index c06f396d..4f9320e9 100644 --- a/markwon-html/src/main/java/io/noties/markwon/html/CssInlineStyleParser.java +++ b/markwon-html/src/main/java/io/noties/markwon/html/CssInlineStyleParser.java @@ -1,9 +1,10 @@ package io.noties.markwon.html; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; import android.text.TextUtils; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; + import java.util.Iterator; import java.util.NoSuchElementException; diff --git a/markwon-html/src/main/java/io/noties/markwon/html/CssProperty.java b/markwon-html/src/main/java/io/noties/markwon/html/CssProperty.java index 6805296e..e85f6ee4 100644 --- a/markwon-html/src/main/java/io/noties/markwon/html/CssProperty.java +++ b/markwon-html/src/main/java/io/noties/markwon/html/CssProperty.java @@ -1,6 +1,6 @@ package io.noties.markwon.html; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; public class CssProperty { diff --git a/markwon-html/src/main/java/io/noties/markwon/html/HtmlEmptyTagReplacement.java b/markwon-html/src/main/java/io/noties/markwon/html/HtmlEmptyTagReplacement.java index 416346e6..48b8acb4 100644 --- a/markwon-html/src/main/java/io/noties/markwon/html/HtmlEmptyTagReplacement.java +++ b/markwon-html/src/main/java/io/noties/markwon/html/HtmlEmptyTagReplacement.java @@ -1,7 +1,7 @@ package io.noties.markwon.html; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; /** * This class will be used to append some text to output in order to diff --git a/markwon-html/src/main/java/io/noties/markwon/html/HtmlPlugin.java b/markwon-html/src/main/java/io/noties/markwon/html/HtmlPlugin.java index 6a20ada6..c4462c99 100644 --- a/markwon-html/src/main/java/io/noties/markwon/html/HtmlPlugin.java +++ b/markwon-html/src/main/java/io/noties/markwon/html/HtmlPlugin.java @@ -1,7 +1,7 @@ package io.noties.markwon.html; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import org.commonmark.node.HtmlBlock; import org.commonmark.node.HtmlInline; diff --git a/markwon-html/src/main/java/io/noties/markwon/html/HtmlTag.java b/markwon-html/src/main/java/io/noties/markwon/html/HtmlTag.java index a44ccd82..956de7c8 100644 --- a/markwon-html/src/main/java/io/noties/markwon/html/HtmlTag.java +++ b/markwon-html/src/main/java/io/noties/markwon/html/HtmlTag.java @@ -1,7 +1,7 @@ package io.noties.markwon.html; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import java.util.List; import java.util.Map; diff --git a/markwon-html/src/main/java/io/noties/markwon/html/HtmlTagImpl.java b/markwon-html/src/main/java/io/noties/markwon/html/HtmlTagImpl.java index 3dfb2c00..c41cbad0 100644 --- a/markwon-html/src/main/java/io/noties/markwon/html/HtmlTagImpl.java +++ b/markwon-html/src/main/java/io/noties/markwon/html/HtmlTagImpl.java @@ -1,7 +1,7 @@ package io.noties.markwon.html; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import java.util.Collections; import java.util.List; diff --git a/markwon-html/src/main/java/io/noties/markwon/html/MarkwonHtmlParser.java b/markwon-html/src/main/java/io/noties/markwon/html/MarkwonHtmlParser.java index 368306a7..d9e3e36d 100644 --- a/markwon-html/src/main/java/io/noties/markwon/html/MarkwonHtmlParser.java +++ b/markwon-html/src/main/java/io/noties/markwon/html/MarkwonHtmlParser.java @@ -1,6 +1,6 @@ package io.noties.markwon.html; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import java.util.List; diff --git a/markwon-html/src/main/java/io/noties/markwon/html/MarkwonHtmlParserImpl.java b/markwon-html/src/main/java/io/noties/markwon/html/MarkwonHtmlParserImpl.java index ba0ce566..3bf73419 100644 --- a/markwon-html/src/main/java/io/noties/markwon/html/MarkwonHtmlParserImpl.java +++ b/markwon-html/src/main/java/io/noties/markwon/html/MarkwonHtmlParserImpl.java @@ -1,8 +1,8 @@ package io.noties.markwon.html; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.annotation.VisibleForTesting; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.annotation.VisibleForTesting; import java.util.ArrayList; import java.util.Arrays; diff --git a/markwon-html/src/main/java/io/noties/markwon/html/MarkwonHtmlRenderer.java b/markwon-html/src/main/java/io/noties/markwon/html/MarkwonHtmlRenderer.java index f0e87f37..e55cec2c 100644 --- a/markwon-html/src/main/java/io/noties/markwon/html/MarkwonHtmlRenderer.java +++ b/markwon-html/src/main/java/io/noties/markwon/html/MarkwonHtmlRenderer.java @@ -1,7 +1,7 @@ package io.noties.markwon.html; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import io.noties.markwon.MarkwonVisitor; diff --git a/markwon-html/src/main/java/io/noties/markwon/html/MarkwonHtmlRendererImpl.java b/markwon-html/src/main/java/io/noties/markwon/html/MarkwonHtmlRendererImpl.java index fe3e1d97..0877f732 100644 --- a/markwon-html/src/main/java/io/noties/markwon/html/MarkwonHtmlRendererImpl.java +++ b/markwon-html/src/main/java/io/noties/markwon/html/MarkwonHtmlRendererImpl.java @@ -1,7 +1,7 @@ package io.noties.markwon.html; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import java.util.Collections; import java.util.HashMap; @@ -116,7 +116,7 @@ class MarkwonHtmlRendererImpl extends MarkwonHtmlRenderer { checkState(); this.excludeDefaults = excludeDefaults; } - + boolean excludeDefaults() { return excludeDefaults; } diff --git a/markwon-html/src/main/java/io/noties/markwon/html/MarkwonHtmlRendererNoOp.java b/markwon-html/src/main/java/io/noties/markwon/html/MarkwonHtmlRendererNoOp.java index f8194ca3..8d446325 100644 --- a/markwon-html/src/main/java/io/noties/markwon/html/MarkwonHtmlRendererNoOp.java +++ b/markwon-html/src/main/java/io/noties/markwon/html/MarkwonHtmlRendererNoOp.java @@ -1,7 +1,7 @@ package io.noties.markwon.html; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import io.noties.markwon.MarkwonVisitor; diff --git a/markwon-html/src/main/java/io/noties/markwon/html/TagHandler.java b/markwon-html/src/main/java/io/noties/markwon/html/TagHandler.java index 60332b61..66a30e06 100644 --- a/markwon-html/src/main/java/io/noties/markwon/html/TagHandler.java +++ b/markwon-html/src/main/java/io/noties/markwon/html/TagHandler.java @@ -1,6 +1,6 @@ package io.noties.markwon.html; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import java.util.Collection; diff --git a/markwon-html/src/main/java/io/noties/markwon/html/TagHandlerNoOp.java b/markwon-html/src/main/java/io/noties/markwon/html/TagHandlerNoOp.java index 944a10f9..79ba8dea 100644 --- a/markwon-html/src/main/java/io/noties/markwon/html/TagHandlerNoOp.java +++ b/markwon-html/src/main/java/io/noties/markwon/html/TagHandlerNoOp.java @@ -1,6 +1,6 @@ package io.noties.markwon.html; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import java.util.Arrays; import java.util.Collection; diff --git a/markwon-html/src/main/java/io/noties/markwon/html/TrimmingAppender.java b/markwon-html/src/main/java/io/noties/markwon/html/TrimmingAppender.java index 0115a531..fa585991 100644 --- a/markwon-html/src/main/java/io/noties/markwon/html/TrimmingAppender.java +++ b/markwon-html/src/main/java/io/noties/markwon/html/TrimmingAppender.java @@ -1,6 +1,6 @@ package io.noties.markwon.html; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import static io.noties.markwon.html.AppendableUtils.appendQuietly; diff --git a/markwon-html/src/main/java/io/noties/markwon/html/jsoup/nodes/CommonMarkEntities.java b/markwon-html/src/main/java/io/noties/markwon/html/jsoup/nodes/CommonMarkEntities.java index 1bf8dca5..353f6d9b 100644 --- a/markwon-html/src/main/java/io/noties/markwon/html/jsoup/nodes/CommonMarkEntities.java +++ b/markwon-html/src/main/java/io/noties/markwon/html/jsoup/nodes/CommonMarkEntities.java @@ -1,6 +1,6 @@ package io.noties.markwon.html.jsoup.nodes; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import org.commonmark.internal.util.Html5Entities; diff --git a/markwon-html/src/main/java/io/noties/markwon/html/jsoup/parser/Token.java b/markwon-html/src/main/java/io/noties/markwon/html/jsoup/parser/Token.java index 428186b5..d78c0b56 100644 --- a/markwon-html/src/main/java/io/noties/markwon/html/jsoup/parser/Token.java +++ b/markwon-html/src/main/java/io/noties/markwon/html/jsoup/parser/Token.java @@ -1,6 +1,6 @@ package io.noties.markwon.html.jsoup.parser; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import io.noties.markwon.html.jsoup.helper.Validate; import io.noties.markwon.html.jsoup.nodes.Attributes; @@ -251,7 +251,7 @@ public abstract class Token { } } - public final static class EndTag extends Tag{ + public final static class EndTag extends Tag { EndTag() { super(TokenType.EndTag); } diff --git a/markwon-html/src/main/java/io/noties/markwon/html/span/SubScriptSpan.java b/markwon-html/src/main/java/io/noties/markwon/html/span/SubScriptSpan.java index 8fa840ad..c807e051 100644 --- a/markwon-html/src/main/java/io/noties/markwon/html/span/SubScriptSpan.java +++ b/markwon-html/src/main/java/io/noties/markwon/html/span/SubScriptSpan.java @@ -1,9 +1,10 @@ package io.noties.markwon.html.span; -import android.support.annotation.NonNull; import android.text.TextPaint; import android.text.style.MetricAffectingSpan; +import androidx.annotation.NonNull; + import io.noties.markwon.html.HtmlPlugin; public class SubScriptSpan extends MetricAffectingSpan { diff --git a/markwon-html/src/main/java/io/noties/markwon/html/span/SuperScriptSpan.java b/markwon-html/src/main/java/io/noties/markwon/html/span/SuperScriptSpan.java index 6c4d5247..9e6a657b 100644 --- a/markwon-html/src/main/java/io/noties/markwon/html/span/SuperScriptSpan.java +++ b/markwon-html/src/main/java/io/noties/markwon/html/span/SuperScriptSpan.java @@ -1,9 +1,10 @@ package io.noties.markwon.html.span; -import android.support.annotation.NonNull; import android.text.TextPaint; import android.text.style.MetricAffectingSpan; +import androidx.annotation.NonNull; + import io.noties.markwon.html.HtmlPlugin; public class SuperScriptSpan extends MetricAffectingSpan { diff --git a/markwon-html/src/main/java/io/noties/markwon/html/tag/BlockquoteHandler.java b/markwon-html/src/main/java/io/noties/markwon/html/tag/BlockquoteHandler.java index ee8373c7..e579a7d3 100644 --- a/markwon-html/src/main/java/io/noties/markwon/html/tag/BlockquoteHandler.java +++ b/markwon-html/src/main/java/io/noties/markwon/html/tag/BlockquoteHandler.java @@ -1,19 +1,19 @@ package io.noties.markwon.html.tag; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import org.commonmark.node.BlockQuote; import java.util.Collection; import java.util.Collections; -import io.noties.markwon.html.HtmlTag; -import io.noties.markwon.html.MarkwonHtmlRenderer; -import io.noties.markwon.html.TagHandler; import io.noties.markwon.MarkwonConfiguration; import io.noties.markwon.MarkwonVisitor; import io.noties.markwon.SpanFactory; import io.noties.markwon.SpannableBuilder; +import io.noties.markwon.html.HtmlTag; +import io.noties.markwon.html.MarkwonHtmlRenderer; +import io.noties.markwon.html.TagHandler; public class BlockquoteHandler extends TagHandler { diff --git a/markwon-html/src/main/java/io/noties/markwon/html/tag/EmphasisHandler.java b/markwon-html/src/main/java/io/noties/markwon/html/tag/EmphasisHandler.java index ff7c4e5e..d1f7fdd8 100644 --- a/markwon-html/src/main/java/io/noties/markwon/html/tag/EmphasisHandler.java +++ b/markwon-html/src/main/java/io/noties/markwon/html/tag/EmphasisHandler.java @@ -1,17 +1,17 @@ package io.noties.markwon.html.tag; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import org.commonmark.node.Emphasis; import java.util.Arrays; import java.util.Collection; -import io.noties.markwon.html.HtmlTag; import io.noties.markwon.MarkwonConfiguration; import io.noties.markwon.RenderProps; import io.noties.markwon.SpanFactory; +import io.noties.markwon.html.HtmlTag; public class EmphasisHandler extends SimpleTagHandler { @Nullable diff --git a/markwon-html/src/main/java/io/noties/markwon/html/tag/HeadingHandler.java b/markwon-html/src/main/java/io/noties/markwon/html/tag/HeadingHandler.java index 155a46fa..7c694e2d 100644 --- a/markwon-html/src/main/java/io/noties/markwon/html/tag/HeadingHandler.java +++ b/markwon-html/src/main/java/io/noties/markwon/html/tag/HeadingHandler.java @@ -1,18 +1,18 @@ package io.noties.markwon.html.tag; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import org.commonmark.node.Heading; import java.util.Arrays; import java.util.Collection; -import io.noties.markwon.core.CoreProps; -import io.noties.markwon.html.HtmlTag; import io.noties.markwon.MarkwonConfiguration; import io.noties.markwon.RenderProps; import io.noties.markwon.SpanFactory; +import io.noties.markwon.core.CoreProps; +import io.noties.markwon.html.HtmlTag; public class HeadingHandler extends SimpleTagHandler { diff --git a/markwon-html/src/main/java/io/noties/markwon/html/tag/ImageHandler.java b/markwon-html/src/main/java/io/noties/markwon/html/tag/ImageHandler.java index e93c42cb..ad170b0e 100644 --- a/markwon-html/src/main/java/io/noties/markwon/html/tag/ImageHandler.java +++ b/markwon-html/src/main/java/io/noties/markwon/html/tag/ImageHandler.java @@ -1,22 +1,23 @@ package io.noties.markwon.html.tag; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; import android.text.TextUtils; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; + import org.commonmark.node.Image; import java.util.Collection; import java.util.Collections; import java.util.Map; -import io.noties.markwon.image.ImageSize; import io.noties.markwon.MarkwonConfiguration; import io.noties.markwon.RenderProps; import io.noties.markwon.SpanFactory; import io.noties.markwon.html.CssInlineStyleParser; import io.noties.markwon.html.HtmlTag; import io.noties.markwon.image.ImageProps; +import io.noties.markwon.image.ImageSize; public class ImageHandler extends SimpleTagHandler { diff --git a/markwon-html/src/main/java/io/noties/markwon/html/tag/ImageSizeParserImpl.java b/markwon-html/src/main/java/io/noties/markwon/html/tag/ImageSizeParserImpl.java index 69eb0412..97e2e61f 100644 --- a/markwon-html/src/main/java/io/noties/markwon/html/tag/ImageSizeParserImpl.java +++ b/markwon-html/src/main/java/io/noties/markwon/html/tag/ImageSizeParserImpl.java @@ -1,10 +1,11 @@ package io.noties.markwon.html.tag; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.annotation.VisibleForTesting; import android.text.TextUtils; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.annotation.VisibleForTesting; + import java.util.Map; import io.noties.markwon.html.CssInlineStyleParser; diff --git a/markwon-html/src/main/java/io/noties/markwon/html/tag/LinkHandler.java b/markwon-html/src/main/java/io/noties/markwon/html/tag/LinkHandler.java index a3cd6084..fdd830cc 100644 --- a/markwon-html/src/main/java/io/noties/markwon/html/tag/LinkHandler.java +++ b/markwon-html/src/main/java/io/noties/markwon/html/tag/LinkHandler.java @@ -1,19 +1,20 @@ package io.noties.markwon.html.tag; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; import android.text.TextUtils; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; + import org.commonmark.node.Link; import java.util.Collection; import java.util.Collections; -import io.noties.markwon.core.CoreProps; -import io.noties.markwon.html.HtmlTag; import io.noties.markwon.MarkwonConfiguration; import io.noties.markwon.RenderProps; import io.noties.markwon.SpanFactory; +import io.noties.markwon.core.CoreProps; +import io.noties.markwon.html.HtmlTag; public class LinkHandler extends SimpleTagHandler { @Nullable diff --git a/markwon-html/src/main/java/io/noties/markwon/html/tag/ListHandler.java b/markwon-html/src/main/java/io/noties/markwon/html/tag/ListHandler.java index d214aaca..33499b6c 100644 --- a/markwon-html/src/main/java/io/noties/markwon/html/tag/ListHandler.java +++ b/markwon-html/src/main/java/io/noties/markwon/html/tag/ListHandler.java @@ -1,21 +1,21 @@ package io.noties.markwon.html.tag; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import org.commonmark.node.ListItem; import java.util.Arrays; import java.util.Collection; -import io.noties.markwon.core.CoreProps; -import io.noties.markwon.html.HtmlTag; -import io.noties.markwon.html.MarkwonHtmlRenderer; -import io.noties.markwon.html.TagHandler; import io.noties.markwon.MarkwonConfiguration; import io.noties.markwon.MarkwonVisitor; import io.noties.markwon.RenderProps; import io.noties.markwon.SpanFactory; import io.noties.markwon.SpannableBuilder; +import io.noties.markwon.core.CoreProps; +import io.noties.markwon.html.HtmlTag; +import io.noties.markwon.html.MarkwonHtmlRenderer; +import io.noties.markwon.html.TagHandler; public class ListHandler extends TagHandler { 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 bf0f141c..337ac748 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 @@ -1,17 +1,17 @@ package io.noties.markwon.html.tag; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import java.util.Collection; -import io.noties.markwon.html.HtmlTag; -import io.noties.markwon.html.MarkwonHtmlRenderer; -import io.noties.markwon.html.TagHandler; import io.noties.markwon.MarkwonConfiguration; import io.noties.markwon.MarkwonVisitor; import io.noties.markwon.RenderProps; import io.noties.markwon.SpannableBuilder; +import io.noties.markwon.html.HtmlTag; +import io.noties.markwon.html.MarkwonHtmlRenderer; +import io.noties.markwon.html.TagHandler; public abstract class SimpleTagHandler extends TagHandler { diff --git a/markwon-html/src/main/java/io/noties/markwon/html/tag/StrikeHandler.java b/markwon-html/src/main/java/io/noties/markwon/html/tag/StrikeHandler.java index 2715a8f5..6c01e31f 100644 --- a/markwon-html/src/main/java/io/noties/markwon/html/tag/StrikeHandler.java +++ b/markwon-html/src/main/java/io/noties/markwon/html/tag/StrikeHandler.java @@ -1,19 +1,20 @@ package io.noties.markwon.html.tag; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; import android.text.style.StrikethroughSpan; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; + import java.util.Arrays; import java.util.Collection; -import io.noties.markwon.html.HtmlTag; -import io.noties.markwon.html.MarkwonHtmlRenderer; -import io.noties.markwon.html.TagHandler; import io.noties.markwon.MarkwonConfiguration; import io.noties.markwon.MarkwonVisitor; import io.noties.markwon.SpanFactory; import io.noties.markwon.SpannableBuilder; +import io.noties.markwon.html.HtmlTag; +import io.noties.markwon.html.MarkwonHtmlRenderer; +import io.noties.markwon.html.TagHandler; public class StrikeHandler extends TagHandler { diff --git a/markwon-html/src/main/java/io/noties/markwon/html/tag/StrongEmphasisHandler.java b/markwon-html/src/main/java/io/noties/markwon/html/tag/StrongEmphasisHandler.java index 2a28ec7c..a698ae44 100644 --- a/markwon-html/src/main/java/io/noties/markwon/html/tag/StrongEmphasisHandler.java +++ b/markwon-html/src/main/java/io/noties/markwon/html/tag/StrongEmphasisHandler.java @@ -1,17 +1,17 @@ package io.noties.markwon.html.tag; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import org.commonmark.node.StrongEmphasis; import java.util.Arrays; import java.util.Collection; -import io.noties.markwon.html.HtmlTag; import io.noties.markwon.MarkwonConfiguration; import io.noties.markwon.RenderProps; import io.noties.markwon.SpanFactory; +import io.noties.markwon.html.HtmlTag; public class StrongEmphasisHandler extends SimpleTagHandler { @Nullable diff --git a/markwon-html/src/main/java/io/noties/markwon/html/tag/SubScriptHandler.java b/markwon-html/src/main/java/io/noties/markwon/html/tag/SubScriptHandler.java index cfcf77c5..679eed7c 100644 --- a/markwon-html/src/main/java/io/noties/markwon/html/tag/SubScriptHandler.java +++ b/markwon-html/src/main/java/io/noties/markwon/html/tag/SubScriptHandler.java @@ -1,14 +1,14 @@ package io.noties.markwon.html.tag; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import java.util.Collection; import java.util.Collections; -import io.noties.markwon.html.HtmlTag; import io.noties.markwon.MarkwonConfiguration; import io.noties.markwon.RenderProps; +import io.noties.markwon.html.HtmlTag; import io.noties.markwon.html.span.SubScriptSpan; public class SubScriptHandler extends SimpleTagHandler { diff --git a/markwon-html/src/main/java/io/noties/markwon/html/tag/SuperScriptHandler.java b/markwon-html/src/main/java/io/noties/markwon/html/tag/SuperScriptHandler.java index 199350aa..e0b94201 100644 --- a/markwon-html/src/main/java/io/noties/markwon/html/tag/SuperScriptHandler.java +++ b/markwon-html/src/main/java/io/noties/markwon/html/tag/SuperScriptHandler.java @@ -1,14 +1,14 @@ package io.noties.markwon.html.tag; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import java.util.Collection; import java.util.Collections; -import io.noties.markwon.html.HtmlTag; import io.noties.markwon.MarkwonConfiguration; import io.noties.markwon.RenderProps; +import io.noties.markwon.html.HtmlTag; import io.noties.markwon.html.span.SuperScriptSpan; public class SuperScriptHandler extends SimpleTagHandler { diff --git a/markwon-html/src/main/java/io/noties/markwon/html/tag/UnderlineHandler.java b/markwon-html/src/main/java/io/noties/markwon/html/tag/UnderlineHandler.java index 300cc69c..09ed2fa5 100644 --- a/markwon-html/src/main/java/io/noties/markwon/html/tag/UnderlineHandler.java +++ b/markwon-html/src/main/java/io/noties/markwon/html/tag/UnderlineHandler.java @@ -1,16 +1,17 @@ package io.noties.markwon.html.tag; -import android.support.annotation.NonNull; import android.text.style.UnderlineSpan; +import androidx.annotation.NonNull; + import java.util.Arrays; import java.util.Collection; +import io.noties.markwon.MarkwonVisitor; +import io.noties.markwon.SpannableBuilder; import io.noties.markwon.html.HtmlTag; import io.noties.markwon.html.MarkwonHtmlRenderer; import io.noties.markwon.html.TagHandler; -import io.noties.markwon.MarkwonVisitor; -import io.noties.markwon.SpannableBuilder; public class UnderlineHandler extends TagHandler { diff --git a/markwon-html/src/test/java/io/noties/markwon/html/CssInlineStyleParserTest.java b/markwon-html/src/test/java/io/noties/markwon/html/CssInlineStyleParserTest.java index 88a45f14..1c0c0235 100644 --- a/markwon-html/src/test/java/io/noties/markwon/html/CssInlineStyleParserTest.java +++ b/markwon-html/src/test/java/io/noties/markwon/html/CssInlineStyleParserTest.java @@ -1,6 +1,6 @@ package io.noties.markwon.html; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import org.junit.Before; import org.junit.Test; diff --git a/markwon-html/src/test/java/io/noties/markwon/html/MarkwonHtmlParserImplTest.java b/markwon-html/src/test/java/io/noties/markwon/html/MarkwonHtmlParserImplTest.java index a2e0e7bd..2930e28b 100644 --- a/markwon-html/src/test/java/io/noties/markwon/html/MarkwonHtmlParserImplTest.java +++ b/markwon-html/src/test/java/io/noties/markwon/html/MarkwonHtmlParserImplTest.java @@ -1,7 +1,7 @@ package io.noties.markwon.html; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import org.junit.Test; import org.junit.runner.RunWith; diff --git a/markwon-html/src/test/java/io/noties/markwon/html/tag/ImageSizeParserImplTest.java b/markwon-html/src/test/java/io/noties/markwon/html/tag/ImageSizeParserImplTest.java index daa5491e..c31ab3e1 100644 --- a/markwon-html/src/test/java/io/noties/markwon/html/tag/ImageSizeParserImplTest.java +++ b/markwon-html/src/test/java/io/noties/markwon/html/tag/ImageSizeParserImplTest.java @@ -1,7 +1,7 @@ package io.noties.markwon.html.tag; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import org.junit.Assert; import org.junit.Before; diff --git a/markwon-image-gif/src/main/java/ru/noties/markwon/image/gif/GifMediaDecoder.java b/markwon-image-gif/src/main/java/ru/noties/markwon/image/gif/GifMediaDecoder.java index 72dd572c..7c06e13a 100644 --- a/markwon-image-gif/src/main/java/ru/noties/markwon/image/gif/GifMediaDecoder.java +++ b/markwon-image-gif/src/main/java/ru/noties/markwon/image/gif/GifMediaDecoder.java @@ -1,8 +1,8 @@ package ru.noties.markwon.image.gif; import android.graphics.drawable.Drawable; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import java.io.ByteArrayOutputStream; import java.io.IOException; diff --git a/markwon-image-gif/src/main/java/ru/noties/markwon/image/gif/GifPlugin.java b/markwon-image-gif/src/main/java/ru/noties/markwon/image/gif/GifPlugin.java index 6cceffdf..754f91ae 100644 --- a/markwon-image-gif/src/main/java/ru/noties/markwon/image/gif/GifPlugin.java +++ b/markwon-image-gif/src/main/java/ru/noties/markwon/image/gif/GifPlugin.java @@ -1,6 +1,6 @@ package ru.noties.markwon.image.gif; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import ru.noties.markwon.AbstractMarkwonPlugin; import ru.noties.markwon.image.AsyncDrawableLoader; 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 21d2bc55..ae15afa4 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 @@ -2,11 +2,12 @@ package io.noties.markwon.image.glide; import android.content.Context; import android.graphics.drawable.Drawable; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; import android.text.Spanned; import android.widget.TextView; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; + import com.bumptech.glide.Glide; import com.bumptech.glide.RequestBuilder; import com.bumptech.glide.RequestManager; @@ -19,12 +20,12 @@ import org.commonmark.node.Image; import java.util.HashMap; import java.util.Map; -import io.noties.markwon.image.AsyncDrawable; -import io.noties.markwon.image.AsyncDrawableScheduler; import io.noties.markwon.AbstractMarkwonPlugin; import io.noties.markwon.MarkwonConfiguration; import io.noties.markwon.MarkwonSpansFactory; +import io.noties.markwon.image.AsyncDrawable; import io.noties.markwon.image.AsyncDrawableLoader; +import io.noties.markwon.image.AsyncDrawableScheduler; import io.noties.markwon.image.DrawableUtils; import io.noties.markwon.image.ImageSpanFactory; diff --git a/markwon-image-okhttp/src/main/java/ru/noties/markwon/image/okhttp/OkHttpImagesPlugin.java b/markwon-image-okhttp/src/main/java/ru/noties/markwon/image/okhttp/OkHttpImagesPlugin.java index 36cc79fb..6a72136a 100644 --- a/markwon-image-okhttp/src/main/java/ru/noties/markwon/image/okhttp/OkHttpImagesPlugin.java +++ b/markwon-image-okhttp/src/main/java/ru/noties/markwon/image/okhttp/OkHttpImagesPlugin.java @@ -1,6 +1,6 @@ package ru.noties.markwon.image.okhttp; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import java.util.Arrays; diff --git a/markwon-image-okhttp/src/main/java/ru/noties/markwon/image/okhttp/OkHttpSchemeHandler.java b/markwon-image-okhttp/src/main/java/ru/noties/markwon/image/okhttp/OkHttpSchemeHandler.java index 32527bdf..e1ce930b 100644 --- a/markwon-image-okhttp/src/main/java/ru/noties/markwon/image/okhttp/OkHttpSchemeHandler.java +++ b/markwon-image-okhttp/src/main/java/ru/noties/markwon/image/okhttp/OkHttpSchemeHandler.java @@ -1,8 +1,8 @@ package ru.noties.markwon.image.okhttp; import android.net.Uri; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import java.io.IOException; import java.io.InputStream; diff --git a/markwon-image-picasso/src/main/java/io/noties/markwon/image/picasso/PicassoImagesPlugin.java b/markwon-image-picasso/src/main/java/io/noties/markwon/image/picasso/PicassoImagesPlugin.java index 5d3fc7b5..4e92fced 100644 --- a/markwon-image-picasso/src/main/java/io/noties/markwon/image/picasso/PicassoImagesPlugin.java +++ b/markwon-image-picasso/src/main/java/io/noties/markwon/image/picasso/PicassoImagesPlugin.java @@ -5,11 +5,12 @@ import android.content.res.Resources; import android.graphics.Bitmap; import android.graphics.drawable.BitmapDrawable; import android.graphics.drawable.Drawable; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; import android.text.Spanned; import android.widget.TextView; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; + import com.squareup.picasso.Picasso; import com.squareup.picasso.RequestCreator; import com.squareup.picasso.Target; diff --git a/markwon-image-svg/src/main/java/ru/noties/markwon/image/svg/SvgMediaDecoder.java b/markwon-image-svg/src/main/java/ru/noties/markwon/image/svg/SvgMediaDecoder.java index 8c8b9dcc..8b2a9527 100644 --- a/markwon-image-svg/src/main/java/ru/noties/markwon/image/svg/SvgMediaDecoder.java +++ b/markwon-image-svg/src/main/java/ru/noties/markwon/image/svg/SvgMediaDecoder.java @@ -5,8 +5,8 @@ import android.graphics.Bitmap; import android.graphics.Canvas; import android.graphics.drawable.BitmapDrawable; import android.graphics.drawable.Drawable; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import com.caverock.androidsvg.SVG; import com.caverock.androidsvg.SVGParseException; diff --git a/markwon-image-svg/src/main/java/ru/noties/markwon/image/svg/SvgPlugin.java b/markwon-image-svg/src/main/java/ru/noties/markwon/image/svg/SvgPlugin.java index c4486fc6..34573c9f 100644 --- a/markwon-image-svg/src/main/java/ru/noties/markwon/image/svg/SvgPlugin.java +++ b/markwon-image-svg/src/main/java/ru/noties/markwon/image/svg/SvgPlugin.java @@ -1,7 +1,7 @@ package ru.noties.markwon.image.svg; import android.content.res.Resources; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import ru.noties.markwon.AbstractMarkwonPlugin; import ru.noties.markwon.image.AsyncDrawableLoader; diff --git a/markwon-image/build.gradle b/markwon-image/build.gradle index 16c70814..2e0c86dd 100644 --- a/markwon-image/build.gradle +++ b/markwon-image/build.gradle @@ -17,11 +17,10 @@ dependencies { api project(':markwon-core') - // todo: note that it includes these implicitly deps.with { - api it['android-gif'] - api it['android-svg'] - api it['okhttp'] + compileOnly it['android-gif'] + compileOnly it['android-svg'] + compileOnly it['okhttp'] } deps['test'].with { diff --git a/markwon-image/src/main/java/io/noties/markwon/image/AsyncDrawableLoaderBuilder.java b/markwon-image/src/main/java/io/noties/markwon/image/AsyncDrawableLoaderBuilder.java index 7ee1116e..731aa449 100644 --- a/markwon-image/src/main/java/io/noties/markwon/image/AsyncDrawableLoaderBuilder.java +++ b/markwon-image/src/main/java/io/noties/markwon/image/AsyncDrawableLoaderBuilder.java @@ -1,7 +1,7 @@ package io.noties.markwon.image; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import java.util.HashMap; import java.util.Map; diff --git a/markwon-image/src/main/java/io/noties/markwon/image/AsyncDrawableLoaderImpl.java b/markwon-image/src/main/java/io/noties/markwon/image/AsyncDrawableLoaderImpl.java index 54e6c1b2..4428177c 100644 --- a/markwon-image/src/main/java/io/noties/markwon/image/AsyncDrawableLoaderImpl.java +++ b/markwon-image/src/main/java/io/noties/markwon/image/AsyncDrawableLoaderImpl.java @@ -5,11 +5,12 @@ import android.net.Uri; import android.os.Handler; import android.os.Looper; import android.os.SystemClock; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.annotation.VisibleForTesting; import android.util.Log; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.annotation.VisibleForTesting; + import java.util.HashMap; import java.util.Map; import java.util.concurrent.ExecutorService; diff --git a/markwon-image/src/main/java/io/noties/markwon/image/DefaultImageMediaDecoder.java b/markwon-image/src/main/java/io/noties/markwon/image/DefaultImageMediaDecoder.java index 3aec554a..e820ff45 100644 --- a/markwon-image/src/main/java/io/noties/markwon/image/DefaultImageMediaDecoder.java +++ b/markwon-image/src/main/java/io/noties/markwon/image/DefaultImageMediaDecoder.java @@ -5,8 +5,9 @@ import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.drawable.BitmapDrawable; import android.graphics.drawable.Drawable; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; + +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import java.io.InputStream; import java.util.Collection; diff --git a/markwon-image/src/main/java/io/noties/markwon/image/ImageItem.java b/markwon-image/src/main/java/io/noties/markwon/image/ImageItem.java index 8e62e010..191e3e10 100644 --- a/markwon-image/src/main/java/io/noties/markwon/image/ImageItem.java +++ b/markwon-image/src/main/java/io/noties/markwon/image/ImageItem.java @@ -1,8 +1,9 @@ package io.noties.markwon.image; import android.graphics.drawable.Drawable; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; + +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import java.io.InputStream; diff --git a/markwon-image/src/main/java/io/noties/markwon/image/ImagesPlugin.java b/markwon-image/src/main/java/io/noties/markwon/image/ImagesPlugin.java index 7a9a8df8..8c02695e 100644 --- a/markwon-image/src/main/java/io/noties/markwon/image/ImagesPlugin.java +++ b/markwon-image/src/main/java/io/noties/markwon/image/ImagesPlugin.java @@ -1,12 +1,13 @@ package io.noties.markwon.image; import android.graphics.drawable.Drawable; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.annotation.VisibleForTesting; import android.text.Spanned; import android.widget.TextView; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.annotation.VisibleForTesting; + import org.commonmark.node.Image; import java.util.concurrent.ExecutorService; diff --git a/markwon-image/src/main/java/io/noties/markwon/image/MediaDecoder.java b/markwon-image/src/main/java/io/noties/markwon/image/MediaDecoder.java index 6f05bb20..6b69ba03 100644 --- a/markwon-image/src/main/java/io/noties/markwon/image/MediaDecoder.java +++ b/markwon-image/src/main/java/io/noties/markwon/image/MediaDecoder.java @@ -1,8 +1,9 @@ package io.noties.markwon.image; import android.graphics.drawable.Drawable; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; + +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import java.io.InputStream; import java.util.Collection; diff --git a/markwon-image/src/main/java/io/noties/markwon/image/SchemeHandler.java b/markwon-image/src/main/java/io/noties/markwon/image/SchemeHandler.java index d16ffc0e..6a8ccbf1 100644 --- a/markwon-image/src/main/java/io/noties/markwon/image/SchemeHandler.java +++ b/markwon-image/src/main/java/io/noties/markwon/image/SchemeHandler.java @@ -1,7 +1,8 @@ package io.noties.markwon.image; import android.net.Uri; -import android.support.annotation.NonNull; + +import androidx.annotation.NonNull; import java.util.Collection; diff --git a/markwon-image/src/main/java/io/noties/markwon/image/data/DataUri.java b/markwon-image/src/main/java/io/noties/markwon/image/data/DataUri.java index 0d14bad9..cca96861 100644 --- a/markwon-image/src/main/java/io/noties/markwon/image/data/DataUri.java +++ b/markwon-image/src/main/java/io/noties/markwon/image/data/DataUri.java @@ -1,6 +1,6 @@ package io.noties.markwon.image.data; -import android.support.annotation.Nullable; +import androidx.annotation.Nullable; public class DataUri { diff --git a/markwon-image/src/main/java/io/noties/markwon/image/data/DataUriDecoder.java b/markwon-image/src/main/java/io/noties/markwon/image/data/DataUriDecoder.java index e802cad2..ce311d57 100644 --- a/markwon-image/src/main/java/io/noties/markwon/image/data/DataUriDecoder.java +++ b/markwon-image/src/main/java/io/noties/markwon/image/data/DataUriDecoder.java @@ -1,7 +1,7 @@ package io.noties.markwon.image.data; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import android.text.TextUtils; import android.util.Base64; diff --git a/markwon-image/src/main/java/io/noties/markwon/image/data/DataUriParser.java b/markwon-image/src/main/java/io/noties/markwon/image/data/DataUriParser.java index ad3311b2..5dc8f1ec 100644 --- a/markwon-image/src/main/java/io/noties/markwon/image/data/DataUriParser.java +++ b/markwon-image/src/main/java/io/noties/markwon/image/data/DataUriParser.java @@ -1,7 +1,7 @@ package io.noties.markwon.image.data; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; public abstract class DataUriParser { diff --git a/markwon-image/src/main/java/io/noties/markwon/image/data/DataUriSchemeHandler.java b/markwon-image/src/main/java/io/noties/markwon/image/data/DataUriSchemeHandler.java index 6ba1cb33..3a68c54e 100644 --- a/markwon-image/src/main/java/io/noties/markwon/image/data/DataUriSchemeHandler.java +++ b/markwon-image/src/main/java/io/noties/markwon/image/data/DataUriSchemeHandler.java @@ -1,7 +1,7 @@ package io.noties.markwon.image.data; import android.net.Uri; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import java.io.ByteArrayInputStream; import java.util.Collection; diff --git a/markwon-image/src/main/java/io/noties/markwon/image/file/FileSchemeHandler.java b/markwon-image/src/main/java/io/noties/markwon/image/file/FileSchemeHandler.java index 257fcfe8..43a969f5 100644 --- a/markwon-image/src/main/java/io/noties/markwon/image/file/FileSchemeHandler.java +++ b/markwon-image/src/main/java/io/noties/markwon/image/file/FileSchemeHandler.java @@ -3,8 +3,8 @@ package io.noties.markwon.image.file; import android.content.Context; import android.content.res.AssetManager; import android.net.Uri; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import android.text.TextUtils; import android.webkit.MimeTypeMap; diff --git a/markwon-image/src/main/java/io/noties/markwon/image/gif/GifMediaDecoder.java b/markwon-image/src/main/java/io/noties/markwon/image/gif/GifMediaDecoder.java index 508c6667..335cbb71 100644 --- a/markwon-image/src/main/java/io/noties/markwon/image/gif/GifMediaDecoder.java +++ b/markwon-image/src/main/java/io/noties/markwon/image/gif/GifMediaDecoder.java @@ -1,8 +1,8 @@ package io.noties.markwon.image.gif; import android.graphics.drawable.Drawable; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import java.io.ByteArrayOutputStream; import java.io.IOException; @@ -112,7 +112,7 @@ public class GifMediaDecoder extends MediaDecoder { static { boolean result = true; try { - GifDrawable.class.getName(); + pl.droidsonroids.gif.GifDrawable.class.getName(); } catch (Throwable t) { result = false; t.printStackTrace(); diff --git a/markwon-image/src/main/java/io/noties/markwon/image/network/NetworkSchemeHandler.java b/markwon-image/src/main/java/io/noties/markwon/image/network/NetworkSchemeHandler.java index 03c015e3..9eaff883 100644 --- a/markwon-image/src/main/java/io/noties/markwon/image/network/NetworkSchemeHandler.java +++ b/markwon-image/src/main/java/io/noties/markwon/image/network/NetworkSchemeHandler.java @@ -1,8 +1,8 @@ package io.noties.markwon.image.network; import android.net.Uri; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import java.io.BufferedInputStream; import java.io.IOException; diff --git a/markwon-image/src/main/java/io/noties/markwon/image/network/OkHttpNetworkSchemeHandler.java b/markwon-image/src/main/java/io/noties/markwon/image/network/OkHttpNetworkSchemeHandler.java index 5203d23a..3d7bea00 100644 --- a/markwon-image/src/main/java/io/noties/markwon/image/network/OkHttpNetworkSchemeHandler.java +++ b/markwon-image/src/main/java/io/noties/markwon/image/network/OkHttpNetworkSchemeHandler.java @@ -1,7 +1,7 @@ package io.noties.markwon.image.network; import android.net.Uri; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import java.io.InputStream; import java.util.Arrays; diff --git a/markwon-image/src/main/java/io/noties/markwon/image/svg/SvgMediaDecoder.java b/markwon-image/src/main/java/io/noties/markwon/image/svg/SvgMediaDecoder.java index 7482262e..9e58d1e7 100644 --- a/markwon-image/src/main/java/io/noties/markwon/image/svg/SvgMediaDecoder.java +++ b/markwon-image/src/main/java/io/noties/markwon/image/svg/SvgMediaDecoder.java @@ -5,8 +5,8 @@ import android.graphics.Bitmap; import android.graphics.Canvas; import android.graphics.drawable.BitmapDrawable; import android.graphics.drawable.Drawable; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import com.caverock.androidsvg.SVG; import com.caverock.androidsvg.SVGParseException; @@ -99,7 +99,7 @@ public class SvgMediaDecoder extends MediaDecoder { static { boolean result = true; try { - SVG.class.getName(); + com.caverock.androidsvg.SVG.class.getName(); } catch (Throwable t) { result = false; t.printStackTrace(); diff --git a/markwon-image/src/test/java/io/noties/markwon/image/AsyncDrawableLoaderImplTest.java b/markwon-image/src/test/java/io/noties/markwon/image/AsyncDrawableLoaderImplTest.java index c2e65dcd..f3beff49 100644 --- a/markwon-image/src/test/java/io/noties/markwon/image/AsyncDrawableLoaderImplTest.java +++ b/markwon-image/src/test/java/io/noties/markwon/image/AsyncDrawableLoaderImplTest.java @@ -3,8 +3,8 @@ package io.noties.markwon.image; import android.graphics.drawable.Drawable; import android.net.Uri; import android.os.Handler; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import org.junit.Before; import org.junit.Test; diff --git a/markwon-image/src/test/java/io/noties/markwon/image/ImagesPluginTest.java b/markwon-image/src/test/java/io/noties/markwon/image/ImagesPluginTest.java index f19b1563..faf25ebb 100644 --- a/markwon-image/src/test/java/io/noties/markwon/image/ImagesPluginTest.java +++ b/markwon-image/src/test/java/io/noties/markwon/image/ImagesPluginTest.java @@ -1,6 +1,6 @@ package io.noties.markwon.image; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import android.text.Spanned; import android.widget.TextView; diff --git a/markwon-image/src/test/java/io/noties/markwon/image/data/DataUriSchemeHandlerTest.java b/markwon-image/src/test/java/io/noties/markwon/image/data/DataUriSchemeHandlerTest.java index 58d9ffd2..d523595d 100644 --- a/markwon-image/src/test/java/io/noties/markwon/image/data/DataUriSchemeHandlerTest.java +++ b/markwon-image/src/test/java/io/noties/markwon/image/data/DataUriSchemeHandlerTest.java @@ -1,7 +1,7 @@ package io.noties.markwon.image.data; import android.net.Uri; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import org.junit.Before; import org.junit.Test; diff --git a/markwon-linkify/src/main/java/io/noties/markwon/linkify/LinkifyPlugin.java b/markwon-linkify/src/main/java/io/noties/markwon/linkify/LinkifyPlugin.java index 05098dcf..292884bf 100644 --- a/markwon-linkify/src/main/java/io/noties/markwon/linkify/LinkifyPlugin.java +++ b/markwon-linkify/src/main/java/io/noties/markwon/linkify/LinkifyPlugin.java @@ -1,10 +1,11 @@ package io.noties.markwon.linkify; -import android.support.annotation.IntDef; -import android.support.annotation.NonNull; import android.text.SpannableStringBuilder; import android.text.util.Linkify; +import androidx.annotation.IntDef; +import androidx.annotation.NonNull; + import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; diff --git a/markwon-recycler-table/src/main/java/io/noties/markwon/recycler/table/TableBorderDrawable.java b/markwon-recycler-table/src/main/java/io/noties/markwon/recycler/table/TableBorderDrawable.java index e78dbd84..8202ab84 100644 --- a/markwon-recycler-table/src/main/java/io/noties/markwon/recycler/table/TableBorderDrawable.java +++ b/markwon-recycler-table/src/main/java/io/noties/markwon/recycler/table/TableBorderDrawable.java @@ -5,10 +5,11 @@ import android.graphics.ColorFilter; import android.graphics.Paint; import android.graphics.PixelFormat; import android.graphics.drawable.Drawable; -import android.support.annotation.ColorInt; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.annotation.Px; + +import androidx.annotation.ColorInt; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.annotation.Px; class TableBorderDrawable extends Drawable { diff --git a/markwon-recycler-table/src/main/java/io/noties/markwon/recycler/table/TableEntry.java b/markwon-recycler-table/src/main/java/io/noties/markwon/recycler/table/TableEntry.java index 01190f29..2784221f 100644 --- a/markwon-recycler-table/src/main/java/io/noties/markwon/recycler/table/TableEntry.java +++ b/markwon-recycler-table/src/main/java/io/noties/markwon/recycler/table/TableEntry.java @@ -4,12 +4,6 @@ import android.annotation.SuppressLint; import android.content.Context; import android.content.res.Resources; import android.graphics.drawable.Drawable; -import android.support.annotation.ColorInt; -import android.support.annotation.IdRes; -import android.support.annotation.LayoutRes; -import android.support.annotation.NonNull; -import android.support.annotation.Px; -import android.support.annotation.VisibleForTesting; import android.view.Gravity; import android.view.LayoutInflater; import android.view.View; @@ -18,16 +12,23 @@ import android.widget.TableLayout; import android.widget.TableRow; import android.widget.TextView; +import androidx.annotation.ColorInt; +import androidx.annotation.IdRes; +import androidx.annotation.LayoutRes; +import androidx.annotation.NonNull; +import androidx.annotation.Px; +import androidx.annotation.VisibleForTesting; + import org.commonmark.ext.gfm.tables.TableBlock; import java.util.HashMap; import java.util.List; import java.util.Map; -import io.noties.markwon.recycler.MarkwonAdapter; -import io.noties.markwon.utils.NoCopySpannableFactory; import io.noties.markwon.Markwon; import io.noties.markwon.ext.tables.Table; +import io.noties.markwon.recycler.MarkwonAdapter; +import io.noties.markwon.utils.NoCopySpannableFactory; /** * @since 3.0.0 diff --git a/markwon-recycler-table/src/main/java/io/noties/markwon/recycler/table/TableEntryPlugin.java b/markwon-recycler-table/src/main/java/io/noties/markwon/recycler/table/TableEntryPlugin.java index 0a339c3a..b917bb19 100644 --- a/markwon-recycler-table/src/main/java/io/noties/markwon/recycler/table/TableEntryPlugin.java +++ b/markwon-recycler-table/src/main/java/io/noties/markwon/recycler/table/TableEntryPlugin.java @@ -1,7 +1,8 @@ package io.noties.markwon.recycler.table; import android.content.Context; -import android.support.annotation.NonNull; + +import androidx.annotation.NonNull; import org.commonmark.ext.gfm.tables.TablesExtension; import org.commonmark.parser.Parser; diff --git a/markwon-recycler-table/src/main/java/io/noties/markwon/recycler/table/TableEntryTheme.java b/markwon-recycler-table/src/main/java/io/noties/markwon/recycler/table/TableEntryTheme.java index 9164bd12..987499c6 100644 --- a/markwon-recycler-table/src/main/java/io/noties/markwon/recycler/table/TableEntryTheme.java +++ b/markwon-recycler-table/src/main/java/io/noties/markwon/recycler/table/TableEntryTheme.java @@ -1,12 +1,13 @@ package io.noties.markwon.recycler.table; import android.graphics.Paint; -import android.support.annotation.ColorInt; -import android.support.annotation.NonNull; -import android.support.annotation.Px; -import io.noties.markwon.utils.ColorUtils; +import androidx.annotation.ColorInt; +import androidx.annotation.NonNull; +import androidx.annotation.Px; + import io.noties.markwon.ext.tables.TableTheme; +import io.noties.markwon.utils.ColorUtils; /** * Mimics TableTheme to allow uniform table customization diff --git a/markwon-recycler/build.gradle b/markwon-recycler/build.gradle index a5a16087..63c7742e 100644 --- a/markwon-recycler/build.gradle +++ b/markwon-recycler/build.gradle @@ -18,7 +18,7 @@ dependencies { api project(':markwon-core') deps.with { - api it['support-recycler-view'] + api it['x-recycler-view'] } } diff --git a/markwon-recycler/src/main/java/io/noties/markwon/recycler/MarkwonAdapter.java b/markwon-recycler/src/main/java/io/noties/markwon/recycler/MarkwonAdapter.java index 99894ddd..265c9273 100644 --- a/markwon-recycler/src/main/java/io/noties/markwon/recycler/MarkwonAdapter.java +++ b/markwon-recycler/src/main/java/io/noties/markwon/recycler/MarkwonAdapter.java @@ -1,14 +1,15 @@ package io.noties.markwon.recycler; -import android.support.annotation.IdRes; -import android.support.annotation.LayoutRes; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; +import androidx.annotation.IdRes; +import androidx.annotation.LayoutRes; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.recyclerview.widget.RecyclerView; + import org.commonmark.node.Node; import java.util.List; diff --git a/markwon-recycler/src/main/java/io/noties/markwon/recycler/MarkwonAdapterImpl.java b/markwon-recycler/src/main/java/io/noties/markwon/recycler/MarkwonAdapterImpl.java index ea7c34d2..d773edcc 100644 --- a/markwon-recycler/src/main/java/io/noties/markwon/recycler/MarkwonAdapterImpl.java +++ b/markwon-recycler/src/main/java/io/noties/markwon/recycler/MarkwonAdapterImpl.java @@ -1,10 +1,11 @@ package io.noties.markwon.recycler; -import android.support.annotation.NonNull; import android.util.SparseArray; import android.view.LayoutInflater; import android.view.ViewGroup; +import androidx.annotation.NonNull; + import org.commonmark.node.Node; import java.util.Collections; diff --git a/markwon-recycler/src/main/java/io/noties/markwon/recycler/SimpleEntry.java b/markwon-recycler/src/main/java/io/noties/markwon/recycler/SimpleEntry.java index a876597a..b55be1fb 100644 --- a/markwon-recycler/src/main/java/io/noties/markwon/recycler/SimpleEntry.java +++ b/markwon-recycler/src/main/java/io/noties/markwon/recycler/SimpleEntry.java @@ -1,14 +1,15 @@ package io.noties.markwon.recycler; -import android.support.annotation.IdRes; -import android.support.annotation.LayoutRes; -import android.support.annotation.NonNull; import android.text.Spanned; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; +import androidx.annotation.IdRes; +import androidx.annotation.LayoutRes; +import androidx.annotation.NonNull; + import org.commonmark.node.Node; import java.util.HashMap; diff --git a/markwon-syntax-highlight/build.gradle b/markwon-syntax-highlight/build.gradle index 6d9353ff..4c6586ed 100644 --- a/markwon-syntax-highlight/build.gradle +++ b/markwon-syntax-highlight/build.gradle @@ -18,7 +18,6 @@ dependencies { api project(':markwon-core') deps.with { - api it['support-annotations'] api it['prism4j'] } } diff --git a/markwon-syntax-highlight/src/main/java/io/noties/markwon/syntax/Prism4jSyntaxHighlight.java b/markwon-syntax-highlight/src/main/java/io/noties/markwon/syntax/Prism4jSyntaxHighlight.java index a36a0170..cc78c401 100644 --- a/markwon-syntax-highlight/src/main/java/io/noties/markwon/syntax/Prism4jSyntaxHighlight.java +++ b/markwon-syntax-highlight/src/main/java/io/noties/markwon/syntax/Prism4jSyntaxHighlight.java @@ -1,11 +1,12 @@ package io.noties.markwon.syntax; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; import android.text.SpannableStringBuilder; import android.text.TextUtils; -import ru.noties.prism4j.Prism4j; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; + +import io.noties.prism4j.Prism4j; public class Prism4jSyntaxHighlight implements SyntaxHighlight { diff --git a/markwon-syntax-highlight/src/main/java/io/noties/markwon/syntax/Prism4jSyntaxVisitor.java b/markwon-syntax-highlight/src/main/java/io/noties/markwon/syntax/Prism4jSyntaxVisitor.java index 9fd14435..41056d9f 100644 --- a/markwon-syntax-highlight/src/main/java/io/noties/markwon/syntax/Prism4jSyntaxVisitor.java +++ b/markwon-syntax-highlight/src/main/java/io/noties/markwon/syntax/Prism4jSyntaxVisitor.java @@ -1,10 +1,11 @@ package io.noties.markwon.syntax; -import android.support.annotation.NonNull; import android.text.SpannableStringBuilder; -import ru.noties.prism4j.AbsVisitor; -import ru.noties.prism4j.Prism4j; +import androidx.annotation.NonNull; + +import io.noties.prism4j.AbsVisitor; +import io.noties.prism4j.Prism4j; class Prism4jSyntaxVisitor extends AbsVisitor { diff --git a/markwon-syntax-highlight/src/main/java/io/noties/markwon/syntax/Prism4jTheme.java b/markwon-syntax-highlight/src/main/java/io/noties/markwon/syntax/Prism4jTheme.java index 6f15c6ed..dff31736 100644 --- a/markwon-syntax-highlight/src/main/java/io/noties/markwon/syntax/Prism4jTheme.java +++ b/markwon-syntax-highlight/src/main/java/io/noties/markwon/syntax/Prism4jTheme.java @@ -1,10 +1,11 @@ package io.noties.markwon.syntax; -import android.support.annotation.ColorInt; -import android.support.annotation.NonNull; import android.text.SpannableStringBuilder; -import ru.noties.prism4j.Prism4j; +import androidx.annotation.ColorInt; +import androidx.annotation.NonNull; + +import io.noties.prism4j.Prism4j; public interface Prism4jTheme { diff --git a/markwon-syntax-highlight/src/main/java/io/noties/markwon/syntax/Prism4jThemeBase.java b/markwon-syntax-highlight/src/main/java/io/noties/markwon/syntax/Prism4jThemeBase.java index 16110cf0..abf71299 100644 --- a/markwon-syntax-highlight/src/main/java/io/noties/markwon/syntax/Prism4jThemeBase.java +++ b/markwon-syntax-highlight/src/main/java/io/noties/markwon/syntax/Prism4jThemeBase.java @@ -1,17 +1,18 @@ package io.noties.markwon.syntax; -import android.support.annotation.ColorInt; -import android.support.annotation.FloatRange; -import android.support.annotation.IntRange; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; import android.text.SpannableStringBuilder; import android.text.Spanned; import android.text.style.ForegroundColorSpan; +import androidx.annotation.ColorInt; +import androidx.annotation.FloatRange; +import androidx.annotation.IntRange; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; + import java.util.HashMap; -import ru.noties.prism4j.Prism4j; +import io.noties.prism4j.Prism4j; public abstract class Prism4jThemeBase implements Prism4jTheme { diff --git a/markwon-syntax-highlight/src/main/java/io/noties/markwon/syntax/Prism4jThemeDarkula.java b/markwon-syntax-highlight/src/main/java/io/noties/markwon/syntax/Prism4jThemeDarkula.java index df586fd0..5c9dcde3 100644 --- a/markwon-syntax-highlight/src/main/java/io/noties/markwon/syntax/Prism4jThemeDarkula.java +++ b/markwon-syntax-highlight/src/main/java/io/noties/markwon/syntax/Prism4jThemeDarkula.java @@ -1,13 +1,14 @@ package io.noties.markwon.syntax; -import android.support.annotation.ColorInt; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; import android.text.SpannableStringBuilder; import android.text.Spanned; -import io.noties.markwon.core.spans.StrongEmphasisSpan; +import androidx.annotation.ColorInt; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; + import io.noties.markwon.core.spans.EmphasisSpan; +import io.noties.markwon.core.spans.StrongEmphasisSpan; public class Prism4jThemeDarkula extends Prism4jThemeBase { diff --git a/markwon-syntax-highlight/src/main/java/io/noties/markwon/syntax/Prism4jThemeDefault.java b/markwon-syntax-highlight/src/main/java/io/noties/markwon/syntax/Prism4jThemeDefault.java index b44e46e7..86ecca7b 100644 --- a/markwon-syntax-highlight/src/main/java/io/noties/markwon/syntax/Prism4jThemeDefault.java +++ b/markwon-syntax-highlight/src/main/java/io/noties/markwon/syntax/Prism4jThemeDefault.java @@ -1,12 +1,13 @@ package io.noties.markwon.syntax; -import android.support.annotation.ColorInt; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; import android.text.SpannableStringBuilder; import android.text.Spanned; import android.text.style.BackgroundColorSpan; +import androidx.annotation.ColorInt; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; + import io.noties.markwon.core.spans.EmphasisSpan; import io.noties.markwon.core.spans.StrongEmphasisSpan; diff --git a/markwon-syntax-highlight/src/main/java/io/noties/markwon/syntax/SyntaxHighlightPlugin.java b/markwon-syntax-highlight/src/main/java/io/noties/markwon/syntax/SyntaxHighlightPlugin.java index 9bcefc38..f815fee4 100644 --- a/markwon-syntax-highlight/src/main/java/io/noties/markwon/syntax/SyntaxHighlightPlugin.java +++ b/markwon-syntax-highlight/src/main/java/io/noties/markwon/syntax/SyntaxHighlightPlugin.java @@ -1,12 +1,12 @@ package io.noties.markwon.syntax; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import io.noties.markwon.AbstractMarkwonPlugin; import io.noties.markwon.MarkwonConfiguration; import io.noties.markwon.core.MarkwonTheme; -import ru.noties.prism4j.Prism4j; +import io.noties.prism4j.Prism4j; public class SyntaxHighlightPlugin extends AbstractMarkwonPlugin { diff --git a/markwon-test-span/build.gradle b/markwon-test-span/build.gradle index cba39010..0e519e25 100644 --- a/markwon-test-span/build.gradle +++ b/markwon-test-span/build.gradle @@ -15,7 +15,7 @@ android { dependencies { - api deps['support-annotations'] + api deps['x-annotations'] deps['test'].with { api it['junit'] diff --git a/markwon-test-span/src/main/java/io/noties/markwon/test/TestSpan.java b/markwon-test-span/src/main/java/io/noties/markwon/test/TestSpan.java index fe41dd2a..595391bd 100644 --- a/markwon-test-span/src/main/java/io/noties/markwon/test/TestSpan.java +++ b/markwon-test-span/src/main/java/io/noties/markwon/test/TestSpan.java @@ -1,6 +1,6 @@ package io.noties.markwon.test; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import java.util.ArrayList; import java.util.Collections; diff --git a/markwon-test-span/src/main/java/io/noties/markwon/test/TestSpanDocument.java b/markwon-test-span/src/main/java/io/noties/markwon/test/TestSpanDocument.java index 91b479db..ae94c89d 100644 --- a/markwon-test-span/src/main/java/io/noties/markwon/test/TestSpanDocument.java +++ b/markwon-test-span/src/main/java/io/noties/markwon/test/TestSpanDocument.java @@ -1,6 +1,6 @@ package io.noties.markwon.test; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import java.util.List; diff --git a/markwon-test-span/src/main/java/io/noties/markwon/test/TestSpanEnumerator.java b/markwon-test-span/src/main/java/io/noties/markwon/test/TestSpanEnumerator.java index 7e75f149..807656a2 100644 --- a/markwon-test-span/src/main/java/io/noties/markwon/test/TestSpanEnumerator.java +++ b/markwon-test-span/src/main/java/io/noties/markwon/test/TestSpanEnumerator.java @@ -1,6 +1,6 @@ package io.noties.markwon.test; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; public class TestSpanEnumerator { diff --git a/markwon-test-span/src/main/java/io/noties/markwon/test/TestSpanMatcher.java b/markwon-test-span/src/main/java/io/noties/markwon/test/TestSpanMatcher.java index a3cf1b57..372a4f7a 100644 --- a/markwon-test-span/src/main/java/io/noties/markwon/test/TestSpanMatcher.java +++ b/markwon-test-span/src/main/java/io/noties/markwon/test/TestSpanMatcher.java @@ -1,8 +1,8 @@ package io.noties.markwon.test; -import android.support.annotation.NonNull; import android.text.Spanned; +import androidx.annotation.NonNull; import org.junit.Assert; import org.junit.ComparisonFailure; diff --git a/markwon-test-span/src/main/java/io/noties/markwon/test/TestSpanSpan.java b/markwon-test-span/src/main/java/io/noties/markwon/test/TestSpanSpan.java index f51a32ba..b7e41f5d 100644 --- a/markwon-test-span/src/main/java/io/noties/markwon/test/TestSpanSpan.java +++ b/markwon-test-span/src/main/java/io/noties/markwon/test/TestSpanSpan.java @@ -1,6 +1,6 @@ package io.noties.markwon.test; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import java.util.List; import java.util.Map; diff --git a/markwon-test-span/src/main/java/io/noties/markwon/test/TestSpanText.java b/markwon-test-span/src/main/java/io/noties/markwon/test/TestSpanText.java index 995d3541..64895af9 100644 --- a/markwon-test-span/src/main/java/io/noties/markwon/test/TestSpanText.java +++ b/markwon-test-span/src/main/java/io/noties/markwon/test/TestSpanText.java @@ -1,6 +1,6 @@ package io.noties.markwon.test; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import java.util.Collections; import java.util.List; diff --git a/sample/build.gradle b/sample/build.gradle index df6695e4..f624824b 100644 --- a/sample/build.gradle +++ b/sample/build.gradle @@ -44,15 +44,10 @@ dependencies { implementation project(':markwon-recycler') implementation project(':markwon-recycler-table') - // these are for glide - implementation 'com.android.support:animated-vector-drawable:28.0.0' - implementation 'com.android.support:support-fragment:28.0.0' - - implementation project(':markwon-image-glide') implementation project(':markwon-image-picasso') deps.with { - implementation it['support-recycler-view'] + implementation it['x-recycler-view'] implementation it['okhttp'] implementation it['prism4j'] implementation it['debug'] diff --git a/sample/src/main/java/io/noties/markwon/sample/MainActivity.java b/sample/src/main/java/io/noties/markwon/sample/MainActivity.java index 4d9bee65..a7805f52 100644 --- a/sample/src/main/java/io/noties/markwon/sample/MainActivity.java +++ b/sample/src/main/java/io/noties/markwon/sample/MainActivity.java @@ -4,10 +4,11 @@ import android.app.Activity; import android.content.Context; import android.content.Intent; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.VisibleForTesting; -import android.support.v7.widget.LinearLayoutManager; -import android.support.v7.widget.RecyclerView; + +import androidx.annotation.NonNull; +import androidx.annotation.VisibleForTesting; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; import java.util.ArrayList; import java.util.List; diff --git a/sample/src/main/java/io/noties/markwon/sample/Sample.java b/sample/src/main/java/io/noties/markwon/sample/Sample.java index 8e20c80d..459ef4c8 100644 --- a/sample/src/main/java/io/noties/markwon/sample/Sample.java +++ b/sample/src/main/java/io/noties/markwon/sample/Sample.java @@ -1,6 +1,6 @@ package io.noties.markwon.sample; -import android.support.annotation.StringRes; +import androidx.annotation.StringRes; public enum Sample { diff --git a/sample/src/main/java/io/noties/markwon/sample/SampleItem.java b/sample/src/main/java/io/noties/markwon/sample/SampleItem.java index 57266e49..aa71551b 100644 --- a/sample/src/main/java/io/noties/markwon/sample/SampleItem.java +++ b/sample/src/main/java/io/noties/markwon/sample/SampleItem.java @@ -1,12 +1,13 @@ package io.noties.markwon.sample; -import android.support.annotation.NonNull; import android.text.Spanned; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; +import androidx.annotation.NonNull; + import io.noties.adapt.Item; import io.noties.markwon.Markwon; import io.noties.markwon.utils.NoCopySpannableFactory; diff --git a/sample/src/main/java/io/noties/markwon/sample/SampleItemDecoration.java b/sample/src/main/java/io/noties/markwon/sample/SampleItemDecoration.java index 16a04286..3a3ad1d5 100644 --- a/sample/src/main/java/io/noties/markwon/sample/SampleItemDecoration.java +++ b/sample/src/main/java/io/noties/markwon/sample/SampleItemDecoration.java @@ -3,11 +3,12 @@ package io.noties.markwon.sample; import android.graphics.Canvas; import android.graphics.Paint; import android.graphics.Rect; -import android.support.annotation.ColorInt; -import android.support.annotation.Px; -import android.support.v7.widget.RecyclerView; import android.view.View; +import androidx.annotation.ColorInt; +import androidx.annotation.Px; +import androidx.recyclerview.widget.RecyclerView; + class SampleItemDecoration extends RecyclerView.ItemDecoration { private final Rect rect = new Rect(); diff --git a/sample/src/main/java/io/noties/markwon/sample/basicplugins/BasicPluginsActivity.java b/sample/src/main/java/io/noties/markwon/sample/basicplugins/BasicPluginsActivity.java index 8e6c2500..df22cf06 100644 --- a/sample/src/main/java/io/noties/markwon/sample/basicplugins/BasicPluginsActivity.java +++ b/sample/src/main/java/io/noties/markwon/sample/basicplugins/BasicPluginsActivity.java @@ -4,27 +4,21 @@ import android.app.Activity; import android.graphics.Color; import android.net.Uri; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; import android.text.Layout; import android.text.TextUtils; import android.text.style.AlignmentSpan; import android.text.style.ForegroundColorSpan; import android.widget.TextView; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; + import org.commonmark.node.Heading; import org.commonmark.node.Paragraph; import java.util.Collection; import java.util.Collections; -import io.noties.markwon.core.MarkwonTheme; -import io.noties.markwon.html.HtmlTag; -import io.noties.markwon.image.ImageItem; -import io.noties.markwon.image.ImagesPlugin; -import io.noties.markwon.image.SchemeHandler; -import io.noties.markwon.image.network.NetworkSchemeHandler; -import io.noties.markwon.movement.MovementMethodPlugin; import io.noties.markwon.AbstractMarkwonPlugin; import io.noties.markwon.Markwon; import io.noties.markwon.MarkwonConfiguration; @@ -32,8 +26,15 @@ import io.noties.markwon.MarkwonPlugin; import io.noties.markwon.MarkwonSpansFactory; import io.noties.markwon.MarkwonVisitor; import io.noties.markwon.RenderProps; +import io.noties.markwon.core.MarkwonTheme; import io.noties.markwon.html.HtmlPlugin; +import io.noties.markwon.html.HtmlTag; import io.noties.markwon.html.tag.SimpleTagHandler; +import io.noties.markwon.image.ImageItem; +import io.noties.markwon.image.ImagesPlugin; +import io.noties.markwon.image.SchemeHandler; +import io.noties.markwon.image.network.NetworkSchemeHandler; +import io.noties.markwon.movement.MovementMethodPlugin; public class BasicPluginsActivity extends Activity { diff --git a/sample/src/main/java/io/noties/markwon/sample/core/CoreActivity.java b/sample/src/main/java/io/noties/markwon/sample/core/CoreActivity.java index f208fa07..f1a67f50 100644 --- a/sample/src/main/java/io/noties/markwon/sample/core/CoreActivity.java +++ b/sample/src/main/java/io/noties/markwon/sample/core/CoreActivity.java @@ -2,15 +2,16 @@ package io.noties.markwon.sample.core; import android.app.Activity; import android.os.Bundle; -import android.support.annotation.Nullable; import android.text.Spanned; import android.widget.TextView; import android.widget.Toast; +import androidx.annotation.Nullable; + import org.commonmark.node.Node; -import io.noties.markwon.core.CorePlugin; import io.noties.markwon.Markwon; +import io.noties.markwon.core.CorePlugin; public class CoreActivity extends Activity { diff --git a/sample/src/main/java/io/noties/markwon/sample/customextension/CustomExtensionActivity.java b/sample/src/main/java/io/noties/markwon/sample/customextension/CustomExtensionActivity.java index c8615331..99bd6d4c 100644 --- a/sample/src/main/java/io/noties/markwon/sample/customextension/CustomExtensionActivity.java +++ b/sample/src/main/java/io/noties/markwon/sample/customextension/CustomExtensionActivity.java @@ -2,9 +2,10 @@ package io.noties.markwon.sample.customextension; import android.app.Activity; import android.os.Bundle; -import android.support.annotation.Nullable; import android.widget.TextView; +import androidx.annotation.Nullable; + import io.noties.markwon.Markwon; import io.noties.markwon.sample.R; diff --git a/sample/src/main/java/io/noties/markwon/sample/customextension/IconNode.java b/sample/src/main/java/io/noties/markwon/sample/customextension/IconNode.java index c0a2f75b..92447920 100644 --- a/sample/src/main/java/io/noties/markwon/sample/customextension/IconNode.java +++ b/sample/src/main/java/io/noties/markwon/sample/customextension/IconNode.java @@ -1,6 +1,6 @@ package io.noties.markwon.sample.customextension; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import org.commonmark.node.CustomNode; import org.commonmark.node.Delimited; diff --git a/sample/src/main/java/io/noties/markwon/sample/customextension/IconPlugin.java b/sample/src/main/java/io/noties/markwon/sample/customextension/IconPlugin.java index bf39834c..e8459dd3 100644 --- a/sample/src/main/java/io/noties/markwon/sample/customextension/IconPlugin.java +++ b/sample/src/main/java/io/noties/markwon/sample/customextension/IconPlugin.java @@ -1,8 +1,9 @@ package io.noties.markwon.sample.customextension; -import android.support.annotation.NonNull; import android.text.TextUtils; +import androidx.annotation.NonNull; + import org.commonmark.parser.Parser; import io.noties.markwon.AbstractMarkwonPlugin; diff --git a/sample/src/main/java/io/noties/markwon/sample/customextension/IconProcessor.java b/sample/src/main/java/io/noties/markwon/sample/customextension/IconProcessor.java index 0fa1797b..484575fb 100644 --- a/sample/src/main/java/io/noties/markwon/sample/customextension/IconProcessor.java +++ b/sample/src/main/java/io/noties/markwon/sample/customextension/IconProcessor.java @@ -1,8 +1,9 @@ package io.noties.markwon.sample.customextension; -import android.support.annotation.NonNull; import android.text.TextUtils; +import androidx.annotation.NonNull; + import org.commonmark.node.Node; import org.commonmark.node.Text; import org.commonmark.parser.delimiter.DelimiterProcessor; diff --git a/sample/src/main/java/io/noties/markwon/sample/customextension/IconSpan.java b/sample/src/main/java/io/noties/markwon/sample/customextension/IconSpan.java index b055233d..acc2096f 100644 --- a/sample/src/main/java/io/noties/markwon/sample/customextension/IconSpan.java +++ b/sample/src/main/java/io/noties/markwon/sample/customextension/IconSpan.java @@ -4,11 +4,12 @@ import android.graphics.Canvas; import android.graphics.Paint; import android.graphics.Rect; import android.graphics.drawable.Drawable; -import android.support.annotation.IntDef; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; import android.text.style.ReplacementSpan; +import androidx.annotation.IntDef; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; + import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; diff --git a/sample/src/main/java/io/noties/markwon/sample/customextension/IconSpanProvider.java b/sample/src/main/java/io/noties/markwon/sample/customextension/IconSpanProvider.java index a324ae35..24f542e8 100644 --- a/sample/src/main/java/io/noties/markwon/sample/customextension/IconSpanProvider.java +++ b/sample/src/main/java/io/noties/markwon/sample/customextension/IconSpanProvider.java @@ -4,8 +4,9 @@ import android.content.Context; import android.content.res.Resources; import android.graphics.drawable.Drawable; import android.os.Build; -import android.support.annotation.DrawableRes; -import android.support.annotation.NonNull; + +import androidx.annotation.DrawableRes; +import androidx.annotation.NonNull; @SuppressWarnings("WeakerAccess") public abstract class IconSpanProvider { diff --git a/sample/src/main/java/io/noties/markwon/sample/latex/LatexActivity.java b/sample/src/main/java/io/noties/markwon/sample/latex/LatexActivity.java index 6c94afa9..2eea4fed 100644 --- a/sample/src/main/java/io/noties/markwon/sample/latex/LatexActivity.java +++ b/sample/src/main/java/io/noties/markwon/sample/latex/LatexActivity.java @@ -2,11 +2,12 @@ package io.noties.markwon.sample.latex; import android.app.Activity; import android.os.Bundle; -import android.support.annotation.Nullable; import android.widget.TextView; -import io.noties.markwon.ext.latex.JLatexMathPlugin; +import androidx.annotation.Nullable; + import io.noties.markwon.Markwon; +import io.noties.markwon.ext.latex.JLatexMathPlugin; import io.noties.markwon.sample.R; public class LatexActivity extends Activity { diff --git a/sample/src/main/java/io/noties/markwon/sample/recycler/RecyclerActivity.java b/sample/src/main/java/io/noties/markwon/sample/recycler/RecyclerActivity.java index 077bf967..bbd6f890 100644 --- a/sample/src/main/java/io/noties/markwon/sample/recycler/RecyclerActivity.java +++ b/sample/src/main/java/io/noties/markwon/sample/recycler/RecyclerActivity.java @@ -4,12 +4,13 @@ import android.app.Activity; import android.content.Context; import android.net.Uri; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v7.widget.LinearLayoutManager; -import android.support.v7.widget.RecyclerView; import android.text.TextUtils; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; + import org.commonmark.ext.gfm.tables.TableBlock; import org.commonmark.node.FencedCodeBlock; @@ -18,6 +19,8 @@ import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; +import io.noties.debug.AndroidLogDebugOutput; +import io.noties.debug.Debug; import io.noties.markwon.AbstractMarkwonPlugin; import io.noties.markwon.Markwon; import io.noties.markwon.MarkwonConfiguration; @@ -32,8 +35,6 @@ import io.noties.markwon.recycler.table.TableEntryPlugin; import io.noties.markwon.sample.R; import io.noties.markwon.urlprocessor.UrlProcessor; import io.noties.markwon.urlprocessor.UrlProcessorRelativeToAbsolute; -import io.noties.debug.AndroidLogDebugOutput; -import io.noties.debug.Debug; public class RecyclerActivity extends Activity { diff --git a/sample/src/main/java/io/noties/markwon/sample/theme/ThemeActivity.java b/sample/src/main/java/io/noties/markwon/sample/theme/ThemeActivity.java index bec1afa6..bddaef52 100644 --- a/sample/src/main/java/io/noties/markwon/sample/theme/ThemeActivity.java +++ b/sample/src/main/java/io/noties/markwon/sample/theme/ThemeActivity.java @@ -2,7 +2,8 @@ package io.noties.markwon.sample.theme; import android.app.Activity; import android.os.Bundle; -import android.support.annotation.Nullable; + +import androidx.annotation.Nullable; import io.noties.markwon.sample.R; diff --git a/sample/src/main/res/layout/activity_main.xml b/sample/src/main/res/layout/activity_main.xml index 26bc9906..f0dfd7fd 100644 --- a/sample/src/main/res/layout/activity_main.xml +++ b/sample/src/main/res/layout/activity_main.xml @@ -3,7 +3,7 @@ android:layout_width="match_parent" android:layout_height="match_parent"> - - \ No newline at end of file