Skip to content
This repository was archived by the owner on Aug 1, 2023. It is now read-only.

Migrate to AndroidX (and relevant updates) #72

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,6 @@ POM_DEVELOPER_ID=facebook
POM_DEVELOPER_NAME=Facebook

org.gradle.configureondemand=true

android.useAndroidX=true
android.enableJetifier=false
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.5.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.3-bin.zip
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

4.5.1 fails to compile with error message saying that 4.6 is minimum required. I updated to the latest pre-5 since 5.x doesn't work yet.

2 changes: 1 addition & 1 deletion shimmer/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ android {
}

dependencies {
implementation deps.supportAnnotations
implementation deps.androidXAnnotations
}

apply from: rootProject.file('gradle/gradle-mvn-push.gradle')
8 changes: 4 additions & 4 deletions shimmer/src/main/java/com/facebook/shimmer/Shimmer.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
import android.content.res.TypedArray;
import android.graphics.Color;
import android.graphics.RectF;
import android.support.annotation.ColorInt;
import android.support.annotation.FloatRange;
import android.support.annotation.IntDef;
import android.support.annotation.Px;
import androidx.annotation.ColorInt;
import androidx.annotation.FloatRange;
import androidx.annotation.IntDef;
import androidx.annotation.Px;
import android.util.AttributeSet;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
import android.graphics.Rect;
import android.graphics.Shader;
import android.graphics.drawable.Drawable;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

public final class ShimmerDrawable extends Drawable {
private final ValueAnimator.AnimatorUpdateListener mUpdateListener =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
import android.graphics.Paint;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import android.util.AttributeSet;
import android.widget.FrameLayout;

Expand Down
18 changes: 9 additions & 9 deletions versions.gradle
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
// Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
ext {
versions = [
targetSdk : 26,
compileSdk : 26,
targetSdk : 28,
compileSdk : 28,
minSdk : 14,
buildTools : '26.0.2',
kotlin : '1.2.41',
supportLibrary: '27.0.2',
buildTools : '28.0.3',
kotlin : '1.3.10',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes to unrelated versions should be split out into a separate pull request.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kotlin 1.2.41 was not compiling, so I had to update beyond the current version.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Buchanan

androidXAnnotations: '1.0.1',
]

plugs = [
"agp" : "com.android.tools.build:gradle:3.0.1",
"agp" : "com.android.tools.build:gradle:3.2.1",
"kotlin": "org.jetbrains.kotlin:kotlin-gradle-plugin:${versions.kotlin}",
]

deps = [
shimmer : "com.facebook.shimmer:shimmer:$VERSION_NAME",
kotlinStdlib : "org.jetbrains.kotlin:kotlin-stdlib-jre7:${versions.kotlin}",
supportAnnotations: "com.android.support:support-annotations:${versions.supportLibrary}",
shimmer : "com.facebook.shimmer:shimmer:$VERSION_NAME",
kotlinStdlib : "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${versions.kotlin}",
androidXAnnotations : "androidx.annotation:annotation:${versions.androidXAnnotations}",
]
}