mirror of
https://github.com/LittleTurtle2333/SimplicityTools.git
synced 2026-07-12 11:21:18 +08:00
79 lines
2.4 KiB
Groovy
79 lines
2.4 KiB
Groovy
plugins {
|
||
id 'com.android.application'
|
||
id 'org.jetbrains.kotlin.android'
|
||
id 'com.google.devtools.ksp' version '1.8.10-1.0.9'
|
||
}
|
||
|
||
android {
|
||
compileSdk 33
|
||
|
||
defaultConfig {
|
||
applicationId "com.lt2333.simplicitytools"
|
||
minSdk 31
|
||
targetSdk 33
|
||
versionCode 75
|
||
versionName '1.7.5-Yuki'
|
||
buildConfigField("String", "BUILD_TIME", "\"${System.currentTimeMillis()}\"")
|
||
}
|
||
|
||
buildTypes {
|
||
release {
|
||
minifyEnabled rootProject.ext.enableR8
|
||
shrinkResources rootProject.ext.enableR8
|
||
zipAlignEnabled rootProject.ext.enableR8
|
||
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
|
||
}
|
||
android.applicationVariants.all { variant ->
|
||
variant.outputs.each { output ->
|
||
// 名称+当前版本号
|
||
def fileName = "WooBoxForMIUI_v${defaultConfig.versionName}"
|
||
|
||
// 加入打包日期
|
||
def releaseDate = new Date().format("MMddHHmmss", TimeZone.getDefault())
|
||
fileName = fileName + "_${releaseDate}"
|
||
|
||
// 如果是debug版本,加入debug
|
||
if ( variant.buildType.name =='debug') {
|
||
fileName = fileName + "_debug"
|
||
}else if(variant.buildType.name =='release') {
|
||
fileName = fileName + "_release"
|
||
}
|
||
// 最终生成文件名
|
||
output.outputFileName = fileName + ".apk"
|
||
}
|
||
}
|
||
}
|
||
|
||
dependencies {
|
||
//API
|
||
compileOnly 'de.robv.android.xposed:api:82'
|
||
implementation 'com.highcapable.yukihookapi:api:1.1.8'
|
||
ksp 'com.highcapable.yukihookapi:ksp-xposed:1.1.8'
|
||
|
||
//UI
|
||
implementation(project(":blockmiui"))
|
||
implementation("androidx.constraintlayout:constraintlayout:2.1.4")
|
||
//APP Center
|
||
String appCenterSdkVersion = "4.4.3"
|
||
implementation("com.microsoft.appcenter:appcenter-analytics:${appCenterSdkVersion}")
|
||
implementation("com.microsoft.appcenter:appcenter-crashes:${appCenterSdkVersion}")
|
||
} |