Skip to content

Commit e841613

Browse files
committed
Migrate to Android X
1 parent 94a7e62 commit e841613

File tree

24 files changed

+93
-60
lines changed

24 files changed

+93
-60
lines changed

.idea/gradle.xml

Lines changed: 9 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/jarRepositories.xml

Lines changed: 25 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/build.gradle

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ android {
88
targetSdkVersion 28
99
versionCode 1
1010
versionName "1.0"
11-
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
11+
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
1212
}
1313
buildTypes {
1414
release {
@@ -20,10 +20,10 @@ android {
2020

2121
dependencies {
2222
implementation fileTree(dir: 'libs', include: ['*.jar'])
23-
implementation 'com.android.support:appcompat-v7:28.0.0'
24-
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
23+
implementation 'androidx.appcompat:appcompat:1.0.0'
24+
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
2525
testImplementation 'junit:junit:4.12'
26-
androidTestImplementation 'com.android.support.test:runner:1.0.2'
27-
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
26+
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
27+
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'
2828
implementation project(path: ':simplefileexplorer')
2929
}

app/src/androidTest/java/com/example/fileexplorer/ExampleInstrumentedTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package com.example.fileexplorer;
22

33
import android.content.Context;
4-
import android.support.test.InstrumentationRegistry;
5-
import android.support.test.runner.AndroidJUnit4;
4+
import androidx.test.platform.app.InstrumentationRegistry;
5+
import androidx.test.ext.junit.runners.AndroidJUnit4;
66

77
import org.junit.Test;
88
import org.junit.runner.RunWith;

app/src/main/java/com/example/fileexplorer/MainActivity.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
import android.content.Intent;
55
import android.content.pm.PackageManager;
66
import android.os.Bundle;
7-
import android.support.annotation.NonNull;
8-
import android.support.annotation.Nullable;
9-
import android.support.v4.app.ActivityCompat;
10-
import android.support.v4.content.ContextCompat;
11-
import android.support.v7.app.AppCompatActivity;
7+
import androidx.annotation.NonNull;
8+
import androidx.annotation.Nullable;
9+
import androidx.core.app.ActivityCompat;
10+
import androidx.core.content.ContextCompat;
11+
import androidx.appcompat.app.AppCompatActivity;
1212
import android.widget.Toast;
1313

1414
import com.example.simplefileexplorer.SimpleFileExplorerActivity;
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
2+
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
33
xmlns:app="http://schemas.android.com/apk/res-auto"
44
xmlns:tools="http://schemas.android.com/tools"
55
android:layout_width="match_parent"
66
android:layout_height="match_parent"
77
tools:context=".MainActivity">
88

9-
</android.support.constraint.ConstraintLayout>
9+
</androidx.constraintlayout.widget.ConstraintLayout>

gradle.properties

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
# http://www.gradle.org/docs/current/userguide/build_environment.html
77
# Specifies the JVM arguments used for the daemon process.
88
# The setting is particularly useful for tweaking memory settings.
9+
android.enableJetifier=true
10+
android.useAndroidX=true
911
org.gradle.jvmargs=-Xmx1536m
1012
# When configured, Gradle will run in incubating parallel mode.
1113
# This option should only be used with decoupled projects. More details, visit

simplefileexplorer/build.gradle

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ android {
1010
versionCode 1
1111
versionName "1.0"
1212

13-
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
13+
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
1414

1515
}
1616

@@ -26,11 +26,11 @@ android {
2626
dependencies {
2727
implementation fileTree(dir: 'libs', include: ['*.jar'])
2828

29-
implementation 'com.android.support:appcompat-v7:28.0.0'
30-
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
31-
implementation 'com.android.support:support-v4:28.0.0'
29+
implementation 'androidx.appcompat:appcompat:1.0.0'
30+
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
31+
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
3232
testImplementation 'junit:junit:4.12'
33-
androidTestImplementation 'com.android.support.test:runner:1.0.2'
34-
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
35-
implementation 'com.android.support:recyclerview-v7:28.0.0'
33+
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
34+
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'
35+
implementation 'androidx.recyclerview:recyclerview:1.0.0'
3636
}

simplefileexplorer/src/androidTest/java/com/example/simplefileexplorer/ExampleInstrumentedTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package com.example.simplefileexplorer;
22

33
import android.content.Context;
4-
import android.support.test.InstrumentationRegistry;
5-
import android.support.test.runner.AndroidJUnit4;
4+
import androidx.test.platform.app.InstrumentationRegistry;
5+
import androidx.test.ext.junit.runners.AndroidJUnit4;
66

77
import org.junit.Test;
88
import org.junit.runner.RunWith;

simplefileexplorer/src/main/java/com/example/simplefileexplorer/SimpleFileExplorerActivity.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
import android.content.Intent;
66
import android.content.pm.PackageManager;
77
import android.os.Environment;
8-
import android.support.v4.content.ContextCompat;
9-
import android.support.v7.app.AppCompatActivity;
8+
import androidx.core.content.ContextCompat;
9+
import androidx.appcompat.app.AppCompatActivity;
1010
import android.os.Bundle;
1111
import android.view.View;
1212
import android.widget.Button;

0 commit comments

Comments
 (0)