From 3c9ae60d232be9b9371cee1616f03621441e9bee Mon Sep 17 00:00:00 2001 From: Artem Chepurnoy Date: Sun, 7 Aug 2022 21:47:29 +0300 Subject: [PATCH] Update dependencies & remove ACRA crashlytics --- app/build.gradle | 16 +++++++-------- .../java/com/artemchep/pocketmode/Heart.kt | 20 ------------------- .../pocketmode/services/PocketService.kt | 3 +++ build.gradle | 11 +++++----- 4 files changed, 15 insertions(+), 35 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index e28b403..79abc76 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -11,11 +11,11 @@ apply plugin: 'com.android.application' apply plugin: 'kotlin-android' android { - compileSdkVersion 31 + compileSdkVersion 32 defaultConfig { applicationId "com.artemchep.pocketmode" minSdkVersion 28 - targetSdkVersion 31 + targetSdkVersion 32 testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" def versionTag = System.getenv("POCKET_MODE_RELEASE_TAG") @@ -102,7 +102,6 @@ android { } kotlinOptions { jvmTarget = "1.8" - useIR = true } buildFeatures { viewBinding true @@ -115,19 +114,18 @@ android { dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" - implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.0' + implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.3' implementation 'com.artemchep.config:config:2.2.0' implementation 'com.afollestad.material-dialogs:core:3.3.0' - implementation 'com.google.android.material:material:1.6.0-alpha03' + implementation 'com.google.android.material:material:1.7.0-alpha03' implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version" implementation "androidx.lifecycle:lifecycle-livedata-ktx:$lifecycle_version" implementation "androidx.lifecycle:lifecycle-process:$lifecycle_version" implementation 'com.eightbitlab:blurview:1.6.6' - implementation "ch.acra:acra-http:5.8.4" - implementation 'androidx.appcompat:appcompat:1.4.1' - implementation 'androidx.core:core-ktx:1.7.0' + implementation 'androidx.appcompat:appcompat:1.4.2' + implementation 'androidx.core:core-ktx:1.8.0' implementation 'androidx.browser:browser:1.4.0' - implementation 'androidx.constraintlayout:constraintlayout:2.1.3' + implementation 'androidx.constraintlayout:constraintlayout:2.1.4' implementation "androidx.work:work-runtime-ktx:2.7.1" implementation 'androidx.localbroadcastmanager:localbroadcastmanager:1.1.0' implementation 'com.mikepenz:fastadapter:3.3.1' diff --git a/app/src/main/java/com/artemchep/pocketmode/Heart.kt b/app/src/main/java/com/artemchep/pocketmode/Heart.kt index 79afb3e..4ab71e3 100644 --- a/app/src/main/java/com/artemchep/pocketmode/Heart.kt +++ b/app/src/main/java/com/artemchep/pocketmode/Heart.kt @@ -16,27 +16,12 @@ import com.artemchep.pocketmode.analytics.createAnalytics import com.artemchep.pocketmode.services.PocketService import com.artemchep.pocketmode.services.PocketServiceRestartWorker import com.google.android.material.color.DynamicColors -import org.acra.ACRA -import org.acra.annotation.AcraCore -import org.acra.annotation.AcraHttpSender -import org.acra.data.StringFormat -import org.acra.sender.HttpSender import org.solovyev.android.checkout.Billing import java.time.Duration /** * @author Artem Chepurnoy */ -@AcraCore( - reportFormat = StringFormat.JSON, - alsoReportToAndroidFramework = true, -) -@AcraHttpSender( - uri = BuildConfig.ACRA_URI, - basicAuthLogin = BuildConfig.ACRA_USERNAME, - basicAuthPassword = BuildConfig.ACRA_PASSWORD, - httpMethod = HttpSender.Method.POST, -) class Heart : Application() { companion object { private const val WORK_RESTART_ID = "PocketService::restart" @@ -78,16 +63,11 @@ class Heart : Application() { override fun attachBaseContext(base: Context?) { super.attachBaseContext(base) - ACRA.init(this) DynamicColors.applyToActivitiesIfAvailable(this) } override fun onCreate() { super.onCreate() - // don't schedule anything in crash reporter process - if (ACRA.isACRASenderServiceProcess()) - return - Cfg.init(this) Cfg.observe(cfgObserver) diff --git a/app/src/main/java/com/artemchep/pocketmode/services/PocketService.kt b/app/src/main/java/com/artemchep/pocketmode/services/PocketService.kt index a316c10..8c1217f 100644 --- a/app/src/main/java/com/artemchep/pocketmode/services/PocketService.kt +++ b/app/src/main/java/com/artemchep/pocketmode/services/PocketService.kt @@ -100,6 +100,9 @@ class PocketService : Service(), CoroutineScope { when (value.b) { is OnLockScreen -> lockScreen() is BeforeLockScreen -> beforeLockScreen() + is Idle -> { + // Do nothing + } } } } diff --git a/build.gradle b/build.gradle index a578415..fd28d10 100644 --- a/build.gradle +++ b/build.gradle @@ -1,17 +1,17 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { - ext.kotlin_version = '1.6.10' - ext.lifecycle_version = "2.4.1" + ext.kotlin_version = '1.7.10' + ext.lifecycle_version = "2.5.1" repositories { google() jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:7.1.2' + classpath 'com.android.tools.build:gradle:7.1.3' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - classpath 'com.google.gms:google-services:4.3.10' - classpath 'com.google.firebase:firebase-crashlytics-gradle:2.8.1' + classpath 'com.google.gms:google-services:4.3.13' + classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.1' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } @@ -21,7 +21,6 @@ allprojects { repositories { google() jcenter() - } }