Skip to content

Commit

Permalink
released v1.6.0, updated readme and gradle wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
David Ganster committed Apr 23, 2018
1 parent adb062a commit e09eb85
Show file tree
Hide file tree
Showing 8 changed files with 53 additions and 18 deletions.
28 changes: 25 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,25 @@ new AdditiveAnimator().setDuration(1000)
.target(myView2).xBy(20).yBy(20)
.start();
```
**New in 1.6.0:**

1.6.0 added some more syntactic sugar:

You can now animate the same property for multiple views without looping:

```java
new AdditiveAnimator().targets(myView1, myView2).alpha(0).start();
```

To achieve a staggered animation, you can optionally add the 'stagger' parameter to add a delay between each of the animations.
```java
long staggerBetweenAnimations = 50L;
new AdditiveAnimator().targets(Arrays.asList(myView1, myView2), staggerBetweenAnimations).alpha(0).start();
```
In this example, `myView1` is faded out 50 milliseconds before `myView2`.
Check out the improved demos for an example of this!

1.6 also added a few other convenience features, such as the ability to switch duration midway to building an animation, providing a `SpringInterpolator` class, and being able to switch back to the default interpolator using the `switchToDefaultInterpolator()` method.

# Animating all kinds of objects and properties
In addition to the builder methods for views, there are multiple options for animating custom properties of any object.
Expand Down Expand Up @@ -58,7 +77,6 @@ class PaintAdditiveAnimator extends BaseAdditiveAnimator<PaintAdditiveAnimator,
}
}
}

```

The second option is to simply provide a `Property` for the object you want to animate, plus (if needed) a way to trigger a redraw of your custom object:
Expand Down Expand Up @@ -91,18 +109,22 @@ Both versions don't require a lot of code, and the few lines you have to write a
To use `AdditiveAnimator` in your project, add the following lines to your `build.gradle`:
```
dependencies {
compile 'at.wirecube:additive_animations:1.5.0'
compile 'at.wirecube:additive_animations:1.6.0'
}
...
repositories {
jcenter()
}
```

**Note**: Thre is a breaking change when migrating from a version <1.5.0 to a version >= 1.5.0:
**Note**: There is a breaking change when migrating from a version <1.5.0 to a version >= 1.5.0:
Instead of subclassing `AdditiveAnimator`, you now have to subclass `SubclassableAdditiveViewAnimator` instead.
Sorry for the change, it was necessary due to Java constraints (nesting of generics across subclasses) and improves interop with Kotlin (no more generic arguments required!).

**Note**: There is another breaking change when migrating from <1.6.0 to >= 1.6.0:
You have to implement a new abstract method (`getCurrentPropertyValue()`) when subclassing `BaseAdditiveAnimator`.
This method is only called when using tag-based animations, instead of property-based ones. If your subclass does not use tag-based animations, you can simply `return null;`.

# License
`AdditiveAnimator` is licensed under the Apache v2 license:

Expand Down
8 changes: 5 additions & 3 deletions additive_animations/aar-release.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,11 @@ task zipRelease(type: Zip) {
archiveName "release-${version}.zip"
}

task generateRelease << {
println "Release ${version} can be found at ${localReleaseDest}/"
println "Release ${version} zipped can be found ${buildDir}/release-${version}.zip"
task generateRelease {
doLast {
println "Release ${version} can be found at ${localReleaseDest}/"
println "Release ${version} zipped can be found ${buildDir}/release-${version}.zip"
}
}

generateRelease.dependsOn(uploadArchives)
Expand Down
11 changes: 6 additions & 5 deletions additive_animations/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
* limitations under the License.
*/

apply plugin: 'com.jfrog.bintray'
apply plugin: 'com.android.library'

ext {
Expand Down Expand Up @@ -47,8 +48,8 @@ android {
defaultConfig {
minSdkVersion 14
targetSdkVersion 27
versionCode 1
versionName "1.0"
versionCode 16
versionName "1.6.0"
}
buildTypes {
release {
Expand All @@ -69,7 +70,7 @@ dependencies {
implementation 'com.android.support:design:27.1.1'
}

//apply from: 'aar-release.gradle'
// apply from: 'aar-release.gradle'

//apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/installv1.gradle'
//apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/bintrayv1.gradle'
apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/installv1.gradle'
apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/bintrayv1.gradle'
16 changes: 13 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.


buildscript {
repositories {
jcenter()
Expand All @@ -8,25 +9,34 @@ buildscript {
}
}
configurations {
// javadocDeps
// javadocDeps
}
dependencies {
// javadocDeps 'com.android.tools.build:gradle:1.3.0'
classpath 'com.android.tools.build:gradle:3.0.0'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.4.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}

plugins {
id "com.jfrog.bintray" version "1.7.3"
}

allprojects {
repositories {
jcenter()
google()
maven {
url "https://maven.google.com"
}
}
}

wrapper {
gradleVersion = '4.1'
}

task clean(type: Delete) {
delete rootProject.buildDir
}
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
VERSION_NAME=1.0
VERSION_CODE=1
VERSION_NAME=1.6.0
VERSION_CODE=16
GROUP=at.wirecube

POM_DESCRIPTION=Additive animations for Android, along with many convenience methods for clean animation code.
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Sat Apr 21 17:48:44 CEST 2018
#Mon Apr 23 10:02:43 CEST 2018
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-bin.zip
Empty file modified gradlew
100644 → 100755
Empty file.

0 comments on commit e09eb85

Please sign in to comment.