diff --git a/.github/workflows/develop.yml b/.github/workflows/develop.yml index 7d38df2b..968f2a92 100644 --- a/.github/workflows/develop.yml +++ b/.github/workflows/develop.yml @@ -7,9 +7,7 @@ on: jobs: build: - runs-on: ubuntu-latest - steps: - uses: actions/checkout@v1 - name: set up JDK 1.8 @@ -18,3 +16,18 @@ jobs: java-version: 1.8 - name: Build with Gradle 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 diff --git a/CHANGELOG.md b/CHANGELOG.md index e8992853..5286ff9b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # 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 * `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 diff --git a/build.gradle b/build.gradle index cfb9c01e..9f065c7a 100644 --- a/build.gradle +++ b/build.gradle @@ -4,7 +4,7 @@ buildscript { jcenter() } 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' } } @@ -99,6 +99,14 @@ task checkUpdates { def registerArtifact(project) { 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'] } diff --git a/gradle.properties b/gradle.properties index bc71ace9..e865da7b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -8,7 +8,7 @@ android.enableJetifier=true android.enableBuildCache=true android.buildCacheDir=build/pre-dex-cache -VERSION_NAME=4.1.1 +VERSION_NAME=4.1.2 GROUP=io.noties.markwon POM_DESCRIPTION=Markwon markdown for Android 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 a14002f1..83dc2cfe 100644 --- a/markwon-core/src/main/java/io/noties/markwon/MarkwonBuilderImpl.java +++ b/markwon-core/src/main/java/io/noties/markwon/MarkwonBuilderImpl.java @@ -102,13 +102,11 @@ public Markwon build() { themeBuilder.build(), spanFactoryBuilder.build()); - final RenderProps renderProps = new RenderPropsImpl(); - // @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( visitorBuilder, - configuration, - renderProps); + configuration); return new MarkwonImpl( bufferType, diff --git a/markwon-core/src/main/java/io/noties/markwon/MarkwonVisitorFactory.java b/markwon-core/src/main/java/io/noties/markwon/MarkwonVisitorFactory.java index 98b0187e..89f48103 100644 --- a/markwon-core/src/main/java/io/noties/markwon/MarkwonVisitorFactory.java +++ b/markwon-core/src/main/java/io/noties/markwon/MarkwonVisitorFactory.java @@ -13,13 +13,12 @@ abstract class MarkwonVisitorFactory { @NonNull static MarkwonVisitorFactory create( @NonNull final MarkwonVisitorImpl.Builder builder, - @NonNull final MarkwonConfiguration configuration, - @NonNull final RenderProps renderProps) { + @NonNull final MarkwonConfiguration configuration) { return new MarkwonVisitorFactory() { @NonNull @Override MarkwonVisitor create() { - return builder.build(configuration, renderProps); + return builder.build(configuration, new RenderPropsImpl()); } }; } diff --git a/release-management.md b/release-management.md index 0127d156..36efc91f 100644 --- a/release-management.md +++ b/release-management.md @@ -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`. 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 created in the repository.