Move artifacts to 'ru.noties.markwon' group
This commit is contained in:
parent
27daced93e
commit
702f2a0546
@ -28,7 +28,7 @@ android {
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
|
||||||
implementation project(':markwon')
|
implementation project(':markwon-core')
|
||||||
implementation project(':markwon-ext-strikethrough')
|
implementation project(':markwon-ext-strikethrough')
|
||||||
implementation project(':markwon-ext-tables')
|
implementation project(':markwon-ext-tables')
|
||||||
implementation project(':markwon-ext-tasklist')
|
implementation project(':markwon-ext-tasklist')
|
||||||
|
@ -19,6 +19,10 @@ allprojects {
|
|||||||
}
|
}
|
||||||
version = VERSION_NAME
|
version = VERSION_NAME
|
||||||
group = GROUP
|
group = GROUP
|
||||||
|
|
||||||
|
tasks.withType(Javadoc) {
|
||||||
|
options.addStringOption('Xdoclint:none', '-quiet')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
task clean(type: Delete) {
|
task clean(type: Delete) {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
|
|
||||||
// this is a generated file, do not modify. To update it run 'collectArtifacts.js' script
|
// this is a generated file, do not modify. To update it run 'collectArtifacts.js' script
|
||||||
const artifacts = [{"id":"markwon","name":"Markwon","group":"ru.noties","description":"Core Markwon artifact that includes basic markdown parsing and rendering"},{"id":"markwon-ext-strikethrough","name":"Markwon-Ext-Strikethrough","group":"ru.noties"},{"id":"markwon-html-parser-impl","name":"Markwon","group":"ru.noties"},{"id":"markwon-syntax-highlight","name":"Markwon","group":"ru.noties"},{"id":"markwon-view","name":"Markwon-View","group":"ru.noties"}];
|
const artifacts = [{"id":"core","name":"Core","group":"ru.noties.markwon","description":"Core Markwon artifact that includes basic markdown parsing and rendering"},{"id":"ext-latex","name":"LaTeX","group":"ru.noties.markwon","description":"Extension to add LaTeX formulas to Markwon markdown"},{"id":"ext-strikethrough","name":"Strikethrough","group":"ru.noties.markwon","description":"Extension to add strikethrough markup to Markwon markdown"},{"id":"ext-tables","name":"Tables","group":"ru.noties.markwon","description":"Extension to add tables markup (GFM) to Markwon markdown"},{"id":"ext-tasklist","name":"Task List","group":"ru.noties.markwon","description":"Extension to add task lists (GFM) to Markwon markdown"},{"id":"html","name":"HTML","group":"ru.noties.markwon","description":"Provides HTML parsing functionality"},{"id":"image-gif","name":"Image GIF","group":"ru.noties.markwon","description":"Adds GIF media support to Markwon markdown"},{"id":"image-okhttp","name":"Image OkHttp","group":"ru.noties.markwon","description":"Adds OkHttp client to retrieve images data from network"},{"id":"image-svg","name":"Image SVG","group":"ru.noties.markwon","description":"Adds SVG media support to Markwon markdown"},{"id":"recycler","name":"Recycler","group":"ru.noties.markwon","description":"Provides RecyclerView.Adapter to display Markwon markdown"},{"id":"syntax-highlight","name":"Syntax Highlight","group":"ru.noties.markwon","description":"Add syntax highlight to Markwon markdown via Prism4j library"}];
|
||||||
export { artifacts };
|
export { artifacts };
|
||||||
|
@ -42,7 +42,7 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
artifacts,
|
artifacts,
|
||||||
selected: []
|
selected: ['core']
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@ -86,6 +86,7 @@ export default {
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
|
margin-top: 0.5em;
|
||||||
}
|
}
|
||||||
.artifact {
|
.artifact {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
|
@ -1,17 +1,22 @@
|
|||||||
<template>
|
<template>
|
||||||
<a :href="mavenSearchUrl()"><img :src="shieldImgageUrl()" :alt="'' + artifact"></a>
|
<a :href="mavenSearchUrl()"><img :src="shieldImgageUrl()" :alt="displayLabel"></a>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: 'MavenBadge',
|
name: 'MavenBadge',
|
||||||
props: ['artifact'],
|
props: ['artifact', 'label'],
|
||||||
methods: {
|
methods: {
|
||||||
mavenSearchUrl: function() {
|
mavenSearchUrl: function() {
|
||||||
return 'http://search.maven.org/#search|ga|1|g%3A%22ru.noties%22%20AND%20a%3A%22' + this.artifact + '%22';
|
return `http://search.maven.org/#search|ga|1|g%3A%22ru.noties.markwon%22%20AND%20a%3A%22${this.artifact}%22`;
|
||||||
},
|
},
|
||||||
shieldImgageUrl: function() {
|
shieldImgageUrl: function() {
|
||||||
return 'https://img.shields.io/maven-central/v/ru.noties/' + this.artifact +'.svg?label=' + this.artifact;
|
return `https://img.shields.io/maven-central/v/ru.noties.markwon/${this.artifact}.svg?label=${this.displayLabel}`;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
displayLabel() {
|
||||||
|
return this.label || this.artifact;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -17,14 +17,28 @@ module.exports = {
|
|||||||
],
|
],
|
||||||
sidebar: [
|
sidebar: [
|
||||||
'/',
|
'/',
|
||||||
'/docs/getting-started.md',
|
{
|
||||||
|
title: 'Core',
|
||||||
|
children: [
|
||||||
|
'/docs/core/getting-started.md'
|
||||||
|
]
|
||||||
|
},
|
||||||
'/docs/configure.md',
|
'/docs/configure.md',
|
||||||
'/docs/theme.md',
|
'/docs/theme.md',
|
||||||
'/docs/factory.md',
|
'/docs/factory.md',
|
||||||
|
{
|
||||||
|
title: 'Image',
|
||||||
|
children: [
|
||||||
|
'/docs/image/gif.md',
|
||||||
|
'/docs/image/okhttp.md',
|
||||||
|
'/docs/image/svg.md'
|
||||||
|
]
|
||||||
|
},
|
||||||
'/docs/image-loader.md',
|
'/docs/image-loader.md',
|
||||||
'/docs/syntax-highlight.md',
|
'/docs/syntax-highlight.md',
|
||||||
'/docs/html.md',
|
'/docs/html.md',
|
||||||
'/docs/view.md'
|
'/docs/migration-2-3.md'
|
||||||
|
|
||||||
],
|
],
|
||||||
sidebarDepth: 2,
|
sidebarDepth: 2,
|
||||||
lastUpdated: true
|
lastUpdated: true
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
div[class~=language-gradle]:before {
|
div[class~=language-gradle]:before {
|
||||||
content:"gradle"
|
content:"gradle"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
div[class~=language-proguard]:before {
|
||||||
|
content:"proguard"
|
||||||
|
}
|
@ -1,11 +1,12 @@
|
|||||||
---
|
---
|
||||||
title: 'Overview'
|
title: 'Introduction'
|
||||||
---
|
---
|
||||||
|
|
||||||
<img :src="$withBase('./art/markwon_logo.png')" alt="Markwon Logo" width="50%">
|
<img :src="$withBase('./art/markwon_logo.png')" alt="Markwon Logo" width="50%">
|
||||||
|
|
||||||
<br><br>
|
<br><br>
|
||||||
<MavenBadges/>
|
[](http://search.maven.org/#search|ga|1|g%3A%22ru.noties.markwon%22%20)
|
||||||
|
[](https://travis-ci.org/noties/Markwon)
|
||||||
|
|
||||||
**Markwon** is a markdown library for Android. It parses markdown following
|
**Markwon** is a markdown library for Android. It parses markdown following
|
||||||
<Link name="commonmark-spec" /> with the help of amazing <Link name="commonmark-java" /> library
|
<Link name="commonmark-spec" /> with the help of amazing <Link name="commonmark-java" /> library
|
||||||
|
@ -23,6 +23,12 @@ final CharSequence markdown = Markwon.markdown(context, "**Hello there!**");
|
|||||||
Toast.makeText(context, markdown, Toast.LENGTH_LONG).show();
|
Toast.makeText(context, markdown, Toast.LENGTH_LONG).show();
|
||||||
```
|
```
|
||||||
|
|
||||||
|
:::warning v3 migration
|
||||||
|
Starting with <Badge text="3.0.0" /> version Markwon no longer relies on static
|
||||||
|
utility methods. To learn more about migrating existing applications
|
||||||
|
refer to [migration](/docs/migration-2-3.md) section.
|
||||||
|
:::
|
||||||
|
|
||||||
## Longer one
|
## Longer one
|
||||||
|
|
||||||
When you need to customize markdown parsing/rendering you can use [SpannableConfiguration](/docs/configure.md):
|
When you need to customize markdown parsing/rendering you can use [SpannableConfiguration](/docs/configure.md):
|
3
docs/docs/image/gif.md
Normal file
3
docs/docs/image/gif.md
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
# Image GIF
|
||||||
|
|
||||||
|
<MavenBadge :artifact="'image-gif'" />
|
9
docs/docs/image/okhttp.md
Normal file
9
docs/docs/image/okhttp.md
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
# Image OkHttp
|
||||||
|
|
||||||
|
<MavenBadge :artifact="'image-okhttp'" />
|
||||||
|
|
||||||
|
## Proguard
|
||||||
|
```proguard
|
||||||
|
-dontwarn okhttp3.**
|
||||||
|
-dontwarn okio.**
|
||||||
|
```
|
10
docs/docs/image/svg.md
Normal file
10
docs/docs/image/svg.md
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
# Image SVG
|
||||||
|
|
||||||
|
<MavenBadge :artifact="'image-svg'" />
|
||||||
|
|
||||||
|
## Proguard
|
||||||
|
|
||||||
|
```proguard
|
||||||
|
-keep class com.caverock.androidsvg.** { *; }
|
||||||
|
-dontwarn com.caverock.androidsvg.**
|
||||||
|
```
|
@ -1,89 +1,17 @@
|
|||||||
---
|
---
|
||||||
prev: false
|
prev: false
|
||||||
next: /docs/getting-started.md
|
next: /docs/core/getting-started.md
|
||||||
---
|
---
|
||||||
|
|
||||||
# Installation
|
# Installation
|
||||||
|
|
||||||
<MavenBadges />
|

|
||||||
|

|
||||||
|
|
||||||
In order to start using `Markwon` add this to your dependencies block
|
<ArtifactPicker />
|
||||||
in your projects `build.gradle`:
|
|
||||||
|
|
||||||
```groovy
|
|
||||||
implementation "ru.noties:markwon:${markwonVersion}"
|
|
||||||
```
|
|
||||||
|
|
||||||
This is core artifact that is sufficient to start displaying markdown in your Android applications.
|
|
||||||
|
|
||||||
`Markwon` comes with more artifacts that cover additional functionality, but they are
|
|
||||||
**not** required to be used, as most of them provide implementations for functionality
|
|
||||||
that is _interfaced_ in the core artifact
|
|
||||||
|
|
||||||
```groovy
|
|
||||||
implementation "ru.noties:markwon-image-loader:${markwonVersion}"
|
|
||||||
implementation "ru.noties:markwon-syntax-highlight:${markwonVersion}"
|
|
||||||
implementation "ru.noties:markwon-view:${markwonVersion}"
|
|
||||||
```
|
|
||||||
|
|
||||||
These artifacts share the same _version_ as the core artifact
|
|
||||||
|
|
||||||
### Image loader
|
|
||||||
|
|
||||||
```groovy
|
|
||||||
implementation "ru.noties:markwon-image-loader:${markwonVersion}"
|
|
||||||
```
|
|
||||||
|
|
||||||
Provides implementation of `AsyncDrawable.Loader` and comes with support for:
|
|
||||||
* SVG
|
|
||||||
* GIF
|
|
||||||
* Other image formats
|
|
||||||
|
|
||||||
Please refer to documentation for [image loader](/docs/image-loader.md) module
|
|
||||||
|
|
||||||
### Syntax highlight
|
|
||||||
|
|
||||||
```groovy
|
|
||||||
implementation "ru.noties:markwon-syntax-highlight:${markwonVersion}"
|
|
||||||
```
|
|
||||||
|
|
||||||
Provides implementation of `SyntaxHighlight` and allows various syntax highlighting
|
|
||||||
in your markdown based Android applications. Comes with 2 ready-to-be-used themes: `light` and `dark`.
|
|
||||||
Please refer to documentation for [syntax highlight](/docs/syntax-highlight.md) module
|
|
||||||
|
|
||||||
### View
|
|
||||||
|
|
||||||
```groovy
|
|
||||||
implementation "ru.noties:markwon-view:${markwonVersion}"
|
|
||||||
```
|
|
||||||
|
|
||||||
Provides 2 widgets to display markdown: `MarkwonView` and `MarkwonViewCompat` (subclasses
|
|
||||||
of `TextView` and `AppCompatTextView` respectively).
|
|
||||||
Please refer to documentation for [view](/docs/view.md) module
|
|
||||||
|
|
||||||
## Proguard
|
|
||||||
|
|
||||||
When using `markwon-image-loader` artifact and Proguard is enabled, add these rules
|
|
||||||
to your proguard configuration:
|
|
||||||
|
|
||||||
```proguard
|
|
||||||
-dontwarn okhttp3.**
|
|
||||||
-dontwarn okio.**
|
|
||||||
|
|
||||||
-keep class com.caverock.androidsvg.** { *; }
|
|
||||||
-dontwarn com.caverock.androidsvg.**
|
|
||||||
```
|
|
||||||
|
|
||||||
They come from dependencies that `markwon-image-loader` is using.
|
|
||||||
|
|
||||||
:::tip Other artifacts
|
|
||||||
Other artifacts do not require special Proguard rules
|
|
||||||
:::
|
|
||||||
|
|
||||||
## Snapshot
|
## Snapshot
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
In order to use latest `SNAPSHOT` version add snapshot repository
|
In order to use latest `SNAPSHOT` version add snapshot repository
|
||||||
to your root project's `build.gradle` file:
|
to your root project's `build.gradle` file:
|
||||||
|
|
||||||
@ -92,18 +20,19 @@ allprojects {
|
|||||||
repositories {
|
repositories {
|
||||||
jcenter()
|
jcenter()
|
||||||
google()
|
google()
|
||||||
maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' }
|
maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' } // <- this one
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
and then in your module `build.gradle`:
|
and then in your module `build.gradle`:
|
||||||
|
|
||||||
```groovy
|
```gradle
|
||||||
implementation "ru.noties:markwon:${markwonSnapshotVersion}"
|
implementation "ru.noties.markwon:core:${markwonSnapshotVersion}"
|
||||||
```
|
```
|
||||||
|
|
||||||
Please note that `markwon-image-loader`, `markwon-syntax-highlight`
|
:::tip
|
||||||
and `markwon-view` are also present in `SNAPSHOT` repository and
|
All official artifacts share the same version number and all
|
||||||
share the same version as main `markwon` artifact.
|
are uploaded to **release** and **snapshot** repositories
|
||||||
|
:::
|
||||||
|
|
||||||
|
1
docs/docs/migration-2-3.md
Normal file
1
docs/docs/migration-2-3.md
Normal file
@ -0,0 +1 @@
|
|||||||
|
# Migration v2 -> v3
|
@ -6,10 +6,10 @@ org.gradle.configureondemand=true
|
|||||||
android.enableBuildCache=true
|
android.enableBuildCache=true
|
||||||
android.buildCacheDir=build/pre-dex-cache
|
android.buildCacheDir=build/pre-dex-cache
|
||||||
|
|
||||||
VERSION_NAME=2.0.1-SNAPSHOT
|
VERSION_NAME=3.0.0-SNAPSHOT
|
||||||
|
|
||||||
GROUP=ru.noties
|
GROUP=ru.noties.markwon
|
||||||
POM_DESCRIPTION=Markwon
|
POM_DESCRIPTION=Markwon markdown for Android
|
||||||
POM_URL=https://github.com/noties/Markwon
|
POM_URL=https://github.com/noties/Markwon
|
||||||
POM_SCM_URL=https://github.com/noties/Markwon
|
POM_SCM_URL=https://github.com/noties/Markwon
|
||||||
POM_SCM_CONNECTION=scm:git:git://github.com/noties/Markwon.git
|
POM_SCM_CONNECTION=scm:git:git://github.com/noties/Markwon.git
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
POM_NAME=Markwon
|
POM_NAME=Core
|
||||||
POM_ARTIFACT_ID=markwon
|
POM_ARTIFACT_ID=core
|
||||||
POM_PACKAGING=aar
|
|
||||||
POM_DESCRIPTION=Core Markwon artifact that includes basic markdown parsing and rendering
|
POM_DESCRIPTION=Core Markwon artifact that includes basic markdown parsing and rendering
|
||||||
|
POM_PACKAGING=aar
|
@ -22,73 +22,46 @@ import ru.noties.markwon.priority.Priority;
|
|||||||
*/
|
*/
|
||||||
public abstract class AbstractMarkwonPlugin implements MarkwonPlugin {
|
public abstract class AbstractMarkwonPlugin implements MarkwonPlugin {
|
||||||
|
|
||||||
/**
|
|
||||||
* @inheritDoc
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void configureParser(@NonNull Parser.Builder builder) {
|
public void configureParser(@NonNull Parser.Builder builder) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @inheritDoc
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void configureTheme(@NonNull MarkwonTheme.Builder builder) {
|
public void configureTheme(@NonNull MarkwonTheme.Builder builder) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @inheritDoc
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void configureImages(@NonNull AsyncDrawableLoader.Builder builder) {
|
public void configureImages(@NonNull AsyncDrawableLoader.Builder builder) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @inheritDoc
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void configureConfiguration(@NonNull MarkwonConfiguration.Builder builder) {
|
public void configureConfiguration(@NonNull MarkwonConfiguration.Builder builder) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @inheritDoc
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void configureVisitor(@NonNull MarkwonVisitor.Builder builder) {
|
public void configureVisitor(@NonNull MarkwonVisitor.Builder builder) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @inheritDoc
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void configureSpansFactory(@NonNull MarkwonSpansFactory.Builder builder) {
|
public void configureSpansFactory(@NonNull MarkwonSpansFactory.Builder builder) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @inheritDoc
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void configureHtmlRenderer(@NonNull MarkwonHtmlRenderer.Builder builder) {
|
public void configureHtmlRenderer(@NonNull MarkwonHtmlRenderer.Builder builder) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @inheritDoc
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void configureRenderProps(@NonNull RenderProps renderProps) {
|
public void configureRenderProps(@NonNull RenderProps renderProps) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @inheritDoc
|
|
||||||
*/
|
|
||||||
@NonNull
|
@NonNull
|
||||||
@Override
|
@Override
|
||||||
public Priority priority() {
|
public Priority priority() {
|
||||||
@ -96,42 +69,27 @@ public abstract class AbstractMarkwonPlugin implements MarkwonPlugin {
|
|||||||
return Priority.after(CorePlugin.class);
|
return Priority.after(CorePlugin.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @inheritDoc
|
|
||||||
*/
|
|
||||||
@NonNull
|
@NonNull
|
||||||
@Override
|
@Override
|
||||||
public String processMarkdown(@NonNull String markdown) {
|
public String processMarkdown(@NonNull String markdown) {
|
||||||
return markdown;
|
return markdown;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @inheritDoc
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void beforeRender(@NonNull Node node) {
|
public void beforeRender(@NonNull Node node) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @inheritDoc
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void afterRender(@NonNull Node node, @NonNull MarkwonVisitor visitor) {
|
public void afterRender(@NonNull Node node, @NonNull MarkwonVisitor visitor) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @inheritDoc
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void beforeSetText(@NonNull TextView textView, @NonNull Spanned markdown) {
|
public void beforeSetText(@NonNull TextView textView, @NonNull Spanned markdown) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @inheritDoc
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void afterSetText(@NonNull TextView textView) {
|
public void afterSetText(@NonNull TextView textView) {
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user