Chore: update dependencies & remove appcenter tracker
This commit is contained in:
3
.github/FUNDING.yml
vendored
3
.github/FUNDING.yml
vendored
@@ -1,3 +0,0 @@
|
||||
# These are supported funding model platforms
|
||||
|
||||
github: [Kr328]
|
||||
@@ -20,11 +20,6 @@ dependencies {
|
||||
implementation(libs.androidx.coordinator)
|
||||
implementation(libs.androidx.recyclerview)
|
||||
implementation(libs.google.material)
|
||||
|
||||
val premiumImplementation by configurations
|
||||
|
||||
premiumImplementation(libs.appcenter.analytics)
|
||||
premiumImplementation(libs.appcenter.crashes)
|
||||
}
|
||||
|
||||
tasks.getByName("clean", type = Delete::class) {
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
package com.github.kr328.clash
|
||||
|
||||
import android.app.Application
|
||||
|
||||
@Suppress("UNUSED_PARAMETER")
|
||||
object Tracker {
|
||||
fun initialize(application: Application) {
|
||||
// do nothing
|
||||
}
|
||||
|
||||
fun uploadLogcat(logcat: String) {
|
||||
// do nothing
|
||||
}
|
||||
}
|
||||
@@ -116,7 +116,7 @@ class FilesActivity : BaseActivity<FilesDesign>() {
|
||||
}
|
||||
is FilesDesign.Request.ExportFile -> {
|
||||
val uri: Uri? = startActivityForResult(
|
||||
ActivityResultContracts.CreateDocument(),
|
||||
ActivityResultContracts.CreateDocument("text/plain"),
|
||||
it.file.name
|
||||
)
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@ class LogcatActivity : BaseActivity<LogcatDesign>() {
|
||||
}
|
||||
LogcatDesign.Request.Export -> {
|
||||
val output = startActivityForResult(
|
||||
ActivityResultContracts.CreateDocument(),
|
||||
ActivityResultContracts.CreateDocument("text/plain"),
|
||||
file.fileName
|
||||
)
|
||||
|
||||
|
||||
@@ -19,9 +19,6 @@ class MainApplication : Application() {
|
||||
override fun onCreate() {
|
||||
super.onCreate()
|
||||
|
||||
// Initialize AppCenter
|
||||
Tracker.initialize(this)
|
||||
|
||||
val processName = currentProcessName
|
||||
|
||||
Log.d("Process $processName started")
|
||||
|
||||
@@ -5,10 +5,8 @@ import android.content.ComponentName
|
||||
import android.content.Context
|
||||
import android.content.ServiceConnection
|
||||
import android.os.IBinder
|
||||
import com.github.kr328.clash.Tracker
|
||||
import com.github.kr328.clash.common.log.Log
|
||||
import com.github.kr328.clash.common.util.intent
|
||||
import com.github.kr328.clash.log.SystemLogcat
|
||||
import com.github.kr328.clash.service.RemoteService
|
||||
import com.github.kr328.clash.service.remote.IRemoteService
|
||||
import com.github.kr328.clash.service.remote.unwrap
|
||||
@@ -28,8 +26,6 @@ class Service(private val context: Application, val crashed: () -> Unit) {
|
||||
override fun onServiceDisconnected(name: ComponentName?) {
|
||||
remote.set(null)
|
||||
|
||||
Tracker.uploadLogcat(SystemLogcat.dumpCrash())
|
||||
|
||||
if (System.currentTimeMillis() - lastCrashed < TOGGLE_CRASHED_INTERVAL) {
|
||||
unbind()
|
||||
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
package com.github.kr328.clash
|
||||
|
||||
import android.app.Application
|
||||
import com.microsoft.appcenter.AppCenter
|
||||
import com.microsoft.appcenter.analytics.Analytics
|
||||
import com.microsoft.appcenter.crashes.Crashes
|
||||
import com.microsoft.appcenter.crashes.ingestion.models.ErrorAttachmentLog
|
||||
|
||||
object Tracker {
|
||||
fun initialize(application: Application) {
|
||||
if (!BuildConfig.DEBUG) {
|
||||
AppCenter.start(
|
||||
application,
|
||||
BuildConfig.APP_CENTER_KEY,
|
||||
Analytics::class.java, Crashes::class.java
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
fun uploadLogcat(logcat: String) {
|
||||
if (!BuildConfig.DEBUG) {
|
||||
if (logcat.isNotBlank()) {
|
||||
Crashes.trackError(
|
||||
RuntimeException(),
|
||||
mapOf("type" to "app_crashed"),
|
||||
listOf(ErrorAttachmentLog.attachmentWithText(logcat, "logcat.txt"))
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -65,9 +65,11 @@ subprojects {
|
||||
|
||||
if (isApp) {
|
||||
packagingOptions {
|
||||
resources {
|
||||
excludes.add("DebugProbesKt.bin")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
productFlavors {
|
||||
flavorDimensions("feature")
|
||||
@@ -88,19 +90,6 @@ subprojects {
|
||||
versionNameSuffix = ".premium"
|
||||
|
||||
buildConfigField("boolean", "PREMIUM", "Boolean.parseBoolean(\"true\")")
|
||||
|
||||
val tracker = rootProject.file("tracker.properties")
|
||||
if (tracker.exists()) {
|
||||
val prop = Properties().apply {
|
||||
tracker.inputStream().use(this::load)
|
||||
}
|
||||
|
||||
buildConfigField(
|
||||
"String",
|
||||
"APP_CENTER_KEY",
|
||||
"\"${prop.getProperty("appcenter.key")!!}\""
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
plugins {
|
||||
kotlin("android")
|
||||
kotlin("kapt")
|
||||
id("kotlinx-serialization")
|
||||
id("com.android.library")
|
||||
id("com.google.devtools.ksp")
|
||||
@@ -11,7 +10,7 @@ dependencies {
|
||||
implementation(project(":common"))
|
||||
|
||||
ksp(libs.kaidl.compiler)
|
||||
kapt(libs.androidx.room.compiler)
|
||||
ksp(libs.androidx.room.compiler)
|
||||
|
||||
implementation(libs.kotlin.coroutine)
|
||||
implementation(libs.kotlin.serialization.json)
|
||||
@@ -25,7 +24,8 @@ dependencies {
|
||||
afterEvaluate {
|
||||
android {
|
||||
libraryVariants.forEach {
|
||||
sourceSets[it.name].java.srcDir(buildDir.resolve("generated/ksp/${it.name}/kotlin"))
|
||||
sourceSets[it.name].kotlin.srcDir(buildDir.resolve("generated/ksp/${it.name}/kotlin"))
|
||||
sourceSets[it.name].java.srcDir(buildDir.resolve("generated/ksp/${it.name}/java"))
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -18,21 +18,20 @@ pluginManagement {
|
||||
dependencyResolutionManagement {
|
||||
versionCatalogs {
|
||||
create("libs") {
|
||||
val agp = "7.2.0"
|
||||
val kotlin = "1.6.21"
|
||||
val ksp = "$kotlin-1.0.5"
|
||||
val agp = "7.2.1"
|
||||
val kotlin = "1.7.0"
|
||||
val ksp = "$kotlin-1.0.6"
|
||||
val golang = "1.0.4"
|
||||
val coroutine = "1.6.1"
|
||||
val coreKtx = "1.7.0"
|
||||
val activity = "1.4.0"
|
||||
val fragment = "1.4.1"
|
||||
val appcompat = "1.4.1"
|
||||
val coroutine = "1.6.3"
|
||||
val coreKtx = "1.8.0"
|
||||
val activity = "1.5.0"
|
||||
val fragment = "1.5.0"
|
||||
val appcompat = "1.4.2"
|
||||
val coordinator = "1.2.0"
|
||||
val recyclerview = "1.2.1"
|
||||
val viewpager = "1.0.0"
|
||||
val material = "1.6.0"
|
||||
val appcenter = "4.4.3"
|
||||
val serialization = "1.3.2"
|
||||
val material = "1.6.1"
|
||||
val serialization = "1.3.3"
|
||||
val kaidl = "1.15"
|
||||
val room = "2.4.2"
|
||||
val multiprocess = "1.0.0"
|
||||
@@ -55,8 +54,6 @@ dependencyResolutionManagement {
|
||||
library("androidx-room-runtime", "androidx.room:room-runtime:$room")
|
||||
library("androidx-room-ktx", "androidx.room:room-ktx:$room")
|
||||
library("google-material", "com.google.android.material:material:$material")
|
||||
library("appcenter-analytics", "com.microsoft.appcenter:appcenter-analytics:$appcenter")
|
||||
library("appcenter-crashes", "com.microsoft.appcenter:appcenter-crashes:$appcenter")
|
||||
library("kaidl-compiler", "com.github.kr328.kaidl:kaidl:$kaidl")
|
||||
library("kaidl-runtime", "com.github.kr328.kaidl:kaidl-runtime:$kaidl")
|
||||
library("rikkax-multiprocess", "dev.rikka.rikkax.preference:multiprocess:$multiprocess")
|
||||
|
||||
Reference in New Issue
Block a user