diff --git a/.idea/compiler.xml b/.idea/compiler.xml new file mode 100644 index 0000000..fb7f4a8 --- /dev/null +++ b/.idea/compiler.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/gradle.xml b/.idea/gradle.xml index 28b3ff5..107cb10 100644 --- a/.idea/gradle.xml +++ b/.idea/gradle.xml @@ -1,8 +1,10 @@ + - + diff --git a/app/build.gradle b/app/build.gradle index 7676dfa..a450d1b 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -5,14 +5,14 @@ apply plugin: 'kotlin-android' apply plugin: 'kotlin-android-extensions' android { - compileSdkVersion 28 + compileSdkVersion 29 defaultConfig { applicationId "com.asp.fliptimer" minSdkVersion 16 - targetSdkVersion 28 + targetSdkVersion 29 versionCode 5 versionName "1.4" - testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" + testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' } buildTypes { release { @@ -25,10 +25,10 @@ android { dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" - implementation 'com.android.support:appcompat-v7:28.0.0' - implementation 'com.android.support.constraint:constraint-layout: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' + implementation 'androidx.appcompat:appcompat:1.2.0' + implementation 'androidx.constraintlayout:constraintlayout:2.0.4' + testImplementation 'junit:junit:4.13.1' + androidTestImplementation 'androidx.test.ext:junit:1.1.2' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0' implementation project(':fliptimerviewlibrary') } diff --git a/app/src/androidTest/java/com/asp/fliptimer/ExampleInstrumentedTest.kt b/app/src/androidTest/java/com/asp/fliptimer/ExampleInstrumentedTest.kt index 0dcb834..1112348 100644 --- a/app/src/androidTest/java/com/asp/fliptimer/ExampleInstrumentedTest.kt +++ b/app/src/androidTest/java/com/asp/fliptimer/ExampleInstrumentedTest.kt @@ -1,7 +1,7 @@ package com.asp.fliptimer -import android.support.test.InstrumentationRegistry -import android.support.test.runner.AndroidJUnit4 +import androidx.test.platform.app.InstrumentationRegistry +import androidx.test.ext.junit.runners.AndroidJUnit4 import org.junit.Test import org.junit.runner.RunWith @@ -18,7 +18,7 @@ class ExampleInstrumentedTest { @Test fun useAppContext() { // Context of the app under test. - val appContext = InstrumentationRegistry.getTargetContext() + val appContext = InstrumentationRegistry.getInstrumentation().targetContext assertEquals("com.asp.fliptimer", appContext.packageName) } } diff --git a/app/src/main/java/com/asp/fliptimer/MainActivity.kt b/app/src/main/java/com/asp/fliptimer/MainActivity.kt index ef799e5..03c6c94 100644 --- a/app/src/main/java/com/asp/fliptimer/MainActivity.kt +++ b/app/src/main/java/com/asp/fliptimer/MainActivity.kt @@ -2,7 +2,7 @@ package com.asp.fliptimer import android.app.Activity import android.os.Bundle -import android.support.v4.content.res.ResourcesCompat +import androidx.core.content.res.ResourcesCompat import android.widget.Toast import com.asp.fliptimerviewlibrary.CountDownClock import kotlinx.android.synthetic.main.activity_main.* diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index a84609f..82a8299 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -1,5 +1,5 @@ - - + diff --git a/fliptimerviewlibrary/build.gradle b/fliptimerviewlibrary/build.gradle index cb45cf1..1f42b6e 100644 --- a/fliptimerviewlibrary/build.gradle +++ b/fliptimerviewlibrary/build.gradle @@ -3,16 +3,16 @@ apply plugin: 'kotlin-android-extensions' apply plugin: 'kotlin-android' android { - compileSdkVersion 28 + compileSdkVersion 29 defaultConfig { minSdkVersion 16 - targetSdkVersion 28 + targetSdkVersion 29 versionCode 6 versionName "1.5" - testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" + testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' } buildTypes { @@ -26,10 +26,10 @@ android { dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') - implementation 'com.android.support:appcompat-v7:28.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' + implementation 'androidx.appcompat:appcompat:1.2.0' + testImplementation 'junit:junit:4.13.1' + androidTestImplementation 'androidx.test.ext:junit:1.1.2' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0' implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" } repositories { diff --git a/fliptimerviewlibrary/src/androidTest/java/com/asp/fliptimerviewlibrary/ExampleInstrumentedTest.java b/fliptimerviewlibrary/src/androidTest/java/com/asp/fliptimerviewlibrary/ExampleInstrumentedTest.java index fc15f81..48fcbb3 100644 --- a/fliptimerviewlibrary/src/androidTest/java/com/asp/fliptimerviewlibrary/ExampleInstrumentedTest.java +++ b/fliptimerviewlibrary/src/androidTest/java/com/asp/fliptimerviewlibrary/ExampleInstrumentedTest.java @@ -1,8 +1,8 @@ package com.asp.fliptimerviewlibrary; import android.content.Context; -import android.support.test.InstrumentationRegistry; -import android.support.test.runner.AndroidJUnit4; +import androidx.test.platform.app.InstrumentationRegistry; +import androidx.test.ext.junit.runners.AndroidJUnit4; import org.junit.Test; import org.junit.runner.RunWith; @@ -19,7 +19,7 @@ public class ExampleInstrumentedTest { @Test public void useAppContext() { // Context of the app under test. - Context appContext = InstrumentationRegistry.getTargetContext(); + Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); assertEquals("com.asp.fliptimerviewlibrary.test", appContext.getPackageName()); } diff --git a/fliptimerviewlibrary/src/main/java/com/asp/fliptimerviewlibrary/CountdownClock.kt b/fliptimerviewlibrary/src/main/java/com/asp/fliptimerviewlibrary/CountdownClock.kt index f2778bc..a20265b 100755 --- a/fliptimerviewlibrary/src/main/java/com/asp/fliptimerviewlibrary/CountdownClock.kt +++ b/fliptimerviewlibrary/src/main/java/com/asp/fliptimerviewlibrary/CountdownClock.kt @@ -4,7 +4,7 @@ import android.content.Context import android.graphics.Typeface import android.graphics.drawable.Drawable import android.os.CountDownTimer -import android.support.v4.content.ContextCompat +import androidx.core.content.ContextCompat import android.util.AttributeSet import android.util.TypedValue import android.view.View diff --git a/gradle.properties b/gradle.properties index 85be9ea..3d8ce0c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -13,3 +13,5 @@ org.gradle.jvmargs=-Xmx1536m # org.gradle.parallel=true # Kotlin code style for this project: "official" or "obsolete": kotlin.code.style=official +android.useAndroidX=true +android.enableJetifier=true