Skip to content

Commit

Permalink
Merge branch 'release/v1.1.0-rc01'
Browse files Browse the repository at this point in the history
  • Loading branch information
mikepenz committed Aug 11, 2018
2 parents a33df68 + e0cd938 commit 9d447da
Show file tree
Hide file tree
Showing 29 changed files with 274 additions and 258 deletions.
12 changes: 6 additions & 6 deletions DEV/original/DefaultItemAnimator.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package android.support.v7.widget;
package androidx.appcompat.widget;

import android.support.v4.animation.AnimatorCompatHelper;
import android.support.v4.view.ViewCompat;
import android.support.v4.view.ViewPropertyAnimatorCompat;
import android.support.v4.view.ViewPropertyAnimatorListener;
import android.support.v7.widget.RecyclerView.ViewHolder;
import androidx.core.animation.AnimatorCompatHelper;
import androidx.core.view.ViewCompat;
import androidx.core.view.ViewPropertyAnimatorCompat;
import androidx.core.view.ViewPropertyAnimatorListener;
import androidx.recyclerview.widget.RecyclerView.ViewHolder;
import android.view.View;

import java.util.ArrayList;
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@ These `Animators` correctly work with all view states and `RecyclerView` states
# Include in your project
## Using Maven
```javascript
implementation "com.mikepenz:itemanimators:1.0.2@aar"
implementation "com.android.support:recyclerview-v7:${supportLibVersion}"
implementation "com.mikepenz:itemanimators:1.1.0-rc01@aar"
implementation "androidx.recyclerview:recyclerview:${androidXVersion}"
```

To use appcompat please use a version smaller than 1.1.0. (See the releases on GitHub)

## How to use
```java
//just provide the animator to your RecyclerView
Expand Down
20 changes: 11 additions & 9 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,16 @@ try {
}

android {
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion
compileSdkVersion setup.compileSdk
buildToolsVersion setup.buildTools

defaultConfig {
minSdkVersion 14
targetSdkVersion 27
versionCode 1002
versionName '1.0.2'
minSdkVersion setup.minSdk
targetSdkVersion setup.targetSdk
versionCode release.versionCode
versionName release.versionName

setProperty("archivesBaseName", "ItemAnimators-v$versionName-c$versionCode")
}
buildTypes {
debug {
Expand Down Expand Up @@ -41,9 +43,9 @@ android {

dependencies {
implementation project(':library')
implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
implementation "com.android.support:cardview-v7:${rootProject.ext.supportLibVersion}"
implementation "com.android.support:recyclerview-v7:${rootProject.ext.supportLibVersion}"
implementation "androidx.appcompat:appcompat:${versions.androidXVersion}"
implementation "androidx.cardview:cardview:${versions.androidXVersion}"
implementation "androidx.recyclerview:recyclerview:${versions.androidXVersion}"

//used to generate the drawer on the left
//https://github.com/mikepenz/MaterialDrawer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
import android.graphics.Color;
import android.os.Bundle;
import android.os.Handler;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.support.v7.widget.Toolbar;
import androidx.appcompat.app.AppCompatActivity;
import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import androidx.appcompat.widget.Toolbar;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.mikepenz.itemanimators.app.items;

import android.content.Context;
import android.support.v7.widget.RecyclerView;
import androidx.recyclerview.widget.RecyclerView;
import android.view.View;
import android.widget.FrameLayout;
import android.widget.ImageView;
Expand Down
6 changes: 3 additions & 3 deletions app/src/main/res/layout/activity_sample.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
android:layout_height="match_parent"
android:gravity="center">

<android.support.v7.widget.Toolbar
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
Expand All @@ -18,7 +18,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@android:color/white" />
</android.support.v7.widget.Toolbar>
</androidx.appcompat.widget.Toolbar>


<FrameLayout
Expand All @@ -27,7 +27,7 @@
android:layout_height="match_parent"
android:layout_below="@id/toolbar">

<android.support.v7.widget.RecyclerView
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv"
android:layout_width="match_parent"
android:layout_height="match_parent"
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/layout/image_item.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
Expand Down Expand Up @@ -63,4 +63,4 @@

</LinearLayout>
</FrameLayout>
</android.support.v7.widget.CardView>
</androidx.cardview.widget.CardView>
31 changes: 22 additions & 9 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,30 @@
buildscript {
ext {
release = [
versionName: "1.1.0-rc01",
versionCode: 1100
]

setup = [
compileSdk: 28,
buildTools: "28.0.2",
minSdk : 14,
targetSdk : 28
]

versions = [
androidXVersion: '1.0.0-rc01'
]
}

repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.0'
classpath 'com.novoda:bintray-release:0.8.1'
classpath 'com.android.tools.build:gradle:3.3.0-alpha05'
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4'
}
}

Expand All @@ -15,10 +34,4 @@ allprojects {
jcenter()
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
}
}

ext {
compileSdkVersion = 27
buildToolsVersion = "27.0.3"
supportLibVersion = "27.1.0"
}
}
153 changes: 153 additions & 0 deletions gradle-release.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
@SuppressWarnings(["GroovyUnusedDeclaration", "GrMethodMayBeStatic"])
def isReleaseBuild() {
return !VERSION_NAME.contains("SNAPSHOT")
}

@SuppressWarnings("GroovyUnusedDeclaration")
def getRepositoryUsername() {
return hasProperty('NEXUS_USERNAME') ? NEXUS_USERNAME : ""
}

@SuppressWarnings("GroovyUnusedDeclaration")
def getRepositoryPassword() {
return hasProperty('NEXUS_PASSWORD') ? NEXUS_PASSWORD : ""
}

apply plugin: "com.jfrog.bintray"

afterEvaluate { project ->
apply plugin: 'maven-publish'
apply plugin: 'com.github.dcendents.android-maven'

if (JavaVersion.current().isJava8Compatible()) {
allprojects {
tasks.withType(Javadoc) {
options.addStringOption('Xdoclint:none', '-quiet')
}
}
}

task androidJavadocs(type: Javadoc) {
failOnError = false
source = android.sourceSets.main.java.source
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
}

task androidJavadocsJar(type: Jar, dependsOn: androidJavadocs) {
classifier = 'javadoc'
from androidJavadocs.destinationDir
}

task androidSourcesJar(type: Jar) {
classifier = 'sources'
from android.sourceSets.main.java.source
}

bintray {
dryRun = false
publish = true
override = true
user = project.hasProperty('bintray.user') ? project.property('bintray.user') : System.getenv('BINTRAY_USER')
key = project.hasProperty('bintray.apikey') ? project.property('bintray.apikey') : System.getenv('BINTRAY_API_KEY')
def gpgkey = project.hasProperty('bintray.gpg.key') ? project.property('bintray.gpg.key') : System.getenv('BINTRAY_GPG_KEY')
def gpgpass = project.hasProperty('bintray.gpg.password') ? project.property('bintray.gpg.password') : System.getenv('BINTRAY_GPG_PASS')
def versionName = project.release.versionName

publications('release')

pkg {
publish = true

repo = "maven"
name = GROUP + ":" + POM_ARTIFACT_ID //the name (= identifier) on bintray
desc = POM_DESCRIPTION

websiteUrl = POM_URL
issueTrackerUrl = POM_SCM_URL_ISSUES
vcsUrl = POM_SCM_URL

githubRepo = POM_GITHUB_REPO
githubReleaseNotesFile = POM_GITHUB_README

publicDownloadNumbers = true
licenses = ["Apache-2.0"]
version {
name = versionName
vcsTag = versionName
released = new Date()

mavenCentralSync {
sync = true
user = getRepositoryUsername()
password = getRepositoryPassword()
close = '1'
}
gpg {
sign = true
passphrase = gpgpass
}
}
}
}

ext.addDependency = { dependencyNode, group, name, version ->
dependencyNode.appendNode('groupId', group)
dependencyNode.appendNode('artifactId', name)
dependencyNode.appendNode('version', version)
dependencyNode.appendNode('scope', "compile")
}

def pomConfig = {
licenses {
license {
name POM_LICENCE_NAME
url POM_LICENCE_URL
distribution POM_LICENCE_DIST
}
}
developers {
developer {
id POM_DEVELOPER_ID
name POM_DEVELOPER_NAME
email '[email protected]'
}
}
scm {
url POM_SCM_URL
connection POM_SCM_CONNECTION
developerConnection POM_SCM_DEV_CONNECTION
}
}

publishing {
publications {
release(MavenPublication) {
groupId GROUP
artifactId POM_ARTIFACT_ID
version project.release.versionName
artifact("$buildDir/outputs/aar/${project.getName()}-release.aar")
artifact androidSourcesJar
artifact androidJavadocsJar

pom.withXml {
asNode().appendNode('name', POM_NAME);
asNode().appendNode('description', POM_DESCRIPTION);
asNode().appendNode('url', POM_SCM_URL);
def dependenciesNode = asNode().appendNode('dependencies');
configurations.implementation.allDependencies.each {
// Ensure dependencies such as fileTree are not included.
if (it.name != 'unspecified') {
def dependencyNode = dependenciesNode.appendNode('dependency')
if (it.version != "unspecified") {
addDependency(dependencyNode, it.group, it.name, it.version)
} else {
addDependency(dependencyNode, it.getDependencyProject().findProperty("GROUP"), it.getDependencyProject().findProperty("POM_ARTIFACT_ID"), project.release.versionName)
}
}
}
asNode().children().last() + pomConfig
}
}
}
}
}
13 changes: 10 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
# Maven stuff
VERSION_NAME=1.0.2
VERSION_CODE=102
GROUP=com.mikepenz
POM_DESCRIPTION=ItemAnimators Library

POM_URL=https://github.com/mikepenz/itemanimators

POM_SCM_URL=https://github.com/mikepenz/itemanimators
POM_SCM_CONNECTION=scm:[email protected]:mikepenz/itemanimators.git
POM_SCM_DEV_CONNECTION=scm:[email protected]:mikepenz/itemanimators.git
POM_SCM_URL_ISSUES=https://github.com/mikepenz/itemanimators/issues

POM_GITHUB_REPO=mikepenz/itemanimators
POM_GITHUB_README=README.md

POM_LICENCE_NAME=The Apache Software License, Version 2.0
POM_LICENCE_URL=http://www.apache.org/licenses/LICENSE-2.0.txt
POM_LICENCE_DIST=repo

POM_DEVELOPER_ID=mikepenz
POM_DEVELOPER_NAME=Mike Penz

android.useAndroidX=true
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 Oct 28 17:55:06 CEST 2017
#Sat Aug 11 19:17: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.9-all.zip
Loading

0 comments on commit 9d447da

Please sign in to comment.