Migrate to AndroidX support libraries.

This commit is contained in:
Peter Osterlund 2019-04-20 12:02:44 +02:00
parent 026b3ca9f0
commit d0fb56e03e
14 changed files with 39 additions and 38 deletions

View File

@ -10,7 +10,7 @@ android {
versionCode 2 versionCode 2
versionName "1.05" versionName "1.05"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
} }
if(project.hasProperty("RELEASE_STORE_FILE")) { if(project.hasProperty("RELEASE_STORE_FILE")) {
@ -37,9 +37,9 @@ android {
dependencies { dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs') implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:28.0.0' implementation 'androidx.appcompat:appcompat:1.0.0-beta01'
testImplementation 'junit:junit:4.12' testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2' androidTestImplementation 'androidx.test:runner:1.1.0-alpha4'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0-alpha4'
implementation project(':CuckooChessEngine') implementation project(':CuckooChessEngine')
} }

View File

@ -8,7 +8,7 @@ android {
targetSdkVersion 28 targetSdkVersion 28
versionCode 84 versionCode 84
versionName "1.74" versionName "1.74"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
externalNativeBuild { externalNativeBuild {
ndkBuild { ndkBuild {
arguments '-j8' arguments '-j8'
@ -50,12 +50,12 @@ android {
dependencies { dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs') implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:28.0.0' implementation 'androidx.appcompat:appcompat:1.0.0-beta01'
implementation 'com.android.support.constraint:constraint-layout:1.1.3' implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'com.android.support:design:28.0.0' implementation 'com.google.android.material:material:1.0.0-beta01'
testImplementation 'junit:junit:4.12' testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2' androidTestImplementation 'androidx.test:runner:1.1.0-alpha4'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0-alpha4'
implementation project(':CuckooChessEngine') implementation project(':CuckooChessEngine')
implementation 'com.caverock:androidsvg-aar:1.3' implementation 'com.caverock:androidsvg-aar:1.3'
} }

View File

@ -23,8 +23,8 @@ import org.petero.droidfish.gamelogic.Game;
import org.petero.droidfish.gamelogic.GameTree; import org.petero.droidfish.gamelogic.GameTree;
import org.petero.droidfish.gamelogic.TimeControlData; import org.petero.droidfish.gamelogic.TimeControlData;
import android.support.test.InstrumentationRegistry; import androidx.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4; import androidx.test.runner.AndroidJUnit4;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;

View File

@ -122,7 +122,7 @@
android:configChanges="orientation|screenSize|keyboardHidden|screenLayout|smallestScreenSize"> android:configChanges="orientation|screenSize|keyboardHidden|screenLayout|smallestScreenSize">
</activity> </activity>
<provider <provider
android:name="android.support.v4.content.FileProvider" android:name="androidx.core.content.FileProvider"
android:authorities="org.petero.droidfish.fileprovider" android:authorities="org.petero.droidfish.fileprovider"
android:grantUriPermissions="true" android:grantUriPermissions="true"
android:exported="false"> android:exported="false">

View File

@ -20,14 +20,13 @@ import android.graphics.drawable.StateListDrawable;
import android.graphics.drawable.shapes.OvalShape; import android.graphics.drawable.shapes.OvalShape;
import android.os.Build; import android.os.Build;
import android.os.Build.VERSION_CODES; import android.os.Build.VERSION_CODES;
import android.support.annotation.ColorRes; import androidx.annotation.ColorRes;
import android.support.annotation.DimenRes; import androidx.annotation.DimenRes;
import android.support.annotation.DrawableRes; import androidx.annotation.DrawableRes;
import android.support.annotation.IntDef; import androidx.annotation.IntDef;
import android.support.annotation.NonNull; import androidx.annotation.NonNull;
import android.support.v7.widget.AppCompatImageButton; import androidx.appcompat.widget.AppCompatImageButton;
import android.util.AttributeSet; import android.util.AttributeSet;
import android.widget.ImageButton;
import android.widget.TextView; import android.widget.TextView;
import java.lang.annotation.Retention; import java.lang.annotation.Retention;

View File

@ -119,11 +119,11 @@ import android.os.Handler;
import android.os.StrictMode; import android.os.StrictMode;
import android.os.Vibrator; import android.os.Vibrator;
import android.preference.PreferenceManager; import android.preference.PreferenceManager;
import android.support.v4.app.ActivityCompat; import androidx.core.app.ActivityCompat;
import android.support.v4.content.ContextCompat; import androidx.core.content.ContextCompat;
import android.support.v4.content.FileProvider; import androidx.core.content.FileProvider;
import android.support.v4.view.MotionEventCompat; import androidx.core.view.MotionEventCompat;
import android.support.v4.widget.DrawerLayout; import androidx.drawerlayout.widget.DrawerLayout;
import android.text.Editable; import android.text.Editable;
import android.text.Html; import android.text.Html;
import android.text.Spannable; import android.text.Spannable;

View File

@ -55,8 +55,8 @@ import android.os.Bundle;
import android.os.Handler; import android.os.Handler;
import android.os.Vibrator; import android.os.Vibrator;
import android.preference.PreferenceManager; import android.preference.PreferenceManager;
import android.support.v4.view.MotionEventCompat; import androidx.core.view.MotionEventCompat;
import android.support.v4.widget.DrawerLayout; import androidx.drawerlayout.widget.DrawerLayout;
import android.text.TextUtils; import android.text.TextUtils;
import android.view.Gravity; import android.view.Gravity;
import android.view.KeyEvent; import android.view.KeyEvent;

View File

@ -6,7 +6,7 @@ import android.graphics.Canvas;
import android.graphics.Paint; import android.graphics.Paint;
import android.graphics.Path; import android.graphics.Path;
import android.graphics.Path.FillType; import android.graphics.Path.FillType;
import android.support.v4.view.MotionEventCompat; import androidx.core.view.MotionEventCompat;
import android.text.TextPaint; import android.text.TextPaint;
import android.util.AttributeSet; import android.util.AttributeSet;
import android.util.Log; import android.util.Log;

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android" <androidx.drawerlayout.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/drawer_layout" android:id="@+id/drawer_layout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
@ -162,4 +162,4 @@
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
<include layout="@layout/left_drawer"/> <include layout="@layout/left_drawer"/>
</android.support.v4.widget.DrawerLayout> </androidx.drawerlayout.widget.DrawerLayout>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android" <androidx.drawerlayout.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/drawer_layout" android:id="@+id/drawer_layout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
@ -114,4 +114,4 @@
</LinearLayout> </LinearLayout>
<include layout="@layout/left_drawer"/> <include layout="@layout/left_drawer"/>
<include layout="@layout/right_drawer"/> <include layout="@layout/right_drawer"/>
</android.support.v4.widget.DrawerLayout> </androidx.drawerlayout.widget.DrawerLayout>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android" <androidx.drawerlayout.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/drawer_layout" android:id="@+id/drawer_layout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
@ -52,4 +52,4 @@
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
<include layout="@layout/left_drawer"/> <include layout="@layout/left_drawer"/>
</android.support.v4.widget.DrawerLayout> </androidx.drawerlayout.widget.DrawerLayout>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android" <androidx.drawerlayout.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/drawer_layout" android:id="@+id/drawer_layout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
@ -113,4 +113,4 @@
</LinearLayout> </LinearLayout>
<include layout="@layout/left_drawer"/> <include layout="@layout/left_drawer"/>
<include layout="@layout/right_drawer"/> <include layout="@layout/right_drawer"/>
</android.support.v4.widget.DrawerLayout> </androidx.drawerlayout.widget.DrawerLayout>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android" <androidx.drawerlayout.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/drawer_layout" android:id="@+id/drawer_layout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
@ -115,4 +115,4 @@
</LinearLayout> </LinearLayout>
<include layout="@layout/left_drawer"/> <include layout="@layout/left_drawer"/>
<include layout="@layout/right_drawer"/> <include layout="@layout/right_drawer"/>
</android.support.v4.widget.DrawerLayout> </androidx.drawerlayout.widget.DrawerLayout>

View File

@ -6,6 +6,8 @@
# http://www.gradle.org/docs/current/userguide/build_environment.html # http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process. # Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings. # The setting is particularly useful for tweaking memory settings.
android.enableJetifier=true
android.useAndroidX=true
org.gradle.jvmargs=-Xmx1536m org.gradle.jvmargs=-Xmx1536m
# When configured, Gradle will run in incubating parallel mode. # When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit # This option should only be used with decoupled projects. More details, visit