diff --git a/app/build.gradle b/app/build.gradle index 0e03bddc..f03e075f 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -22,16 +22,17 @@ apply plugin: 'kotlin-kapt' apply plugin: "androidx.navigation.safeargs" android { - compileSdkVersion 30 + compileSdkVersion 31 buildFeatures { dataBinding true } defaultConfig { applicationId "com.example.android.marsrealestate" minSdkVersion 19 - targetSdkVersion 30 + targetSdkVersion 31 versionCode 1 - versionName "1.0" + versionName "1.0" + multiDexEnabled true } buildTypes { release { @@ -64,8 +65,8 @@ dependencies { implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$version_lifecycle" // Navigation - implementation "android.arch.navigation:navigation-fragment-ktx:$version_navigation" - implementation "android.arch.navigation:navigation-ui-ktx:$version_navigation" + implementation "androidx.navigation:navigation-fragment-ktx:$version_navigation" + implementation "androidx.navigation:navigation-ui-ktx:$version_navigation" // Core with Ktx implementation "androidx.core:core-ktx:$version_core" diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index cb581dd8..274a09d7 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -29,7 +29,7 @@ android:roundIcon="@mipmap/ic_launcher_round" android:supportsRtl="true" android:theme="@style/AppTheme"> - + diff --git a/app/src/main/java/com/example/android/marsrealestate/detail/DetailViewModelFactory.kt b/app/src/main/java/com/example/android/marsrealestate/detail/DetailViewModelFactory.kt index 4be8c857..877ab9bc 100644 --- a/app/src/main/java/com/example/android/marsrealestate/detail/DetailViewModelFactory.kt +++ b/app/src/main/java/com/example/android/marsrealestate/detail/DetailViewModelFactory.kt @@ -28,7 +28,7 @@ class DetailViewModelFactory( private val marsProperty: MarsProperty, private val application: Application) : ViewModelProvider.Factory { @Suppress("unchecked_cast") - override fun create(modelClass: Class): T { + override fun create(modelClass: Class): T { if (modelClass.isAssignableFrom(DetailViewModel::class.java)) { return DetailViewModel(marsProperty, application) as T } diff --git a/build.gradle b/build.gradle index 051e31ae..2867511b 100644 --- a/build.gradle +++ b/build.gradle @@ -6,35 +6,35 @@ buildscript { // Versions for all the dependencies we plan to use. It's particularly useful for kotlin and // navigation where the versions of the plugin needs to be the same as the version of the // library defined in the app Gradle file - version_android_gradle_plugin = "4.0.1" version_core = "1.3.1" version_constraint_layout = "2.0.0-rc1" version_glide = "4.8.0" - version_kotlin = "1.3.72" + version_gradle = '7.1.0' + version_kotlin = '1.4.10' version_kotlin_coroutines = "1.3.7" - version_lifecycle = "2.2.0" - version_moshi = "1.9.3" - version_navigation = "1.0.0" + version_lifecycle = '2.4.1' + version_moshi = "1.13.0" + version_navigation = '2.4.1' version_retrofit = "2.9.0" version_retrofit_coroutines_adapter = "0.9.2" version_recyclerview = "1.2.0-alpha05" } repositories { + mavenCentral() google() - jcenter() } dependencies { - classpath "com.android.tools.build:gradle:$version_android_gradle_plugin" + classpath "com.android.tools.build:gradle:$version_gradle" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$version_kotlin" - classpath "android.arch.navigation:navigation-safe-args-gradle-plugin:$version_navigation" + classpath "androidx.navigation:navigation-safe-args-gradle-plugin:$version_navigation" } } allprojects { repositories { + mavenCentral() google() - jcenter() } } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 5552ce33..80f30ba6 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -20,4 +20,4 @@ distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME android.databinding.enableV2=true zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip