From f3cf91313ce9c55739ed35352c01bb25eb4d330b Mon Sep 17 00:00:00 2001 From: Ivan Skoric Date: Wed, 15 May 2019 20:04:28 +0200 Subject: [PATCH] Prepare version 0.3.0 for the release --- CHANGELOG.md | 4 ++++ README.md | 2 +- gradle.properties | 2 +- .../pspdfkit/labs/vangogh/rx/AnimationCompletable.java | 8 ++++---- .../pspdfkit/labs/vangogh/rx/AnimationDisposable.java | 9 ++++----- .../labs/vangogh/rx/OnAnimationDisposedListener.java | 3 ++- 6 files changed, 16 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 95e0ab7..cecef96 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ Change Log ========== +Version 0.3.0 *(2019-05-15)* +---------------------------- +* AndroidX support. ([#28](https://github.com/PSPDFKit-labs/VanGogh/pull/28)) + Version 0.2.0 *(2017-11-27)* ---------------------------- * *Important:* Duration is no more pre-determined by the library but uses the default duration defined by Android in `ValueAnimator`. Quick animations use 60% of that duration value and slow animations use 300%. ([#20](https://github.com/PSPDFKit-labs/VanGogh/issues/20)) diff --git a/README.md b/README.md index 90718d5..31f6e52 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ repositories { And latest version to your dependencies: ```gradle -compile 'com.pspdfkit-labs:vangogh:0.2.0' +compile 'com.pspdfkit-labs:vangogh:0.3.0' ``` Snapshots of the development version are available in [Sonatype's snapshots repository](https://oss.sonatype.org/content/repositories/snapshots/). diff --git a/gradle.properties b/gradle.properties index bcdd112..6591fa5 100644 --- a/gradle.properties +++ b/gradle.properties @@ -13,7 +13,7 @@ org.gradle.jvmargs=-Xmx1536m # org.gradle.parallel=true GROUP=com.pspdfkit-labs -VERSION_NAME=0.2.1-SNAPSHOT +VERSION_NAME=0.3.0 POM_DESCRIPTION=Android view animations powered by RxJava2. POM_URL=https://github.com/PSPDFKit-labs/VanGogh diff --git a/vangogh/src/main/java/com/pspdfkit/labs/vangogh/rx/AnimationCompletable.java b/vangogh/src/main/java/com/pspdfkit/labs/vangogh/rx/AnimationCompletable.java index cd033df..7796fa3 100644 --- a/vangogh/src/main/java/com/pspdfkit/labs/vangogh/rx/AnimationCompletable.java +++ b/vangogh/src/main/java/com/pspdfkit/labs/vangogh/rx/AnimationCompletable.java @@ -1,5 +1,7 @@ package com.pspdfkit.labs.vangogh.rx; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import androidx.core.view.ViewCompat; import androidx.core.view.ViewPropertyAnimatorCompat; import androidx.core.view.ViewPropertyAnimatorListener; @@ -7,8 +9,6 @@ import com.pspdfkit.labs.vangogh.base.Animation; import io.reactivex.Completable; import io.reactivex.CompletableObserver; -import io.reactivex.annotations.NonNull; -import io.reactivex.annotations.Nullable; import io.reactivex.functions.Consumer; /** @@ -37,13 +37,13 @@ public final class AnimationCompletable extends Completable implements OnAnimati @Nullable private ViewPropertyAnimatorCompat animator; /** Tracks whether the animation is still running. */ - @Nullable private boolean isAnimationRunning = false; + private boolean isAnimationRunning = false; /** * Creates completable that runs provided animation once subscribed to. * @param animation Animation to run when subscribed. */ - public AnimationCompletable(Animation animation) { + public AnimationCompletable(@NonNull Animation animation) { this.animation = animation; } diff --git a/vangogh/src/main/java/com/pspdfkit/labs/vangogh/rx/AnimationDisposable.java b/vangogh/src/main/java/com/pspdfkit/labs/vangogh/rx/AnimationDisposable.java index d43271a..7f95444 100644 --- a/vangogh/src/main/java/com/pspdfkit/labs/vangogh/rx/AnimationDisposable.java +++ b/vangogh/src/main/java/com/pspdfkit/labs/vangogh/rx/AnimationDisposable.java @@ -1,7 +1,8 @@ package com.pspdfkit.labs.vangogh.rx; +import androidx.annotation.NonNull; + import io.reactivex.android.MainThreadDisposable; -import io.reactivex.annotations.NonNull; /** * Represents disposable resource for animations. @@ -15,15 +16,13 @@ public final class AnimationDisposable extends MainThreadDisposable { * Creates disposable that can notify the listener when disposed. * @param onAnimationDisposedListener Listener being notified when this disposable is disposed. */ - public AnimationDisposable(OnAnimationDisposedListener onAnimationDisposedListener) { + public AnimationDisposable(@NonNull OnAnimationDisposedListener onAnimationDisposedListener) { this.onAnimationDisposedListener = onAnimationDisposedListener; } @Override protected void onDispose() { - if (onAnimationDisposedListener != null) { - onAnimationDisposedListener.onAnimationDisposed(); - } + onAnimationDisposedListener.onAnimationDisposed(); } } diff --git a/vangogh/src/main/java/com/pspdfkit/labs/vangogh/rx/OnAnimationDisposedListener.java b/vangogh/src/main/java/com/pspdfkit/labs/vangogh/rx/OnAnimationDisposedListener.java index 9516f56..d2ca84a 100644 --- a/vangogh/src/main/java/com/pspdfkit/labs/vangogh/rx/OnAnimationDisposedListener.java +++ b/vangogh/src/main/java/com/pspdfkit/labs/vangogh/rx/OnAnimationDisposedListener.java @@ -1,7 +1,8 @@ package com.pspdfkit.labs.vangogh.rx; /** - * Listener used to notify that the animation has been disposed, more precisely {@link AnimationDisposable}. + * Listener used to notify that the animation has been + * disposed, more precisely {@link AnimationDisposable}. */ interface OnAnimationDisposedListener {