Skip to content

Commit ded4ae5

Browse files
Migrate to androidX
1 parent a32ef2d commit ded4ae5

File tree

8 files changed

+24
-19
lines changed

8 files changed

+24
-19
lines changed

build.gradle

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
// Top-level build file where you can add configuration options common to all sub-projects/modules.
22

33
buildscript {
4-
ext.kotlin_version = '1.2.60'
4+
ext.kotlin_version = '1.3.31'
55
repositories {
66
jcenter()
77
maven { url 'https://maven.google.com' }
88
google()
99
}
1010
dependencies {
11-
classpath 'com.android.tools.build:gradle:3.1.4'
11+
classpath 'com.android.tools.build:gradle:3.4.1'
1212
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.0'
1313
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1414
}
@@ -18,6 +18,7 @@ allprojects {
1818
repositories {
1919
jcenter()
2020
maven { url 'https://maven.google.com' }
21+
google()
2122
}
2223
}
2324

core/src/main/java/com/github/stephenvinouze/materialnumberpickercore/MaterialNumberPicker.kt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
package com.github.stephenvinouze.materialnumberpickercore
22

33
import android.content.Context
4-
import android.graphics.*
4+
import android.graphics.Color
5+
import android.graphics.Paint
6+
import android.graphics.PorterDuff
7+
import android.graphics.PorterDuffColorFilter
8+
import android.graphics.Typeface
59
import android.graphics.drawable.Drawable
610
import android.text.InputType
711
import android.util.AttributeSet

gradle.properties

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,10 @@ GROUP_ID=com.github.stephenvinouze
2222
PACKAGING=aar
2323

2424
ANDROID_MIN_SDK_VERSION=11
25-
ANDROID_BUILD_SDK_VERSION=27
26-
ANDROID_BUILD_TOOLS_VERSION=27.0.3
27-
ANDROID_APPCOMPAT_VERSION=27.1.1
28-
25+
ANDROID_BUILD_SDK_VERSION=28
26+
ANDROID_BUILD_TOOLS_VERSION=28.0.3
2927
POM_NAME=MaterialNumberPicker
28+
3029
POM_REPO=maven
3130
POM_DESCRIPTION=A customizable number picker based on Material guidelines
3231
POM_URL=https://github.com/StephenVinouze/MaterialNumberPicker
@@ -38,3 +37,5 @@ POM_LICENCE_URL=http://www.apache.org/licenses/LICENSE-2.0.txt
3837
POM_LICENCE_DIST=repo
3938
POM_DEVELOPER_ID=StephenVinouze
4039
POM_DEVELOPER_NAME=Stephen Vinouze
40+
android.useAndroidX=true
41+
android.enableJetifier=true
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Sat Mar 17 11:42:15 CET 2018
1+
#Fri Jun 07 20:13:10 CEST 2019
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-4.5-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip

javasample/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,5 @@ dependencies {
2424
implementation project(':core')
2525
testImplementation 'junit:junit:4.12'
2626

27-
implementation "com.android.support:appcompat-v7:$ANDROID_APPCOMPAT_VERSION"
27+
implementation 'androidx.appcompat:appcompat:1.0.2'
2828
}

javasample/src/main/java/com/github/stephenvinouze/materialnumberpickerjavasample/MainActivity.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,14 @@
33
import android.content.DialogInterface;
44
import android.graphics.Typeface;
55
import android.os.Bundle;
6-
import android.support.annotation.Nullable;
7-
import android.support.v4.content.ContextCompat;
8-
import android.support.v7.app.AlertDialog;
9-
import android.support.v7.app.AppCompatActivity;
106
import android.view.View;
117
import android.widget.Button;
128
import android.widget.NumberPicker;
139
import android.widget.Toast;
14-
10+
import androidx.annotation.Nullable;
11+
import androidx.appcompat.app.AlertDialog;
12+
import androidx.appcompat.app.AppCompatActivity;
13+
import androidx.core.content.ContextCompat;
1514
import com.github.stephenvinouze.materialnumberpickercore.MaterialNumberPicker;
1615

1716
public class MainActivity extends AppCompatActivity implements View.OnClickListener {

sample/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@ dependencies {
2525
implementation project(':core')
2626
testImplementation 'junit:junit:4.12'
2727

28-
implementation "com.android.support:appcompat-v7:$ANDROID_APPCOMPAT_VERSION"
28+
implementation 'androidx.appcompat:appcompat:1.0.2'
2929
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
3030
}

sample/src/main/java/com/github/stephenvinouze/materialnumberpickersample/MainActivity.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ package com.github.stephenvinouze.materialnumberpickersample
22

33
import android.graphics.Typeface
44
import android.os.Bundle
5-
import android.support.v4.content.ContextCompat
6-
import android.support.v7.app.AlertDialog
7-
import android.support.v7.app.AppCompatActivity
85
import android.widget.Button
96
import android.widget.NumberPicker
107
import android.widget.Toast
8+
import androidx.appcompat.app.AlertDialog
9+
import androidx.appcompat.app.AppCompatActivity
10+
import androidx.core.content.ContextCompat
1111
import com.github.stephenvinouze.materialnumberpickercore.MaterialNumberPicker
1212

1313

0 commit comments

Comments
 (0)