Skip to content

Commit

Permalink
Update dependencies & remove ACRA crashlytics
Browse files Browse the repository at this point in the history
  • Loading branch information
AChep committed Aug 7, 2022
1 parent d8a9a14 commit 3c9ae60
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 35 deletions.
16 changes: 7 additions & 9 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -102,7 +102,6 @@ android {
}
kotlinOptions {
jvmTarget = "1.8"
useIR = true
}
buildFeatures {
viewBinding true
Expand All @@ -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'
Expand Down
20 changes: 0 additions & 20 deletions app/src/main/java/com/artemchep/pocketmode/Heart.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,9 @@ class PocketService : Service(), CoroutineScope {
when (value.b) {
is OnLockScreen -> lockScreen()
is BeforeLockScreen -> beforeLockScreen()
is Idle -> {
// Do nothing
}
}
}
}
Expand Down
11 changes: 5 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -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
}
Expand All @@ -21,7 +21,6 @@ allprojects {
repositories {
google()
jcenter()

}
}

Expand Down

0 comments on commit 3c9ae60

Please sign in to comment.