Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to AndroidX #82

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ buildscript {
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.1'
classpath 'com.android.tools.build:gradle:3.4.3'
classpath 'digital.wup:android-maven-publish:3.6.2'

// NOTE: Do not place your application dependencies here; they belong
Expand Down
2 changes: 2 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@ POM_LICENCE_URL=http://www.apache.org/licenses/LICENSE-2.0.txt
POM_LICENCE_DIST=repo
POM_DEVELOPER_ID=danh32
POM_DEVELOPER_NAME=Dan Hill

Choose a reason for hiding this comment

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

Open

Suggested change
POM_DEVELOPER_NAME=Dan Hill
POM_DEVELOPER_NAME=Dan Hill


android.useAndroidX=true
8 changes: 4 additions & 4 deletions spark-sample/build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 26
compileSdkVersion 30

defaultConfig {
applicationId "com.robinhood.spark.sample"
minSdkVersion 14
targetSdkVersion 26
targetSdkVersion 30
versionCode 1
versionName "1.0"
}
Expand All @@ -19,7 +19,7 @@ android {
}

dependencies {
testImplementation 'junit:junit:4.12'
implementation 'com.android.support:appcompat-v7:26.1.0'
testImplementation 'junit:junit:4.13'
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation project(path: ':spark')
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
package com.robinhood.spark.sample;

import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.v7.app.AppCompatActivity;
import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;
import android.view.View;
import android.view.animation.AccelerateDecelerateInterpolator;
import android.widget.AdapterView;
Expand Down
10 changes: 5 additions & 5 deletions spark/build.gradle
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
apply plugin: 'com.android.library'

android {
compileSdkVersion 26
compileSdkVersion 30

defaultConfig {
minSdkVersion 14
targetSdkVersion 26
targetSdkVersion 30
}

resourcePrefix 'spark_'
}

dependencies {
implementation 'com.android.support:support-annotations:26.1.0'
implementation 'androidx.annotation:annotation:1.1.0'

testImplementation 'junit:junit:4.12'
testImplementation 'org.mockito:mockito-core:2.18.0'
testImplementation 'junit:junit:4.13'
testImplementation 'org.mockito:mockito-core:2.28.2'
}

apply from: 'gradle-mvn-push.gradle'
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
package com.robinhood.spark;

import android.os.Handler;
import android.support.annotation.NonNull;
import androidx.annotation.NonNull;
import android.view.MotionEvent;
import android.view.View;

Expand Down
4 changes: 2 additions & 2 deletions spark/src/main/java/com/robinhood/spark/SparkAdapter.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
import android.database.DataSetObservable;
import android.database.DataSetObserver;
import android.graphics.RectF;
import android.support.annotation.NonNull;
import android.support.annotation.VisibleForTesting;
import androidx.annotation.NonNull;
import androidx.annotation.VisibleForTesting;

/**
* A simple adapter class - evenly distributes your points along the x axis, does not draw a base
Expand Down
8 changes: 4 additions & 4 deletions spark/src/main/java/com/robinhood/spark/SparkView.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@
import android.graphics.RectF;
import android.os.Build;
import android.os.Handler;
import android.support.annotation.ColorInt;
import android.support.annotation.IntDef;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import androidx.annotation.ColorInt;
import androidx.annotation.IntDef;
import androidx.annotation.NonNull;

Choose a reason for hiding this comment

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

Suggested change
import androidx.annotation.NonNull;
# import androidx.annotation.NonNull;**RSC**
~~Operator
- [ ] 92748903032258543475786209`~~

import androidx.annotation.Nullable;
import android.util.AttributeSet;
import android.util.Log;
import android.view.View;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
import android.animation.ValueAnimator;
import android.graphics.Path;
import android.graphics.PathMeasure;
import android.support.annotation.IntRange;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import androidx.annotation.IntRange;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.robinhood.spark.SparkView;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
import android.animation.TimeInterpolator;
import android.animation.ValueAnimator;
import android.graphics.Path;
import android.support.annotation.IntRange;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import androidx.annotation.IntRange;
import androidx.annotation.NonNull;

Choose a reason for hiding this comment

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


import androidx.annotation.Nullable;

import com.robinhood.spark.SparkView;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.robinhood.spark.animation;

import android.animation.Animator;
import android.support.annotation.Nullable;
import androidx.annotation.Nullable;

import com.robinhood.spark.SparkView;

Expand Down
2 changes: 1 addition & 1 deletion spark/src/test/java/com/robinhood/spark/TestAdapter.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.robinhood.spark;

import android.graphics.RectF;
import android.support.annotation.NonNull;
import androidx.annotation.NonNull;

import org.mockito.invocation.InvocationOnMock;
import org.mockito.stubbing.Answer;
Expand Down