From 0166e117452e484fbbb1531d62d89a666062fccb Mon Sep 17 00:00:00 2001 From: Farbod Date: Thu, 9 Dec 2021 17:01:47 +0400 Subject: [PATCH] migrated to androidx --- app/build.gradle | 20 +++++++++---------- .../libretube/ExampleInstrumentedTest.kt | 4 ++-- .../main/java/xyz/btcland/libretube/Home.kt | 2 +- .../java/xyz/btcland/libretube/Library.kt | 2 +- .../xyz/btcland/libretube/MainActivity.kt | 4 ++-- .../xyz/btcland/libretube/Subscriptions.kt | 2 +- app/src/main/res/layout/activity_main.xml | 6 +++--- gradle.properties | 4 +++- 8 files changed, 23 insertions(+), 21 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 7ed14eab2..796d68586 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -13,7 +13,7 @@ android { versionCode 1 versionName "1.0" - testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" + testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' } buildTypes { @@ -33,13 +33,13 @@ android { dependencies { - implementation 'com.android.support:appcompat-v7:28.0.0' - implementation 'com.android.support.constraint:constraint-layout:2.0.4' - implementation 'com.android.support:design:28.0.0' - implementation 'android.arch.navigation:navigation-fragment-ktx:1.0.0' - implementation 'android.arch.navigation:navigation-ui-ktx:1.0.0' - implementation 'com.android.support:support-v4:28.0.0' - testImplementation 'junit:junit:4.+' - 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.4.0' + implementation 'androidx.constraintlayout:constraintlayout:2.1.2' + implementation 'com.google.android.material:material:1.4.0' + implementation 'androidx.navigation:navigation-fragment-ktx:2.4.0-beta02' + implementation 'androidx.navigation:navigation-ui-ktx:2.4.0-beta02' + implementation 'androidx.legacy:legacy-support-v4:1.0.0' + testImplementation 'junit:junit:' + androidTestImplementation 'androidx.test.ext:junit:1.1.3' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' } \ No newline at end of file diff --git a/app/src/androidTest/java/xyz/btcland/libretube/ExampleInstrumentedTest.kt b/app/src/androidTest/java/xyz/btcland/libretube/ExampleInstrumentedTest.kt index a0254b7b8..77e3d2e26 100644 --- a/app/src/androidTest/java/xyz/btcland/libretube/ExampleInstrumentedTest.kt +++ b/app/src/androidTest/java/xyz/btcland/libretube/ExampleInstrumentedTest.kt @@ -1,7 +1,7 @@ package xyz.btcland.libretube -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 diff --git a/app/src/main/java/xyz/btcland/libretube/Home.kt b/app/src/main/java/xyz/btcland/libretube/Home.kt index 2dc0258f8..d1a69d027 100644 --- a/app/src/main/java/xyz/btcland/libretube/Home.kt +++ b/app/src/main/java/xyz/btcland/libretube/Home.kt @@ -1,7 +1,7 @@ package xyz.btcland.libretube import android.os.Bundle -import android.support.v4.app.Fragment +import androidx.fragment.app.Fragment import android.view.LayoutInflater import android.view.View import android.view.ViewGroup diff --git a/app/src/main/java/xyz/btcland/libretube/Library.kt b/app/src/main/java/xyz/btcland/libretube/Library.kt index 3dc915733..05701f749 100644 --- a/app/src/main/java/xyz/btcland/libretube/Library.kt +++ b/app/src/main/java/xyz/btcland/libretube/Library.kt @@ -1,7 +1,7 @@ package xyz.btcland.libretube import android.os.Bundle -import android.support.v4.app.Fragment +import androidx.fragment.app.Fragment import android.view.LayoutInflater import android.view.View import android.view.ViewGroup diff --git a/app/src/main/java/xyz/btcland/libretube/MainActivity.kt b/app/src/main/java/xyz/btcland/libretube/MainActivity.kt index 87310405b..3e1802917 100644 --- a/app/src/main/java/xyz/btcland/libretube/MainActivity.kt +++ b/app/src/main/java/xyz/btcland/libretube/MainActivity.kt @@ -1,8 +1,8 @@ package xyz.btcland.libretube -import android.support.v7.app.AppCompatActivity +import androidx.appcompat.app.AppCompatActivity import android.os.Bundle -import android.support.design.widget.BottomNavigationView +import com.google.android.material.bottomnavigation.BottomNavigationView import androidx.navigation.findNavController import androidx.navigation.ui.setupWithNavController diff --git a/app/src/main/java/xyz/btcland/libretube/Subscriptions.kt b/app/src/main/java/xyz/btcland/libretube/Subscriptions.kt index 0165d5e0c..825f12b37 100644 --- a/app/src/main/java/xyz/btcland/libretube/Subscriptions.kt +++ b/app/src/main/java/xyz/btcland/libretube/Subscriptions.kt @@ -1,7 +1,7 @@ package xyz.btcland.libretube import android.os.Bundle -import android.support.v4.app.Fragment +import androidx.fragment.app.Fragment import android.view.LayoutInflater import android.view.View import android.view.ViewGroup diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index 7043c7d15..85c1a4ae4 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -1,12 +1,12 @@ - - - \ No newline at end of file + \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index 7c985649a..dcdc79c66 100644 --- a/gradle.properties +++ b/gradle.properties @@ -12,4 +12,6 @@ org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects # org.gradle.parallel=true # Kotlin code style for this project: "official" or "obsolete": -kotlin.code.style=official \ No newline at end of file +kotlin.code.style=official +android.useAndroidX=true +android.enableJetifier=true \ No newline at end of file