File tree 4 files changed +16
-18
lines changed
java/com/codelab/android/datastore/ui
4 files changed +16
-18
lines changed Original file line number Diff line number Diff line change @@ -20,12 +20,12 @@ plugins {
20
20
}
21
21
22
22
android {
23
- compileSdkVersion 30
23
+ compileSdkVersion 32
24
24
25
25
defaultConfig {
26
26
applicationId " com.codelab.android.datastore"
27
27
minSdkVersion 16
28
- targetSdkVersion 30
28
+ targetSdkVersion 32
29
29
versionCode 1
30
30
versionName " 1.0"
31
31
@@ -51,13 +51,11 @@ android {
51
51
52
52
dependencies {
53
53
54
- implementation " org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version "
55
54
implementation " androidx.appcompat:appcompat:$supportLibVersion "
56
55
implementation " androidx.constraintlayout:constraintlayout:$constraintLayoutVersion "
57
56
implementation " com.google.android.material:material:$materialVersion "
58
57
59
58
// kotlin
60
- implementation " org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version "
61
59
implementation " org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutinesVersion "
62
60
implementation " org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutinesVersion "
63
61
Original file line number Diff line number Diff line change 25
25
android : roundIcon =" @mipmap/ic_launcher_round"
26
26
android : supportsRtl =" true"
27
27
android : theme =" @style/Theme.Datastore" >
28
- <activity android : name =" .ui.TasksActivity" >
28
+ <activity android : name =" .ui.TasksActivity"
29
+ android : exported =" true" >
29
30
<intent-filter >
30
31
<action android : name =" android.intent.action.MAIN" />
31
32
Original file line number Diff line number Diff line change @@ -19,7 +19,6 @@ package com.codelab.android.datastore.ui
19
19
import android.os.Bundle
20
20
import androidx.appcompat.app.AppCompatActivity
21
21
import androidx.lifecycle.ViewModelProvider
22
- import androidx.lifecycle.observe
23
22
import androidx.recyclerview.widget.DividerItemDecoration
24
23
import com.codelab.android.datastore.data.SortOrder
25
24
import com.codelab.android.datastore.data.TasksRepository
@@ -42,13 +41,13 @@ class TasksActivity : AppCompatActivity() {
42
41
viewModel = ViewModelProvider (
43
42
this ,
44
43
TasksViewModelFactory (TasksRepository , UserPreferencesRepository .getInstance(this ))
45
- ).get( TasksViewModel ::class .java)
44
+ )[ TasksViewModel ::class .java]
46
45
47
46
setupRecyclerView()
48
47
setupFilterListeners(viewModel)
49
48
setupSort()
50
49
51
- viewModel.tasksUiModel.observe(owner = this ) { tasksUiModel ->
50
+ viewModel.tasksUiModel.observe(this ) { tasksUiModel ->
52
51
adapter.submitList(tasksUiModel.tasks)
53
52
updateSort(tasksUiModel.sortOrder)
54
53
binding.showCompletedSwitch.isChecked = tasksUiModel.showCompleted
Original file line number Diff line number Diff line change 16
16
17
17
// Top-level build file where you can add configuration options common to all sub-projects/modules.
18
18
buildscript {
19
- ext. kotlin_version = " 1.5.30 "
19
+ ext. kotlin_version = " 1.6.10 "
20
20
repositories {
21
21
google()
22
22
mavenCentral()
23
23
}
24
24
dependencies {
25
- classpath ' com.android.tools.build:gradle:7.0.2 '
25
+ classpath ' com.android.tools.build:gradle:7.1.1 '
26
26
classpath " org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version "
27
27
}
28
28
}
@@ -39,15 +39,15 @@ task clean(type: Delete) {
39
39
}
40
40
41
41
ext {
42
- supportLibVersion = ' 1.3 .1'
43
- constraintLayoutVersion = ' 2.1.0 '
44
- coreVersion = ' 1.6 .0'
45
- coroutinesVersion = ' 1.5.2 '
46
- materialVersion = ' 1.4 .0'
47
- lifecycleVersion = ' 2.3 .1'
42
+ supportLibVersion = ' 1.4 .1'
43
+ constraintLayoutVersion = ' 2.1.3 '
44
+ coreVersion = ' 1.7 .0'
45
+ coroutinesVersion = ' 1.6.0 '
46
+ materialVersion = ' 1.5 .0'
47
+ lifecycleVersion = ' 2.4 .1'
48
48
49
49
runnerVersion = ' 1.4.0'
50
- rulesVersion = ' 1.0.1 '
51
- junitVersion = ' 4.13.1 '
50
+ rulesVersion = ' 1.4.0 '
51
+ junitVersion = ' 4.13.2 '
52
52
espressoVersion = ' 3.4.0'
53
53
}
You can’t perform that action at this time.
0 commit comments