Files
AppErrorsTracking/app/build.gradle
2023-01-21 00:53:45 +08:00

90 lines
2.8 KiB
Groovy

plugins {
id 'com.android.application'
id 'org.jetbrains.kotlin.android'
id 'com.google.devtools.ksp' version '1.7.22-1.0.8'
}
android {
namespace 'com.fankes.apperrorstracking'
compileSdk 33
signingConfigs {
debug {
storeFile file('../keystore/public')
storePassword '123456'
keyAlias 'public'
keyPassword '123456'
v1SigningEnabled true
v2SigningEnabled true
}
}
defaultConfig {
applicationId "com.fankes.apperrorstracking"
minSdk 24
targetSdk 33
versionCode rootProject.ext.appVersionCode
versionName rootProject.ext.appVersionName
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
/** 添加 App Center Secret 到 BuildConfig */
buildConfigField("String", "APP_CENTER_SECRET", "\"${getAppCenterSecret()}\"")
}
buildTypes {
release {
minifyEnabled rootProject.ext.enableR8
shrinkResources rootProject.ext.enableR8
zipAlignEnabled rootProject.ext.enableR8
signingConfig signingConfigs.debug
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
kotlinOptions {
jvmTarget = '11'
freeCompilerArgs = [
'-Xno-param-assertions',
'-Xno-call-assertions',
'-Xno-receiver-assertions'
]
}
buildFeatures {
viewBinding true
}
lintOptions {
checkReleaseBuilds false
}
}
/**
* 获取 App Center Secret
* @return [String]
*/
String getAppCenterSecret() {
def fileName = '../.secret/APP_CENTER_SECRET'
def content = ''
if (file(fileName).exists()) file(fileName).eachLine { content = it }
return content
}
dependencies {
compileOnly 'de.robv.android.xposed:api:82'
implementation 'com.highcapable.yukihookapi:api:1.1.6'
ksp 'com.highcapable.yukihookapi:ksp-xposed:1.1.6'
implementation 'com.microsoft.appcenter:appcenter-analytics:4.4.5'
implementation 'com.microsoft.appcenter:appcenter-crashes:4.4.5'
implementation 'com.google.code.gson:gson:2.9.0'
implementation 'com.github.duanhong169:drawabletoolbox:1.0.7'
implementation 'com.github.topjohnwu.libsu:core:3.1.2'
implementation 'androidx.core:core-ktx:1.9.0'
implementation 'androidx.appcompat:appcompat:1.6.0'
implementation 'com.google.android.material:material:1.7.0'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
}