Update README.md

This commit is contained in:
方块君 2022-05-15 11:26:04 +08:00
parent 3ea66bdbba
commit 77dd13fee3
5 changed files with 36 additions and 3 deletions

View File

@ -30,6 +30,9 @@ jobs:
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Create key file
run: echo -n "${{ secrets.SIGNING_KEY }}" | base64 -d > signingKey.jks
- name: Build with Gradle
run: |
bash ./gradlew assembleRelease

View File

@ -30,6 +30,23 @@ android {
kotlinOptions {
jvmTarget = JavaVersion.VERSION_11.majorVersion
}
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"
}
}
}
BlackObfuscator {
@ -38,8 +55,17 @@ BlackObfuscator {
setObfClass("xfk233.genshinproxy")
}
fun getKey(project: Project): ByteArray {
val keyFile = File(project.rootProject.projectDir, "signingKey.jks")
if (keyFile.exists() && keyFile.canRead()) {
return keyFile.readBytes()
}
println("Key not found!")
return "xfk2333".encodeToByteArray()
}
stringFuck {
setKey("xfk233")
key = getKey(rootProject)
isPrintDebugInfo = false
isWorkOnDebug = true
isWhiteList = false

View File

@ -5,7 +5,6 @@ import de.robv.android.xposed.IXposedHookZygoteInit
import de.robv.android.xposed.callbacks.XC_LoadPackage
import icu.nullptr.stringfuck.StringFuck
class MainHook : IXposedHookLoadPackage, IXposedHookZygoteInit {
private val hook: Hook

View File

@ -1,6 +1,10 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
// maven {
// setUrl("http://192.168.1.5:8081/repository/maven-public/")
// isAllowInsecureProtocol = true
// }
google()
mavenCentral()
maven("https://api.xposed.info")
@ -10,6 +14,7 @@ buildscript {
classpath("com.android.tools.build:gradle:7.1.3")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.21")
classpath("com.github.CodingGay:BlackObfuscator-ASPlugin:3.7")
classpath("icu.nullptr.stringfuck:plugin:0.2.2")
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}

View File

@ -1,4 +1,4 @@
#Sat May 14 18:18:27 CST 2022
#Sun May 15 10:11:18 CST 2022
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
distributionPath=wrapper/dists