diff --git a/RecyclerViewFundamentals-Starter/app/build.gradle b/RecyclerViewFundamentals-Starter/app/build.gradle index bc60201db..103be96ea 100755 --- a/RecyclerViewFundamentals-Starter/app/build.gradle +++ b/RecyclerViewFundamentals-Starter/app/build.gradle @@ -16,16 +16,15 @@ apply plugin: 'com.android.application' apply plugin: 'kotlin-android' -apply plugin: 'kotlin-android-extensions' apply plugin: 'kotlin-kapt' apply plugin: 'androidx.navigation.safeargs' android { - compileSdkVersion 30 + compileSdkVersion 31 defaultConfig { applicationId "com.example.android.trackmysleepquality" - minSdkVersion 19 - targetSdkVersion 30 + minSdkVersion 21 + targetSdkVersion 31 versionCode 1 versionName "1.0" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" @@ -37,7 +36,13 @@ android { proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } - + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + kotlinOptions { + jvmTarget = '1.8' + } // Enables data binding. buildFeatures { dataBinding true @@ -48,32 +53,27 @@ android { dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" // Support libraries - implementation "androidx.appcompat:appcompat:1.2.0" - implementation "androidx.fragment:fragment-ktx:1.2.5" - implementation "androidx.constraintlayout:constraintlayout:2.0.2" + implementation "androidx.appcompat:appcompat:1.3.1" + implementation "androidx.fragment:fragment-ktx:1.3.6" + implementation "androidx.constraintlayout:constraintlayout:2.1.0" // Android KTX - implementation 'androidx.core:core-ktx:1.3.2' + implementation 'androidx.core:core-ktx:1.6.0' // Room and Lifecycle dependencies implementation "androidx.room:room-runtime:$room_version" implementation 'androidx.legacy:legacy-support-v4:1.0.0' kapt "androidx.room:room-compiler:$room_version" implementation "androidx.lifecycle:lifecycle-extensions:2.2.0" - implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.2.0" + implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.1" // Kotlin Extensions and Coroutines support for Room implementation "androidx.room:room-ktx:$room_version" - // Coroutines - implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutine_version" - implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutine_version" - // Navigation - implementation "android.arch.navigation:navigation-fragment-ktx:$navigationVersion" - implementation "android.arch.navigation:navigation-ui-ktx:$navigationVersion" + implementation "androidx.navigation:navigation-fragment-ktx:$nav_version" + implementation "androidx.navigation:navigation-ui-ktx:$nav_version" } diff --git a/RecyclerViewFundamentals-Starter/app/src/main/AndroidManifest.xml b/RecyclerViewFundamentals-Starter/app/src/main/AndroidManifest.xml index 58a0b98ed..8949e0a9d 100755 --- a/RecyclerViewFundamentals-Starter/app/src/main/AndroidManifest.xml +++ b/RecyclerViewFundamentals-Starter/app/src/main/AndroidManifest.xml @@ -9,7 +9,9 @@ android:roundIcon="@mipmap/ic_launcher_sleep_tracker_round" android:supportsRtl="true" android:theme="@style/AppTheme"> - + diff --git a/RecyclerViewFundamentals-Starter/build.gradle b/RecyclerViewFundamentals-Starter/build.gradle index 20aa6a46d..d88d21a67 100755 --- a/RecyclerViewFundamentals-Starter/build.gradle +++ b/RecyclerViewFundamentals-Starter/build.gradle @@ -19,24 +19,25 @@ buildscript { ext { - kotlin_version = '1.4.10' + kotlin_version = '1.5.30' archLifecycleVersion = '1.1.1' - room_version = '2.2.5' + room_version = '2.4.0-alpha04' coroutine_version = '1.3.7' - gradleVersion = '4.1.0' - navigationVersion = '2.3.1' + gradleVersion = '7.0.2' + nav_version = '2.3.5' dataBindingCompilerVersion = gradleVersion // Always need to be the same. } repositories { google() + mavenCentral() jcenter() } dependencies { classpath "com.android.tools.build:gradle:$gradleVersion" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - classpath "androidx.navigation:navigation-safe-args-gradle-plugin:$navigationVersion" + classpath "androidx.navigation:navigation-safe-args-gradle-plugin:$nav_version" // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files @@ -46,6 +47,7 @@ buildscript { allprojects { repositories { google() + mavenCentral() jcenter() } } diff --git a/RecyclerViewFundamentals-Starter/gradle.properties b/RecyclerViewFundamentals-Starter/gradle.properties index 9592636c0..98bed167d 100755 --- a/RecyclerViewFundamentals-Starter/gradle.properties +++ b/RecyclerViewFundamentals-Starter/gradle.properties @@ -6,10 +6,16 @@ # 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. -org.gradle.jvmargs=-Xmx1536m +org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 # When configured, Gradle will run in incubating parallel mode. # This option should only be used with decoupled projects. More details, visit # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects # org.gradle.parallel=true +# AndroidX package structure to make it clearer which packages are bundled with the +# Android operating system, and which are packaged with your app"s APK +# https://developer.android.com/topic/libraries/support-library/androidx-rn android.useAndroidX=true +# Automatically convert third-party libraries to use AndroidX android.enableJetifier=true +# Kotlin code style for this project: "official" or "obsolete": +kotlin.code.style=official \ No newline at end of file diff --git a/RecyclerViewFundamentals-Starter/gradle/wrapper/gradle-wrapper.properties b/RecyclerViewFundamentals-Starter/gradle/wrapper/gradle-wrapper.properties index c776590a1..74e51a244 100755 --- a/RecyclerViewFundamentals-Starter/gradle/wrapper/gradle-wrapper.properties +++ b/RecyclerViewFundamentals-Starter/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip