diff --git a/app/build.gradle b/app/build.gradle index 68ead58..3ced410 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,14 +1,14 @@ apply plugin: 'com.android.application' android { - compileSdkVersion 27 + compileSdkVersion 33 defaultConfig { applicationId "com.devlomi.circularstatusview.sample" minSdkVersion 15 - targetSdkVersion 27 + targetSdkVersion 33 versionCode 1 versionName "1.0" - testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" + testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' } buildTypes { release { @@ -20,12 +20,12 @@ android { dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) - implementation 'com.android.support:appcompat-v7:27.1.1' - implementation 'com.android.support:recyclerview-v7:27.1.1' + implementation 'androidx.appcompat:appcompat:1.0.0' + implementation 'androidx.recyclerview:recyclerview:1.0.0' implementation 'de.hdodenhof:circleimageview:2.2.0' - implementation 'com.android.support.constraint:constraint-layout:1.1.3' + implementation 'androidx.constraintlayout:constraintlayout:1.1.3' testImplementation 'junit:junit:4.12' - androidTestImplementation 'com.android.support.test:runner:1.0.2' - androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' + androidTestImplementation 'androidx.test.ext:junit:1.1.1' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0' implementation project(path: ':circularstatusview') } diff --git a/app/src/main/java/com/devlomi/circularstatusview/sample/MainActivity.java b/app/src/main/java/com/devlomi/circularstatusview/sample/MainActivity.java index 7f1c893..ca1d37a 100644 --- a/app/src/main/java/com/devlomi/circularstatusview/sample/MainActivity.java +++ b/app/src/main/java/com/devlomi/circularstatusview/sample/MainActivity.java @@ -1,17 +1,18 @@ package com.devlomi.circularstatusview.sample; +import static com.devlomi.circularstatusview.sample.DummyDataGenerator.generateStatuses; + import android.graphics.Color; import android.os.Bundle; -import android.support.v7.app.AppCompatActivity; -import android.support.v7.widget.LinearLayoutManager; -import android.support.v7.widget.RecyclerView; + +import androidx.appcompat.app.AppCompatActivity; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; import com.devlomi.circularstatusview.CircularStatusView; import java.util.List; -import static com.devlomi.circularstatusview.sample.DummyDataGenerator.generateStatuses; - public class MainActivity extends AppCompatActivity { @Override diff --git a/app/src/main/java/com/devlomi/circularstatusview/sample/StatusAdapter.java b/app/src/main/java/com/devlomi/circularstatusview/sample/StatusAdapter.java index 45deee5..1b3944b 100644 --- a/app/src/main/java/com/devlomi/circularstatusview/sample/StatusAdapter.java +++ b/app/src/main/java/com/devlomi/circularstatusview/sample/StatusAdapter.java @@ -1,13 +1,14 @@ package com.devlomi.circularstatusview.sample; import android.graphics.Color; -import android.support.annotation.NonNull; -import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; +import androidx.annotation.NonNull; +import androidx.recyclerview.widget.RecyclerView; + import com.devlomi.circularstatusview.CircularStatusView; import java.util.List; diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index 7183305..85b74c0 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -6,7 +6,7 @@ android:layout_height="match_parent" tools:context=".MainActivity"> - diff --git a/app/src/main/res/layout/row_status.xml b/app/src/main/res/layout/row_status.xml index e33fe16..3b9d638 100644 --- a/app/src/main/res/layout/row_status.xml +++ b/app/src/main/res/layout/row_status.xml @@ -1,5 +1,5 @@ - - + diff --git a/build.gradle b/build.gradle index 429f753..aecf925 100644 --- a/build.gradle +++ b/build.gradle @@ -7,7 +7,7 @@ buildscript { jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:3.2.1' + classpath 'com.android.tools.build:gradle:3.6.4' // classpath 'com.novoda:bintray-release:0.8.1' diff --git a/circularstatusview/build.gradle b/circularstatusview/build.gradle index 90a9a04..fe8ecc6 100644 --- a/circularstatusview/build.gradle +++ b/circularstatusview/build.gradle @@ -1,32 +1,18 @@ apply plugin: 'com.android.library' -//apply plugin: 'com.novoda.bintray-release' - -/* -publish { - userOrg = 'devlomi' - groupId = 'com.devlomi' - artifactId = 'circularstatusview' - uploadName = 'CircularStatusView' - publishVersion = '1.0.0' - desc = 'A Simple View that will draw portions of a Circle depending on a number , just like WhatsApp does for Status' - dryRun = false - website = 'https://github.com/3llomi/CircularStatusView/' -} -*/ android { - compileSdkVersion 27 + compileSdkVersion 33 defaultConfig { minSdkVersion 15 - targetSdkVersion 27 + targetSdkVersion 33 versionCode 1 versionName "1.0" - testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" + testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' } @@ -42,8 +28,8 @@ android { dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) - implementation 'com.android.support:appcompat-v7:27.1.1' + implementation 'androidx.appcompat:appcompat:1.0.0' testImplementation 'junit:junit:4.12' - androidTestImplementation 'com.android.support.test:runner:1.0.2' - androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' + androidTestImplementation 'androidx.test.ext:junit:1.1.1' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0' } diff --git a/circularstatusview/src/main/java/com/devlomi/circularstatusview/CircularStatusView.java b/circularstatusview/src/main/java/com/devlomi/circularstatusview/CircularStatusView.java index 665f7ee..c74fd16 100644 --- a/circularstatusview/src/main/java/com/devlomi/circularstatusview/CircularStatusView.java +++ b/circularstatusview/src/main/java/com/devlomi/circularstatusview/CircularStatusView.java @@ -6,13 +6,14 @@ import android.graphics.Color; import android.graphics.Paint; import android.graphics.RectF; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; import android.util.AttributeSet; import android.util.Log; import android.util.SparseIntArray; import android.view.View; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; + public class CircularStatusView extends View { private static final float DEFAULT_PORTION_WIDTH = 10; @@ -34,7 +35,7 @@ public class CircularStatusView extends View { public CircularStatusView(Context context) { super(context); - init(context, null, -1); + init(context, null, 0); } private void init(Context context, AttributeSet attrs, int defStyle) { @@ -55,7 +56,7 @@ private void init(Context context, AttributeSet attrs, int defStyle) { public CircularStatusView(Context context, @Nullable AttributeSet attrs) { super(context, attrs); - init(context, attrs, -1); + init(context, attrs, 0); } public CircularStatusView(Context context, @Nullable AttributeSet attrs, int defStyleAttr) { diff --git a/gradle.properties b/gradle.properties index 82618ce..d546dea 100644 --- a/gradle.properties +++ b/gradle.properties @@ -6,6 +6,8 @@ # http://www.gradle.org/docs/current/userguide/build_environment.html # Specifies the JVM arguments used for the daemon process. # The setting is particularly useful for tweaking memory settings. +android.enableJetifier=true +android.useAndroidX=true org.gradle.jvmargs=-Xmx1536m # When configured, Gradle will run in incubating parallel mode. # This option should only be used with decoupled projects. More details, visit diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 9a4163a..0ebb310 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists