- 添加 Sentry Android SDK 依赖 (版本 8.39.1) - 在 sample-app 中集成 Sentry 监控插件 - 添加 Sentry 初始化配置到应用 Application 类 - 在 MainActivity 中添加异常上报测试按钮 - 添加闪退测试功能用于验证 Sentry 监控 - 更新 AndroidManifest.xml 配置应用入口点 - 添加新的 gradle wrapper 文件支持项目构建 - 创建 sdk-core、sdk-im、sdk-push、sdk-update 模块基础结构 - 配置各 SDK 模块的 build.gradle.kts 文件 - 更新 libs.versions.toml 添加 Sentry 版本定义
46 行
1.3 KiB
Plaintext
46 行
1.3 KiB
Plaintext
plugins {
|
|
alias(libs.plugins.android.application)
|
|
alias(libs.plugins.kotlin.compose)
|
|
|
|
id("io.sentry.android.gradle") version "6.4.0"
|
|
}
|
|
|
|
android {
|
|
namespace = "com.xuqm.sdk.sample"
|
|
compileSdk = libs.versions.compileSdk.get().toInt()
|
|
|
|
defaultConfig {
|
|
applicationId = "com.xuqm.sdk.sample"
|
|
minSdk = libs.versions.minSdk.get().toInt()
|
|
targetSdk = libs.versions.targetSdk.get().toInt()
|
|
versionCode = 1
|
|
versionName = "1.0.0"
|
|
}
|
|
|
|
buildTypes {
|
|
release {
|
|
isMinifyEnabled = false
|
|
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
|
|
}
|
|
}
|
|
|
|
compileOptions {
|
|
sourceCompatibility = JavaVersion.VERSION_11
|
|
targetCompatibility = JavaVersion.VERSION_11
|
|
}
|
|
buildFeatures { compose = true }
|
|
}
|
|
|
|
dependencies {
|
|
implementation(project(":sdk-core"))
|
|
implementation(project(":sdk-im"))
|
|
implementation(project(":sdk-push"))
|
|
implementation(project(":sdk-update"))
|
|
implementation(libs.sentry.android)
|
|
implementation(platform(libs.androidx.compose.bom))
|
|
implementation(libs.bundles.compose)
|
|
implementation(libs.androidx.activity.compose)
|
|
implementation(libs.androidx.lifecycle.runtime.ktx)
|
|
debugImplementation(libs.bundles.compose.debug)
|
|
}
|