Merge pull request #172 from noties/v4.1.2

4.1.2
This commit is contained in:
Dimitry 2019-10-16 15:34:36 +03:00 committed by GitHub
commit 47bf6f5265
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 37 additions and 12 deletions

View File

@ -7,9 +7,7 @@ on:
jobs: jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v1 - uses: actions/checkout@v1
- name: set up JDK 1.8 - name: set up JDK 1.8
@ -18,3 +16,18 @@ jobs:
java-version: 1.8 java-version: 1.8
- name: Build with Gradle - name: Build with Gradle
run: ./gradlew build run: ./gradlew build
deploy:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: deploy snapshot
env:
NEXUS_USERNAME: ${{ secrets.NEXUS_USERNAME }}
NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}
run: ./gradlew upA -Prelease -PCI

View File

@ -1,5 +1,10 @@
# Changelog # Changelog
# 4.1.2
* Do not re-use RenderProps when creating a new visitor (fixes [#171])
[#171]: https://github.com/noties/Markwon/issues/171
# 4.1.1 # 4.1.1
* `markwon-ext-tables`: fix padding between subsequent table blocks ([#159]) * `markwon-ext-tables`: fix padding between subsequent table blocks ([#159])
* `markwon-images`: print a single warning instead full stacktrace in case when SVG or GIF * `markwon-images`: print a single warning instead full stacktrace in case when SVG or GIF

View File

@ -4,7 +4,7 @@ buildscript {
jcenter() jcenter()
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:3.5.0' classpath 'com.android.tools.build:gradle:3.5.1'
classpath 'com.github.ben-manes:gradle-versions-plugin:0.21.0' classpath 'com.github.ben-manes:gradle-versions-plugin:0.21.0'
} }
} }
@ -99,6 +99,14 @@ task checkUpdates {
def registerArtifact(project) { def registerArtifact(project) {
if (hasProperty('release')) { if (hasProperty('release')) {
// to be used in github actions (to publish a snapshot)
// but only if we have snapshot in the version name
if (hasProperty('CI') && VERSION_NAME.contains('SNAPSHOT')) {
ext.NEXUS_USERNAME = System.getenv('NEXUS_USERNAME')
ext.NEXUS_PASSWORD = System.getenv('NEXUS_PASSWORD')
}
project.apply from: config['push-aar-gradle'] project.apply from: config['push-aar-gradle']
} }

View File

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

View File

@ -102,13 +102,11 @@ class MarkwonBuilderImpl implements Markwon.Builder {
themeBuilder.build(), themeBuilder.build(),
spanFactoryBuilder.build()); spanFactoryBuilder.build());
final RenderProps renderProps = new RenderPropsImpl();
// @since 4.1.1 // @since 4.1.1
// @since 4.1.2 - do not reuse render-props (each render call should have own render-props)
final MarkwonVisitorFactory visitorFactory = MarkwonVisitorFactory.create( final MarkwonVisitorFactory visitorFactory = MarkwonVisitorFactory.create(
visitorBuilder, visitorBuilder,
configuration, configuration);
renderProps);
return new MarkwonImpl( return new MarkwonImpl(
bufferType, bufferType,

View File

@ -13,13 +13,12 @@ abstract class MarkwonVisitorFactory {
@NonNull @NonNull
static MarkwonVisitorFactory create( static MarkwonVisitorFactory create(
@NonNull final MarkwonVisitorImpl.Builder builder, @NonNull final MarkwonVisitorImpl.Builder builder,
@NonNull final MarkwonConfiguration configuration, @NonNull final MarkwonConfiguration configuration) {
@NonNull final RenderProps renderProps) {
return new MarkwonVisitorFactory() { return new MarkwonVisitorFactory() {
@NonNull @NonNull
@Override @Override
MarkwonVisitor create() { MarkwonVisitor create() {
return builder.build(configuration, renderProps); return builder.build(configuration, new RenderPropsImpl());
} }
}; };
} }

View File

@ -17,7 +17,9 @@ should all release preparations be done (removing all mentions of SNAPSHOT and u
version name). Then a pull-request is issued from this branch to `master`. version name). Then a pull-request is issued from this branch to `master`.
After a pull-request is resolved (merged to `master`) all changes must be reflected in `develop` After a pull-request is resolved (merged to `master`) all changes must be reflected in `develop`
branch (merge with `master`) and `-SNAPSHOT` suffix must be added to the `VERSION_NAME`. branch (merge with `master`), next `VERSION_NAME` must be assigned with `-SNAPSHOT` suffix and published to snapshot Maven repo
(snapshot users will see an update available).
The issuer branch (with version name) should be deleted.
A new version must be pushed to MavenCentral and new git-tag with version name must be A new version must be pushed to MavenCentral and new git-tag with version name must be
created in the repository. created in the repository.