Преглед изворни кода

Merge branch '1-migrateToAndroidX' into 'master'

Resolve "Migrate to AndroidX"

Closes #1

See merge request kdanandroid/pdf/pdfreaderviewapp!2
Wayne Huang пре 5 година
родитељ
комит
624c65c8d9

+ 1 - 1
KdanBaseModule

@@ -1 +1 @@
-Subproject commit bab786cc62424a97827d1c180490ebc2e4243e4e
+Subproject commit e2680b1a360ba197beedcc7e218f5cad48f3fd57

+ 1 - 1
PDFReaderReaderModule

@@ -1 +1 @@
-Subproject commit 75e5fd330c595df27d85bb1ea90583bb02cc6983
+Subproject commit 9d1d80697c9673a652e0f20c8c3449bc41bf5960

+ 6 - 6
app/build.gradle

@@ -12,7 +12,7 @@ android {
         targetSdkVersion 27
         versionCode 1
         versionName "1.0"
-        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
+        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
     }
     buildTypes {
         release {
@@ -58,12 +58,12 @@ dependencies {
 
     implementation fileTree(dir: 'libs', include: ['*.jar'])
     implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
-    implementation 'com.android.support:appcompat-v7:28.0.0'
-    implementation 'com.android.support:recyclerview-v7:28.0.0'
-    implementation 'com.android.support.constraint:constraint-layout:1.1.2'
+    implementation 'androidx.appcompat:appcompat:1.0.2'
+    implementation 'androidx.recyclerview:recyclerview:1.0.0'
+    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
     testImplementation 'junit:junit:4.12'
-    androidTestImplementation 'com.android.support.test:runner:0.5'
-    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
+    androidTestImplementation 'androidx.test:runner:1.2.0'
+    androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
 
     // Koin for Android
     implementation "org.koin:koin-android:$koinVersion"

+ 2 - 2
app/src/androidTest/java/com/kdanmobile/pdfreaderviewapp/ExampleInstrumentedTest.kt

@@ -1,7 +1,7 @@
 package com.kdanmobile.pdfreaderviewapp
 
-import android.support.test.InstrumentationRegistry
-import android.support.test.runner.AndroidJUnit4
+import androidx.test.InstrumentationRegistry
+import androidx.test.runner.AndroidJUnit4
 
 import org.junit.Test
 import org.junit.runner.RunWith

+ 2 - 2
app/src/main/res/layout/activity_main.xml

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:app="http://schemas.android.com/apk/res-auto"
     xmlns:tools="http://schemas.android.com/tools"
     android:layout_width="match_parent"
@@ -34,4 +34,4 @@
         android:layout_width="wrap_content"
         android:layout_height="wrap_content" />
 
-</android.support.constraint.ConstraintLayout>
+</androidx.constraintlayout.widget.ConstraintLayout>

+ 2 - 0
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.useAndroidX=true
+android.enableJetifier=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