mirror of
https://github.com/MetaCubeX/ClashMetaForAndroid.git
synced 2026-05-09 18:11:26 +08:00
69 lines
2.5 KiB
Groovy
69 lines
2.5 KiB
Groovy
apply plugin: 'com.android.application'
|
|
apply plugin: 'kotlinx-serialization'
|
|
apply plugin: 'kotlin-android'
|
|
apply plugin: 'kotlin-android-extensions'
|
|
apply plugin: 'kotlin-kapt'
|
|
|
|
android {
|
|
compileSdkVersion gCompileSdkVersion
|
|
buildToolsVersion gBuildToolsVersion
|
|
defaultConfig {
|
|
applicationId "com.github.kr328.clash"
|
|
minSdkVersion gMinSdkVersion
|
|
targetSdkVersion gTargetSdkVersion
|
|
versionCode gVersionCode
|
|
versionName gVersionName
|
|
}
|
|
buildTypes {
|
|
release {
|
|
minifyEnabled true
|
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
|
}
|
|
}
|
|
compileOptions {
|
|
sourceCompatibility = 1.8
|
|
targetCompatibility = 1.8
|
|
}
|
|
kotlinOptions {
|
|
jvmTarget = "1.8"
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
kapt "androidx.room:room-compiler:$gRoomVersion"
|
|
|
|
implementation project(":core")
|
|
implementation project(":service")
|
|
implementation project(":design")
|
|
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$gKotlinVersion"
|
|
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$gKotlinCoroutineVersion"
|
|
implementation "androidx.lifecycle:lifecycle-extensions:$gLifecycleVersion"
|
|
implementation "androidx.lifecycle:lifecycle-common-java8:$gLifecycleVersion"
|
|
implementation "androidx.recyclerview:recyclerview:$gRecyclerviewVersion"
|
|
implementation "androidx.core:core-ktx:$gAndroidKtxVersion"
|
|
implementation "androidx.appcompat:appcompat:$gAppCompatVersion"
|
|
implementation "androidx.room:room-runtime:$gRoomVersion"
|
|
implementation "org.jetbrains.kotlinx:kotlinx-serialization-runtime:$gKotlinSerializationVersion"
|
|
implementation "com.google.android.material:material:$gMaterialDesignVersion"
|
|
implementation "moe.shizuku.preference:preference-appcompat:$gShizukuPreferenceVersion"
|
|
implementation "moe.shizuku.preference:preference-simplemenu-appcompat:$gShizukuPreferenceVersion"
|
|
implementation "com.microsoft.appcenter:appcenter-analytics:$gAppCenterVersion"
|
|
implementation "com.microsoft.appcenter:appcenter-crashes:$gAppCenterVersion"
|
|
}
|
|
|
|
task injectAppCenterKey() {
|
|
doFirst {
|
|
Properties properties = new Properties()
|
|
properties.load(rootProject.file('local.properties').newDataInputStream())
|
|
|
|
def key = properties.getProperty("appcenter.key", "")
|
|
|
|
android.buildTypes.each {
|
|
it.buildConfigField 'String', 'APP_CENTER_KEY', "\"$key\""
|
|
}
|
|
}
|
|
}
|
|
|
|
afterEvaluate {
|
|
preBuild.dependsOn(injectAppCenterKey)
|
|
} |