GenshinProxy/app/build.gradle.kts

81 lines
2.1 KiB
Plaintext
Raw Normal View History

2022-05-14 15:19:16 +00:00
plugins {
id("com.android.application")
id("kotlin-android")
id("top.niunaijun.blackobfuscator")
2022-05-15 02:51:52 +00:00
id("icu.nullptr.stringfuck")
2022-05-14 15:19:16 +00:00
}
android {
compileSdk = 32
defaultConfig {
applicationId = "xfk233.genshinproxy"
minSdk = 28
targetSdk = 32
versionCode = 5
versionName = "1.5"
}
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 =
"GenshinProxy-$versionName($versionCode)-$name.apk"
}
}
2022-05-14 15:19:16 +00:00
}
BlackObfuscator {
isEnabled = true
depth = 3
setObfClass("xfk233.genshinproxy")
}
2022-05-15 03:26:04 +00:00
fun getKey(project: Project): ByteArray {
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()) {
return keyFile.readBytes()
}
println("Key not found!")
return "xfk2333".encodeToByteArray()
}
2022-05-15 02:51:52 +00:00
stringFuck {
2022-05-15 03:26:04 +00:00
key = getKey(rootProject)
2022-05-15 02:51:52 +00:00
isPrintDebugInfo = false
2022-05-15 04:43:26 +00:00
isWorkOnDebug = false
2022-05-15 02:51:52 +00:00
isWhiteList = false
obfuscationList = setOf("xfk233.genshinproxy")
}
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
implementation("icu.nullptr.stringfuck:library:0.2.2")
}