diff --git a/app/build.gradle b/app/build.gradle index 6586236..cd942b9 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,14 +1,14 @@ apply plugin: 'com.android.application' android { - compileSdkVersion 27 + compileSdkVersion 28 defaultConfig { applicationId "com.othershe.combinebitmaptest" minSdkVersion 14 - targetSdkVersion 27 + targetSdkVersion 28 versionCode 1 versionName "1.0" - testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" + testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' } buildTypes { release { @@ -20,11 +20,11 @@ android { dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) - implementation 'com.android.support:appcompat-v7:27.1.1' - implementation 'com.android.support.constraint:constraint-layout:1.1.2' + implementation 'androidx.appcompat:appcompat:1.3.1' + implementation 'androidx.constraintlayout:constraintlayout:2.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 'pub.devrel:easypermissions:0.4.2' implementation project(':combinebitmap') diff --git a/app/src/androidTest/java/com/othershe/combinebitmaptest/ExampleInstrumentedTest.java b/app/src/androidTest/java/com/othershe/combinebitmaptest/ExampleInstrumentedTest.java index a8298d5..d526eb1 100644 --- a/app/src/androidTest/java/com/othershe/combinebitmaptest/ExampleInstrumentedTest.java +++ b/app/src/androidTest/java/com/othershe/combinebitmaptest/ExampleInstrumentedTest.java @@ -1,8 +1,8 @@ package com.othershe.combinebitmaptest; 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() throws Exception { // Context of the app under test. - Context appContext = InstrumentationRegistry.getTargetContext(); + Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); assertEquals("com.othershe.combinebitmaptest", appContext.getPackageName()); } diff --git a/app/src/main/java/com/othershe/combinebitmaptest/MainActivity.java b/app/src/main/java/com/othershe/combinebitmaptest/MainActivity.java index ab6aa61..917bcfe 100644 --- a/app/src/main/java/com/othershe/combinebitmaptest/MainActivity.java +++ b/app/src/main/java/com/othershe/combinebitmaptest/MainActivity.java @@ -4,7 +4,7 @@ import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.Color; -import android.support.v7.app.AppCompatActivity; +import androidx.appcompat.app.AppCompatActivity; import android.os.Bundle; import android.util.Log; import android.widget.ImageView; diff --git a/build.gradle b/build.gradle index 57f5e65..0dc40c6 100644 --- a/build.gradle +++ b/build.gradle @@ -7,7 +7,7 @@ buildscript { jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:3.1.3' + classpath 'com.android.tools.build:gradle:4.2.2' // NOTE: Do not place your application dependencies here; they belong diff --git a/combinebitmap/build.gradle b/combinebitmap/build.gradle index 66e12e0..a4b6dbe 100644 --- a/combinebitmap/build.gradle +++ b/combinebitmap/build.gradle @@ -1,17 +1,17 @@ apply plugin: 'com.android.library' android { - compileSdkVersion 27 + compileSdkVersion 28 defaultConfig { minSdkVersion 14 - targetSdkVersion 27 + targetSdkVersion 28 versionCode 1 versionName "1.0" - testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" + testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' } @@ -32,7 +32,7 @@ android { dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) - implementation 'com.android.support:appcompat-v7:27.1.1' + implementation 'androidx.appcompat:appcompat:1.3.1' implementation 'com.jakewharton:disklrucache:2.0.2' } diff --git a/combinebitmap/src/main/java/com/othershe/combinebitmap/cache/LruCacheHelper.java b/combinebitmap/src/main/java/com/othershe/combinebitmap/cache/LruCacheHelper.java index 1b20dad..93b2c9c 100644 --- a/combinebitmap/src/main/java/com/othershe/combinebitmap/cache/LruCacheHelper.java +++ b/combinebitmap/src/main/java/com/othershe/combinebitmap/cache/LruCacheHelper.java @@ -1,7 +1,7 @@ package com.othershe.combinebitmap.cache; import android.graphics.Bitmap; -import android.support.v4.util.LruCache; +import androidx.collection.LruCache; public class LruCacheHelper { diff --git a/combinebitmap/src/main/java/com/othershe/combinebitmap/helper/Builder.java b/combinebitmap/src/main/java/com/othershe/combinebitmap/helper/Builder.java index 4151291..ff1e102 100644 --- a/combinebitmap/src/main/java/com/othershe/combinebitmap/helper/Builder.java +++ b/combinebitmap/src/main/java/com/othershe/combinebitmap/helper/Builder.java @@ -1,11 +1,10 @@ package com.othershe.combinebitmap.helper; -import android.annotation.SuppressLint; import android.content.Context; import android.graphics.Bitmap; import android.graphics.Point; import android.graphics.Region; -import android.support.annotation.ColorInt; +import androidx.annotation.ColorInt; import android.view.MotionEvent; import android.view.View; import android.widget.ImageView; diff --git a/combinebitmap/src/main/java/com/othershe/combinebitmap/helper/ThreadPool.java b/combinebitmap/src/main/java/com/othershe/combinebitmap/helper/ThreadPool.java index 1cf1608..12df9ae 100644 --- a/combinebitmap/src/main/java/com/othershe/combinebitmap/helper/ThreadPool.java +++ b/combinebitmap/src/main/java/com/othershe/combinebitmap/helper/ThreadPool.java @@ -1,6 +1,6 @@ package com.othershe.combinebitmap.helper; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import java.util.concurrent.LinkedBlockingDeque; import java.util.concurrent.ThreadFactory; diff --git a/gradle.properties b/gradle.properties index aac7c9b..9e6fce1 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,6 +9,8 @@ # 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. diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 5ab5801..6c24e1a 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Tue Jun 19 14:03:43 CST 2018 +#Thu Mar 03 16:49:58 CST 2022 distributionBase=GRADLE_USER_HOME +distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-bin.zip distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip +zipStoreBase=GRADLE_USER_HOME