diff --git a/MaskedEditText/build.gradle b/MaskedEditText/build.gradle index f3ba4b3..2d0dd4e 100644 --- a/MaskedEditText/build.gradle +++ b/MaskedEditText/build.gradle @@ -25,11 +25,11 @@ ext { } android { - compileSdkVersion 26 + compileSdkVersion 29 defaultConfig { minSdkVersion 14 - targetSdkVersion 26 + targetSdkVersion 29 versionCode 3 versionName "2.0.4" } @@ -42,13 +42,13 @@ android { } ext { - support = "26.1.0" + androidx_appcompat = "1.1.0" } dependencies { - compile fileTree(dir: 'libs', include: ['*.jar']) - testCompile 'junit:junit:4.12' - compile "com.android.support:appcompat-v7:$support" + api fileTree(dir: 'libs', include: ['*.jar']) + testImplementation 'junit:junit:4.12' + api "androidx.appcompat:appcompat:$androidx_appcompat" } apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/installv1.gradle' diff --git a/MaskedEditText/src/main/java/com/vicmikhailau/maskededittext/MaskedEditText.java b/MaskedEditText/src/main/java/com/vicmikhailau/maskededittext/MaskedEditText.java index d94b514..8c417f6 100644 --- a/MaskedEditText/src/main/java/com/vicmikhailau/maskededittext/MaskedEditText.java +++ b/MaskedEditText/src/main/java/com/vicmikhailau/maskededittext/MaskedEditText.java @@ -2,10 +2,10 @@ import android.content.Context; import android.content.res.TypedArray; -import android.support.v7.widget.AppCompatEditText; -import android.text.Editable; import android.util.AttributeSet; +import androidx.appcompat.widget.AppCompatEditText; + public class MaskedEditText extends AppCompatEditText { // =========================================================== diff --git a/MaskedEditText/src/main/java/com/vicmikhailau/maskededittext/MaskedWatcher.java b/MaskedEditText/src/main/java/com/vicmikhailau/maskededittext/MaskedWatcher.java index 45cb062..2f0dbbe 100644 --- a/MaskedEditText/src/main/java/com/vicmikhailau/maskededittext/MaskedWatcher.java +++ b/MaskedEditText/src/main/java/com/vicmikhailau/maskededittext/MaskedWatcher.java @@ -1,11 +1,8 @@ package com.vicmikhailau.maskededittext; import android.text.Editable; -import android.text.TextUtils; import android.text.TextWatcher; -import android.util.Log; import android.widget.EditText; -import android.support.v7.widget.AppCompatEditText; import java.lang.ref.WeakReference; diff --git a/app/build.gradle b/app/build.gradle index 68c3e18..d5cfe4d 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,12 +1,12 @@ apply plugin: 'com.android.application' android { - compileSdkVersion 26 + compileSdkVersion 29 defaultConfig { applicationId "com.vicmikhailau.maskededittextsample" minSdkVersion 14 - targetSdkVersion 26 + targetSdkVersion 29 versionCode 1 versionName "1.0" } @@ -19,12 +19,12 @@ android { } ext { - support = "26.1.0" + androidx_appcompat = "1.1.0" } dependencies { - compile fileTree(include: ['*.jar'], dir: 'libs') - testCompile 'junit:junit:4.12' - compile "com.android.support:appcompat-v7:$support" - compile project(':MaskedEditText') + implementation fileTree(include: ['*.jar'], dir: 'libs') + testImplementation 'junit:junit:4.12' + implementation "androidx.appcompat:appcompat:$androidx_appcompat" + implementation project(':MaskedEditText') } diff --git a/app/src/main/java/com/vicmikhailau/maskededittextsample/MainActivity.java b/app/src/main/java/com/vicmikhailau/maskededittextsample/MainActivity.java index 530dacd..acbc030 100644 --- a/app/src/main/java/com/vicmikhailau/maskededittextsample/MainActivity.java +++ b/app/src/main/java/com/vicmikhailau/maskededittextsample/MainActivity.java @@ -1,13 +1,14 @@ package com.vicmikhailau.maskededittextsample; import android.os.Bundle; -import android.support.v7.app.AppCompatActivity; import android.widget.EditText; import com.vicmikhailau.maskededittext.MaskedEditText; import com.vicmikhailau.maskededittext.MaskedFormatter; import com.vicmikhailau.maskededittext.MaskedWatcher; +import androidx.appcompat.app.AppCompatActivity; + public class MainActivity extends AppCompatActivity { /** diff --git a/build.gradle b/build.gradle index 3d45dc1..580df11 100644 --- a/build.gradle +++ b/build.gradle @@ -6,7 +6,7 @@ buildscript { google() } dependencies { - classpath 'com.android.tools.build:gradle:3.0.1' + classpath 'com.android.tools.build:gradle:3.5.2' classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.6' classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5' } @@ -20,5 +20,5 @@ allprojects { } task clean(type: Delete) { - delete rootProject.buildDir + delete rootProject.buildDirt } diff --git a/gradle.properties b/gradle.properties index 1d3591c..915f0e6 100644 --- a/gradle.properties +++ b/gradle.properties @@ -15,4 +15,6 @@ # When configured, Gradle will run in incubating parallel mode. # This option should only be used with decoupled projects. More details, visit # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects -# org.gradle.parallel=true \ No newline at end of file +# org.gradle.parallel=true +android.enableJetifier=true +android.useAndroidX=true \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 89edfcf..ecf9b95 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Fri Dec 01 10:58:37 MSK 2017 +#Tue Nov 05 20:16:03 MSK 2019 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip