Skip to content

Commit 2dc7d4d

Browse files
committed
refactor: migrating to AndroidX
1 parent cb3653a commit 2dc7d4d

File tree

8 files changed

+34
-41
lines changed

8 files changed

+34
-41
lines changed

README.md

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -20,28 +20,16 @@ For making animations more real, I created another project named [Android Easing
2020
#### Gradle
2121
```groovy
2222
dependencies {
23-
compile 'com.android.support:support-compat:25.1.1'
24-
compile 'com.daimajia.easing:library:2.0@aar'
25-
compile 'com.daimajia.androidanimations:library:2.3@aar'
23+
implementation 'com.daimajia.androidanimations:library:2.4@aar'
2624
}
2725
```
2826
#### Maven
2927

3028
```xml
31-
<dependency>
32-
<groupId>com.android.support</groupId>
33-
<artifactId>support-compat</artifactId>
34-
<version>25.1.1</version>
35-
</dependency>
3629
<dependency>
3730
<groupId>com.daimajia.androidanimation</groupId>
3831
<artifactId>library</artifactId>
39-
<version>2.3</version>
40-
</dependency>
41-
<dependency>
42-
<groupId>com.daimajia.easing</groupId>
43-
<artifactId>library</artifactId>
44-
<version>2.0</version>
32+
<version>2.4</version>
4533
</dependency>
4634
```
4735

build.gradle

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
1-
// Top-level build file where you can add configuration options common to all sub-projects/modules.
2-
31
buildscript {
42
repositories {
53
jcenter()
64
google()
75
}
6+
87
dependencies {
9-
classpath 'com.android.tools.build:gradle:3.4.1'
10-
// NOTE: Do not place your application dependencies here; they belong
11-
// in the individual module build.gradle files
8+
classpath 'com.android.tools.build:gradle:4.0.1'
129
}
1310
}
1411

demo/build.gradle

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
apply plugin: 'com.android.application'
22

33
android {
4-
compileSdkVersion 25
4+
compileSdkVersion COMPILE_SDK_VERSION.toInteger()
55

66
defaultConfig {
7-
applicationId "com.daimajia.androidanimations"
8-
minSdkVersion 14
9-
targetSdkVersion 25
10-
versionCode 3
11-
versionName "3.0"
7+
applicationId GROUP
8+
minSdkVersion MIN_SDK_VERSION.toInteger()
9+
targetSdkVersion TARGET_SDK_VERSION.toInteger()
10+
versionCode VERSION_CODE.toInteger()
11+
versionName VERSION_NAME
1212
}
13+
1314
buildTypes {
1415
release {
1516
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
1617
}
1718
}
19+
1820
lintOptions{
1921
abortOnError false
2022
}
2123
}
2224

2325
dependencies {
2426
implementation fileTree(dir: 'libs', include: ['*.jar'])
25-
implementation 'com.nineoldandroids:library:2.4.0'
26-
implementation 'com.android.support:support-v4:25.4.0'
2727
implementation project(':library')
2828
}

gradle.properties

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,12 @@
1717
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
1818
# org.gradle.parallel=true
1919

20+
COMPILE_SDK_VERSION=29
21+
TARGET_SDK_VERSION=29
22+
MIN_SDK_VERSION=14
2023

21-
VERSION_NAME=2.3
22-
VERSION_CODE=31
24+
VERSION_NAME=2.4
25+
VERSION_CODE=32
2326
GROUP=com.daimajia.androidanimations
2427

2528
POM_DESCRIPTION=Collect android animations
@@ -31,4 +34,7 @@ POM_LICENCE_NAME=MIT
3134
POM_LICENCE_URL=http://opensource.org/licenses/MIT
3235
POM_LICENCE_DIST=repo
3336
POM_DEVELOPER_ID=daimajia
34-
POM_DEVELOPER_NAME=daimajia
37+
POM_DEVELOPER_NAME=daimajia
38+
39+
android.useAndroidX=true
40+
android.enableJetifier=true
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Sat Jun 01 01:42:21 CST 2019
1+
#Sat Aug 22 18:15:38 CST 2020
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip

library/build.gradle

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
apply plugin: 'com.android.library'
22

33
android {
4-
compileSdkVersion 25
4+
compileSdkVersion COMPILE_SDK_VERSION.toInteger()
55

66
defaultConfig {
7-
minSdkVersion 14
8-
targetSdkVersion 25
9-
versionCode 31
10-
versionName "2.3"
7+
minSdkVersion MIN_SDK_VERSION.toInteger()
8+
targetSdkVersion TARGET_SDK_VERSION.toInteger()
9+
versionCode VERSION_CODE.toInteger()
10+
versionName VERSION_NAME
1111
}
12+
1213
buildTypes {
1314
release {
1415
minifyEnabled false
@@ -19,7 +20,8 @@ android {
1920

2021
dependencies {
2122
implementation fileTree(dir: 'libs', include: ['*.jar'])
22-
implementation 'com.daimajia.easing:library:2.0@aar'
23-
implementation 'com.android.support:support-compat:25.4.0'
23+
implementation 'com.daimajia.easing:library:2.4@aar'
24+
implementation 'androidx.core:core:1.3.1'
2425
}
26+
2527
apply from: './gradle-mvn-push.gradle'

library/src/main/java/com/daimajia/androidanimations/library/BaseViewAnimator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@
2727
import android.animation.Animator;
2828
import android.animation.AnimatorSet;
2929
import android.animation.ValueAnimator;
30-
import android.support.v4.view.ViewCompat;
3130
import android.view.View;
3231
import android.view.animation.Interpolator;
3332

33+
import androidx.core.view.ViewCompat;
3434

3535
public abstract class BaseViewAnimator {
3636

library/src/main/java/com/daimajia/androidanimations/library/YoYo.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@
2727

2828
import android.animation.Animator;
2929
import android.animation.ValueAnimator;
30-
import android.support.v4.view.ViewCompat;
3130
import android.view.View;
3231
import android.view.animation.Interpolator;
3332

33+
import androidx.core.view.ViewCompat;
3434

3535
import java.util.ArrayList;
3636
import java.util.List;

0 commit comments

Comments
 (0)