From ce3dccc7a16359ea9b8a0082048dda6116c70b71 Mon Sep 17 00:00:00 2001 From: Satindar Dhillon Date: Thu, 8 Dec 2022 09:01:38 -0800 Subject: [PATCH 1/5] update compose version --- android/Omnivore/app/build.gradle | 4 ++-- android/Omnivore/build.gradle | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/android/Omnivore/app/build.gradle b/android/Omnivore/app/build.gradle index ef847fd4d..ff48feb05 100644 --- a/android/Omnivore/app/build.gradle +++ b/android/Omnivore/app/build.gradle @@ -142,8 +142,8 @@ dependencies { implementation "androidx.datastore:datastore-preferences:1.0.0" //Dagger - Hilt - implementation 'com.google.dagger:hilt-android:2.42' - kapt 'com.google.dagger:hilt-compiler:2.42' + implementation "com.google.dagger:hilt-android:$hilt_version" + kapt "com.google.dagger:hilt-compiler:$hilt_version" implementation 'com.apollographql.apollo3:apollo-runtime:3.5.0' diff --git a/android/Omnivore/build.gradle b/android/Omnivore/build.gradle index a6761e531..87ed7a37a 100644 --- a/android/Omnivore/build.gradle +++ b/android/Omnivore/build.gradle @@ -1,12 +1,12 @@ buildscript { ext { - compose_version = '1.3.0-alpha03' + compose_version = '1.3.1' lifecycle_version = '2.5.1' - kotlin_version = '1.6.20' + hilt_version = '2.44.2' } dependencies { - classpath "com.google.dagger:hilt-android-gradle-plugin:2.42" + classpath "com.google.dagger:hilt-android-gradle-plugin:$hilt_version" classpath 'com.android.tools.build:gradle:7.2.2' } From 30ec4f71e888727873444517f808ec09911fac0e Mon Sep 17 00:00:00 2001 From: Satindar Dhillon Date: Thu, 8 Dec 2022 09:21:45 -0800 Subject: [PATCH 2/5] update gradle version --- android/Omnivore/app/build.gradle | 2 +- .../omnivore/omnivore/ui/auth/LoginViewModel.kt | 2 +- .../app/omnivore/omnivore/ui/auth/WelcomeScreen.kt | 1 + android/Omnivore/build.gradle | 14 ++++++-------- 4 files changed, 9 insertions(+), 10 deletions(-) diff --git a/android/Omnivore/app/build.gradle b/android/Omnivore/app/build.gradle index ff48feb05..e08c9b0bd 100644 --- a/android/Omnivore/app/build.gradle +++ b/android/Omnivore/app/build.gradle @@ -68,7 +68,7 @@ android { compose true } composeOptions { - kotlinCompilerExtensionVersion = '1.2.0-alpha08' + kotlinCompilerExtensionVersion = '1.3.1' } packagingOptions { resources { diff --git a/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/LoginViewModel.kt b/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/LoginViewModel.kt index ae058da27..c11f32a6f 100644 --- a/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/LoginViewModel.kt +++ b/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/LoginViewModel.kt @@ -268,7 +268,7 @@ class LoginViewModel @Inject constructor( fun handleGoogleAuthTask(task: Task) { val result = task?.getResult(ApiException::class.java) - val googleIdToken = result.idToken + val googleIdToken = result?.idToken ?: "" // If token is missing then set the error message if (googleIdToken == null) { diff --git a/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/WelcomeScreen.kt b/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/WelcomeScreen.kt index 7f497d556..4cdbdf232 100644 --- a/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/WelcomeScreen.kt +++ b/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/WelcomeScreen.kt @@ -101,6 +101,7 @@ fun WelcomeScreenContent(viewModel: LoginViewModel) { ) when (result) { SnackbarResult.ActionPerformed -> viewModel.resetErrorMessage() + else -> {} } } diff --git a/android/Omnivore/build.gradle b/android/Omnivore/build.gradle index 87ed7a37a..00a604ec9 100644 --- a/android/Omnivore/build.gradle +++ b/android/Omnivore/build.gradle @@ -3,21 +3,19 @@ buildscript { compose_version = '1.3.1' lifecycle_version = '2.5.1' hilt_version = '2.44.2' + gradle_plugin_version = '7.3.1' } dependencies { classpath "com.google.dagger:hilt-android-gradle-plugin:$hilt_version" - classpath 'com.android.tools.build:gradle:7.2.2' + classpath "com.android.tools.build:gradle:$gradle_plugin_version" } +} -}// Top-level build file where you can add configuration options common to all sub-projects/modules. plugins { - id 'com.android.application' version '7.2.2' apply false - id 'com.android.library' version '7.2.2' apply false - id 'org.jetbrains.kotlin.android' version '1.6.20' apply false -// id 'com.android.application' version '7.2.2' apply false -// id 'com.android.library' version '7.2.2' apply false -// id 'org.jetbrains.kotlin.android' version '1.7.20-Beta' apply false + id 'com.android.application' version "$gradle_plugin_version" apply false + id 'com.android.library' version "$gradle_plugin_version" apply false + id 'org.jetbrains.kotlin.android' version '1.7.10' apply false } task clean(type: Delete) { From 7619b0284c6fd01d6f31a224ea5e342c3cb1a61f Mon Sep 17 00:00:00 2001 From: Satindar Dhillon Date: Thu, 8 Dec 2022 09:26:46 -0800 Subject: [PATCH 3/5] update apollo android version --- android/Omnivore/app/build.gradle | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/android/Omnivore/app/build.gradle b/android/Omnivore/app/build.gradle index e08c9b0bd..dd7188739 100644 --- a/android/Omnivore/app/build.gradle +++ b/android/Omnivore/app/build.gradle @@ -3,7 +3,7 @@ plugins { id 'org.jetbrains.kotlin.android' id 'kotlin-kapt' id 'dagger.hilt.android.plugin' - id 'com.apollographql.apollo3' version '3.5.0' + id 'com.apollographql.apollo3' version '3.7.2' } def keystorePropertiesFile = rootProject.file("app/external/keystore.properties"); @@ -18,7 +18,7 @@ android { minSdk 23 targetSdk 32 versionCode 9 - versionName "0.0.9" + versionName "0.0.10" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" vectorDrawables { @@ -78,16 +78,16 @@ android { } dependencies { - def nav_version = "2.5.1" + def nav_version = "2.5.3" - implementation 'androidx.core:core-ktx:1.7.0' + implementation 'androidx.core:core-ktx:1.9.0' implementation "androidx.compose.ui:ui:$compose_version" implementation "androidx.compose.material:material:$compose_version" implementation "androidx.compose.ui:ui-tooling-preview:$compose_version" - implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.3.1' - implementation 'androidx.activity:activity-compose:1.3.1' - implementation 'androidx.appcompat:appcompat:1.4.1' - implementation 'com.google.android.gms:play-services-base:17.6.0' + implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.5.1' + implementation 'androidx.activity:activity-compose:1.6.1' + implementation 'androidx.appcompat:appcompat:1.5.1' + implementation 'com.google.android.gms:play-services-base:18.1.0' implementation "androidx.navigation:navigation-compose:$nav_version" @@ -145,7 +145,7 @@ dependencies { implementation "com.google.dagger:hilt-android:$hilt_version" kapt "com.google.dagger:hilt-compiler:$hilt_version" - implementation 'com.apollographql.apollo3:apollo-runtime:3.5.0' + implementation 'com.apollographql.apollo3:apollo-runtime:3.7.2' implementation 'androidx.compose.material3:material3:1.0.0-alpha16' implementation 'androidx.compose.material3:material3-window-size-class:1.0.0-alpha16' From 98e4a6f5cc75a47c07073daf0dae20276f35db8b Mon Sep 17 00:00:00 2001 From: Satindar Dhillon Date: Thu, 8 Dec 2022 09:30:43 -0800 Subject: [PATCH 4/5] bump multiple dependency versions --- android/Omnivore/app/build.gradle | 35 ++++++++----------------------- 1 file changed, 9 insertions(+), 26 deletions(-) diff --git a/android/Omnivore/app/build.gradle b/android/Omnivore/app/build.gradle index dd7188739..f365c4107 100644 --- a/android/Omnivore/app/build.gradle +++ b/android/Omnivore/app/build.gradle @@ -92,8 +92,8 @@ dependencies { implementation "androidx.navigation:navigation-compose:$nav_version" testImplementation 'junit:junit:4.13.2' - androidTestImplementation 'androidx.test.ext:junit:1.1.3' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' + androidTestImplementation 'androidx.test.ext:junit:1.1.4' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.0' androidTestImplementation "androidx.compose.ui:ui-test-junit4:$compose_version" debugImplementation "androidx.compose.ui:ui-tooling:$compose_version" debugImplementation "androidx.compose.ui:ui-test-manifest:$compose_version" @@ -106,56 +106,39 @@ dependencies { implementation("androidx.lifecycle:lifecycle-viewmodel-compose:$lifecycle_version") // LiveData implementation("androidx.lifecycle:lifecycle-livedata-ktx:$lifecycle_version") - implementation("androidx.compose.runtime:runtime-livedata:1.2.1") + implementation("androidx.compose.runtime:runtime-livedata:1.3.2") // Saved state module for ViewModel implementation("androidx.lifecycle:lifecycle-viewmodel-savedstate:$lifecycle_version") // Annotation processor -// kapt("androidx.lifecycle:lifecycle-compiler:$lifecycle_version") - // alternately - if using Java8, use the following instead of lifecycle-compiler implementation("androidx.lifecycle:lifecycle-common-java8:$lifecycle_version") - // optional - helpers for implementing LifecycleOwner in a Service -// implementation("androidx.lifecycle:lifecycle-service:$lifecycle_version") - - // optional - ProcessLifecycleOwner provides a lifecycle for the whole application process -// implementation("androidx.lifecycle:lifecycle-process:$lifecycle_version") - - // optional - ReactiveStreams support for LiveData -// implementation("androidx.lifecycle:lifecycle-reactivestreams-ktx:$lifecycle_version") - - // optional - Test helpers for LiveData -// testImplementation("androidx.arch.core:core-testing:$arch_version") - - // optional - Test helpers for Lifecycle runtime -// testImplementation ("androidx.lifecycle:lifecycle-runtime-testing:$lifecycle_version") - implementation 'com.squareup.retrofit2:converter-gson:2.9.0' implementation 'com.squareup.retrofit2:retrofit:2.9.0' -// coroutines + // coroutines implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4' implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4' implementation "androidx.security:security-crypto:1.0.0" implementation "androidx.datastore:datastore-preferences:1.0.0" -//Dagger - Hilt + //Dagger - Hilt implementation "com.google.dagger:hilt-android:$hilt_version" kapt "com.google.dagger:hilt-compiler:$hilt_version" implementation 'com.apollographql.apollo3:apollo-runtime:3.7.2' - implementation 'androidx.compose.material3:material3:1.0.0-alpha16' - implementation 'androidx.compose.material3:material3-window-size-class:1.0.0-alpha16' + implementation 'androidx.compose.material3:material3:1.1.0-alpha03' + implementation 'androidx.compose.material3:material3-window-size-class:1.1.0-alpha03' - implementation 'com.google.android.gms:play-services-auth:20.2.0' + implementation 'com.google.android.gms:play-services-auth:20.4.0' implementation "com.google.accompanist:accompanist-systemuicontroller:0.25.1" implementation 'io.coil-kt:coil-compose:2.2.0' - implementation 'com.google.code.gson:gson:2.8.6' + implementation 'com.google.code.gson:gson:2.8.9' implementation 'com.pspdfkit:pspdfkit:8.4.1' } From 3a6009b1161a8ae321c80a41d624a95664c6d116 Mon Sep 17 00:00:00 2001 From: Satindar Dhillon Date: Thu, 8 Dec 2022 09:36:44 -0800 Subject: [PATCH 5/5] bump android target sdk to 33 --- android/Omnivore/app/build.gradle | 2 +- .../src/main/java/app/omnivore/omnivore/ui/reader/PDFReader.kt | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/android/Omnivore/app/build.gradle b/android/Omnivore/app/build.gradle index f365c4107..e4c881079 100644 --- a/android/Omnivore/app/build.gradle +++ b/android/Omnivore/app/build.gradle @@ -16,7 +16,7 @@ android { defaultConfig { applicationId "app.omnivore.omnivore" minSdk 23 - targetSdk 32 + targetSdk 33 versionCode 9 versionName "0.0.10" diff --git a/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/reader/PDFReader.kt b/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/reader/PDFReader.kt index fc18d5c89..bf9565765 100644 --- a/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/reader/PDFReader.kt +++ b/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/reader/PDFReader.kt @@ -1,7 +1,6 @@ package app.omnivore.omnivore.ui.reader import android.annotation.SuppressLint -import android.app.Dialog import android.content.ClipData import android.content.ClipboardManager import android.content.Context @@ -13,8 +12,6 @@ import android.net.Uri import android.os.Bundle import android.util.Log import android.view.* -import android.widget.Button -import android.widget.EditText import android.widget.ImageView import androidx.activity.viewModels import androidx.appcompat.app.AppCompatActivity