Skip to content

Commit

Permalink
Merge pull request #172 from noties/v4.1.2
Browse files Browse the repository at this point in the history
4.1.2
  • Loading branch information
noties authored Oct 16, 2019
2 parents f9f8d36 + bc3a7b7 commit ba22ca8
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 12 deletions.
17 changes: 15 additions & 2 deletions .github/workflows/develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@ on:

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- name: set up JDK 1.8
Expand All @@ -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
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
10 changes: 9 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}
}
Expand Down Expand Up @@ -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']
}

Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
};
}
Expand Down
4 changes: 3 additions & 1 deletion release-management.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit ba22ca8

Please sign in to comment.