From 59934613cbef4ae0545047bf4b1070535ccfc1f2 Mon Sep 17 00:00:00 2001 From: Tiem Song Date: Mon, 20 Apr 2020 13:35:15 -0700 Subject: [PATCH 1/3] Update AGP and Kotlin versions --- build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 6defb768f..012d02b55 100644 --- a/build.gradle +++ b/build.gradle @@ -30,10 +30,10 @@ buildscript { espressoVersion = '3.1.1' fragmentVersion = '1.1.0-alpha09' glideVersion = '4.10.0' - gradleVersion = '3.6.1' + gradleVersion = '3.6.3' gsonVersion = '2.8.2' junitVersion = '4.12' - kotlinVersion = '1.3.70' + kotlinVersion = '1.3.72' ktlintVersion = '0.33.0' ktxVersion = '1.0.2' lifecycleVersion = '2.2.0-alpha01' From ffb65e1728beed924bd5efc4f8ad8fa769d8038c Mon Sep 17 00:00:00 2001 From: am-palmer Date: Tue, 12 May 2020 09:04:33 +1200 Subject: [PATCH 2/3] using const string for tag to prevent issues with obfuscation (#603) --- .../google/samples/apps/sunflower/workers/SeedDatabaseWorker.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/com/google/samples/apps/sunflower/workers/SeedDatabaseWorker.kt b/app/src/main/java/com/google/samples/apps/sunflower/workers/SeedDatabaseWorker.kt index 1fa18139a..d21c82c44 100644 --- a/app/src/main/java/com/google/samples/apps/sunflower/workers/SeedDatabaseWorker.kt +++ b/app/src/main/java/com/google/samples/apps/sunflower/workers/SeedDatabaseWorker.kt @@ -52,6 +52,6 @@ class SeedDatabaseWorker( } companion object { - private val TAG = SeedDatabaseWorker::class.java.simpleName + private const val TAG = "SeedDatabaseWorker" } } \ No newline at end of file From 9a345fea17222ee8c0955ae90f97a2a382ca5c5c Mon Sep 17 00:00:00 2001 From: Tatsuya Fujisaki Date: Tue, 12 May 2020 06:15:19 +0900 Subject: [PATCH 3/3] Implement ViewModelProvider.Factory (#602) Co-authored-by: Lady Nicole --- .../sunflower/viewmodels/GardenPlantingListViewModelFactory.kt | 2 +- .../apps/sunflower/viewmodels/PlantDetailViewModelFactory.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/google/samples/apps/sunflower/viewmodels/GardenPlantingListViewModelFactory.kt b/app/src/main/java/com/google/samples/apps/sunflower/viewmodels/GardenPlantingListViewModelFactory.kt index 8ae873b93..0300b1c46 100644 --- a/app/src/main/java/com/google/samples/apps/sunflower/viewmodels/GardenPlantingListViewModelFactory.kt +++ b/app/src/main/java/com/google/samples/apps/sunflower/viewmodels/GardenPlantingListViewModelFactory.kt @@ -26,7 +26,7 @@ import com.google.samples.apps.sunflower.data.GardenPlantingRepository */ class GardenPlantingListViewModelFactory( private val repository: GardenPlantingRepository -) : ViewModelProvider.NewInstanceFactory() { +) : ViewModelProvider.Factory { @Suppress("UNCHECKED_CAST") override fun create(modelClass: Class): T { diff --git a/app/src/main/java/com/google/samples/apps/sunflower/viewmodels/PlantDetailViewModelFactory.kt b/app/src/main/java/com/google/samples/apps/sunflower/viewmodels/PlantDetailViewModelFactory.kt index 57e223235..86f3f871a 100644 --- a/app/src/main/java/com/google/samples/apps/sunflower/viewmodels/PlantDetailViewModelFactory.kt +++ b/app/src/main/java/com/google/samples/apps/sunflower/viewmodels/PlantDetailViewModelFactory.kt @@ -31,7 +31,7 @@ class PlantDetailViewModelFactory( private val plantRepository: PlantRepository, private val gardenPlantingRepository: GardenPlantingRepository, private val plantId: String -) : ViewModelProvider.NewInstanceFactory() { +) : ViewModelProvider.Factory { @Suppress("UNCHECKED_CAST") override fun create(modelClass: Class): T {