From 27d835846e10b0f88f47e025ce8c05cf2ce4a3a8 Mon Sep 17 00:00:00 2001 From: Dimitry Ivanov Date: Thu, 29 Aug 2019 14:51:25 +0300 Subject: [PATCH 1/6] Sync with master --- gradle.properties | 2 +- release-management.md | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index bc71ace9..aea3b99f 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.1-SNAPSHOT GROUP=io.noties.markwon POM_DESCRIPTION=Markwon markdown for Android diff --git a/release-management.md b/release-management.md index 0127d156..98e98dd5 100644 --- a/release-management.md +++ b/release-management.md @@ -18,6 +18,7 @@ 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`. +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. From 204b80324593cbd2d756199fd3a20d4fe65db85f Mon Sep 17 00:00:00 2001 From: Dimitry Ivanov Date: Fri, 11 Oct 2019 09:29:56 +0300 Subject: [PATCH 2/6] 4.1.2 --- build.gradle | 2 +- gradle.properties | 2 +- release-management.md | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/build.gradle b/build.gradle index cfb9c01e..94585863 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' } } diff --git a/gradle.properties b/gradle.properties index aea3b99f..af0f468c 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-SNAPSHOT +VERSION_NAME=4.1.2-SNAPSHOT GROUP=io.noties.markwon POM_DESCRIPTION=Markwon markdown for Android diff --git a/release-management.md b/release-management.md index 98e98dd5..36efc91f 100644 --- a/release-management.md +++ b/release-management.md @@ -17,7 +17,8 @@ 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 From b22a840dbecfbbc377daae4906b061db7ef12fbe Mon Sep 17 00:00:00 2001 From: Dimitry Ivanov Date: Tue, 15 Oct 2019 21:28:07 +0300 Subject: [PATCH 3/6] Fix re-use of render-props for visitor --- CHANGELOG.md | 5 +++++ .../src/main/java/io/noties/markwon/MarkwonBuilderImpl.java | 6 ++---- .../main/java/io/noties/markwon/MarkwonVisitorFactory.java | 5 ++--- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e8992853..6957b8be 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +# 4.1.2-SNAPSHOT +* 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/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()); } }; } From c9e1bb096506b4a5d8ba81f5f6f72e4bd965a6f5 Mon Sep 17 00:00:00 2001 From: Dimitry Ivanov Date: Wed, 16 Oct 2019 14:19:43 +0300 Subject: [PATCH 4/6] Another attempt at publishing snapshot via github actions --- .github/workflows/develop.yml | 17 +++++++++++++++-- build.gradle | 8 ++++++++ 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/.github/workflows/develop.yml b/.github/workflows/develop.yml index 7d38df2b..d5eca2a0 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/build.gradle b/build.gradle index 94585863..9f065c7a 100644 --- a/build.gradle +++ b/build.gradle @@ -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'] } From 003b5e90b46efc4a957342c4885c07b702af19fb Mon Sep 17 00:00:00 2001 From: Dimitry Ivanov Date: Wed, 16 Oct 2019 14:22:50 +0300 Subject: [PATCH 5/6] Github actions fix workflow --- .github/workflows/develop.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/develop.yml b/.github/workflows/develop.yml index d5eca2a0..968f2a92 100644 --- a/.github/workflows/develop.yml +++ b/.github/workflows/develop.yml @@ -28,6 +28,6 @@ jobs: java-version: 1.8 - name: deploy snapshot env: - NEXUS_USERNAME: {{ secrets.NEXUS_USERNAME }} - NEXUS_PASSWORD: {{ secrets.NEXUS_PASSWORD }} + NEXUS_USERNAME: ${{ secrets.NEXUS_USERNAME }} + NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }} run: ./gradlew upA -Prelease -PCI From bc3a7b75d29e99eee69a84a73f36f376c21e85e2 Mon Sep 17 00:00:00 2001 From: Dimitry Ivanov Date: Wed, 16 Oct 2019 15:16:50 +0300 Subject: [PATCH 6/6] Prepare 4.1.2 release --- CHANGELOG.md | 2 +- gradle.properties | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6957b8be..5286ff9b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Changelog -# 4.1.2-SNAPSHOT +# 4.1.2 * Do not re-use RenderProps when creating a new visitor (fixes [#171]) [#171]: https://github.com/noties/Markwon/issues/171 diff --git a/gradle.properties b/gradle.properties index af0f468c..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.2-SNAPSHOT +VERSION_NAME=4.1.2 GROUP=io.noties.markwon POM_DESCRIPTION=Markwon markdown for Android