2022-05-14 15:19:16 +00:00
|
|
|
plugins {
|
|
|
|
id("com.android.application")
|
|
|
|
id("kotlin-android")
|
|
|
|
id("top.niunaijun.blackobfuscator")
|
|
|
|
}
|
|
|
|
|
|
|
|
android {
|
|
|
|
compileSdk = 32
|
|
|
|
|
|
|
|
defaultConfig {
|
|
|
|
applicationId = "xfk233.genshinproxy"
|
|
|
|
minSdk = 28
|
|
|
|
targetSdk = 32
|
2022-05-15 08:52:17 +00:00
|
|
|
versionCode = 7
|
|
|
|
versionName = "1.7"
|
2022-05-14 15:19:16 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
buildTypes {
|
|
|
|
release {
|
|
|
|
isMinifyEnabled = true
|
|
|
|
isShrinkResources = true
|
|
|
|
setProguardFiles(listOf(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro", "proguard-log.pro"))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
compileOptions {
|
|
|
|
sourceCompatibility = JavaVersion.VERSION_11
|
|
|
|
targetCompatibility = JavaVersion.VERSION_11
|
|
|
|
}
|
|
|
|
kotlinOptions {
|
|
|
|
jvmTarget = JavaVersion.VERSION_11.majorVersion
|
|
|
|
}
|
2022-05-15 03:26:04 +00:00
|
|
|
packagingOptions {
|
|
|
|
resources {
|
|
|
|
excludes += "/META-INF/**"
|
|
|
|
excludes += "/kotlin/**"
|
|
|
|
excludes += "/*.txt"
|
|
|
|
excludes += "/*.bin"
|
|
|
|
}
|
|
|
|
dex {
|
|
|
|
useLegacyPackaging = true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
applicationVariants.all {
|
|
|
|
outputs.all {
|
|
|
|
(this as com.android.build.gradle.internal.api.BaseVariantOutputImpl).outputFileName =
|
2022-05-15 08:15:50 +00:00
|
|
|
"GenshinProxy-$name.apk"
|
2022-05-15 03:26:04 +00:00
|
|
|
}
|
|
|
|
}
|
2022-05-14 15:19:16 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
BlackObfuscator {
|
|
|
|
isEnabled = true
|
|
|
|
depth = 3
|
|
|
|
setObfClass("xfk233.genshinproxy")
|
|
|
|
}
|
|
|
|
|
2022-05-15 08:15:50 +00:00
|
|
|
fun getKey(project: Project): String {
|
2022-05-15 03:36:36 +00:00
|
|
|
val keyFile = File(project.rootProject.projectDir, "genshin.jks")
|
2022-05-15 03:26:04 +00:00
|
|
|
if (keyFile.exists() && keyFile.canRead()) {
|
2022-05-15 08:15:50 +00:00
|
|
|
return keyFile.readText()
|
2022-05-15 03:26:04 +00:00
|
|
|
}
|
|
|
|
println("Key not found!")
|
2022-05-15 08:15:50 +00:00
|
|
|
return "xfk2333"
|
2022-05-15 02:51:52 +00:00
|
|
|
}
|
2022-05-14 15:19:16 +00:00
|
|
|
|
|
|
|
dependencies {
|
|
|
|
compileOnly("de.robv.android.xposed:api:82")
|
|
|
|
compileOnly("de.robv.android.xposed:api:82:sources")
|
|
|
|
implementation("com.github.kyuubiran:EzXHelper:0.9.2")
|
2022-05-15 02:51:52 +00:00
|
|
|
}
|