This commit is contained in:
方块君 2022-05-14 23:19:16 +08:00
parent 10c4636d18
commit 7508d747aa
8 changed files with 84 additions and 70 deletions

View File

@ -1,47 +0,0 @@
plugins {
id 'com.android.application'
id 'kotlin-android'
id 'top.niunaijun.blackobfuscator'
}
android {
compileSdk 32
defaultConfig {
applicationId "xfk233.genshinproxy"
minSdk 28
targetSdk 32
versionCode 5
versionName "1.5"
}
buildTypes {
release {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro', 'proguard-log.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
kotlinOptions {
jvmTarget = '11'
}
}
BlackObfuscator {
enabled true
depth 3
obfClass = ["xfk233.genshinproxy"]
}
dependencies {
//API
compileOnly 'de.robv.android.xposed:api:82'
//Api
compileOnly 'de.robv.android.xposed:api:82:sources'
implementation 'com.github.kyuubiran:EzXHelper:0.9.2'
}

54
app/build.gradle.kts Normal file
View File

@ -0,0 +1,54 @@
plugins {
id("com.android.application")
id("kotlin-android")
id("top.niunaijun.blackobfuscator")
// id("icu.nullptr.stringfuck") version "0.2.1"
}
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
}
}
BlackObfuscator {
isEnabled = true
depth = 3
setObfClass("xfk233.genshinproxy")
}
//stringFuck {
// setKey("xfk233")
// isPrintDebugInfo = false
// isWorkOnDebug = true
// isWhiteList = false
// obfuscationList = setOf("xfk233.genshinproxy")
//}
dependencies {
compileOnly("de.robv.android.xposed:api:82")
compileOnly("de.robv.android.xposed:api:82:sources")
implementation("com.github.kyuubiran:EzXHelper:0.9.2")
implementation("icu.nullptr.stringfuck:library:0.2.1")
}

View File

@ -1,6 +1,6 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
# proguardFiles setting in build.gradle.kts.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

View File

@ -297,7 +297,7 @@ class Hook {
runOnMainThread {
dialog.visibility = View.VISIBLE
}
Thread.sleep(10 * 1000)
Thread.sleep(15000)
runOnMainThread {
dialog.visibility = View.GONE
activity.windowManager.removeView(dialog)

View File

@ -3,10 +3,16 @@ package xfk233.genshinproxy
import de.robv.android.xposed.IXposedHookLoadPackage
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()
private val hook: Hook
init {
StringFuck.init()
hook = Hook()
}
override fun handleLoadPackage(lpparam: XC_LoadPackage.LoadPackageParam) {
hook.handleLoadPackage(lpparam)

View File

@ -1,19 +0,0 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
mavenCentral()
maven { url 'https://jitpack.io' }
}
dependencies {
classpath "com.android.tools.build:gradle:7.0.4"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.21"
classpath "com.github.CodingGay:BlackObfuscator-ASPlugin:3.7"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}

20
build.gradle.kts Normal file
View File

@ -0,0 +1,20 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
mavenCentral()
maven("https://api.xposed.info")
maven("https://jitpack.io")
}
dependencies {
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")
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
tasks.register("Delete", Delete::class) {
delete(rootProject.buildDir)
}

View File

@ -7,4 +7,4 @@ dependencyResolutionManagement {
}
}
rootProject.name = "GenshinProxy"
include ':app'
include(":app")